Click here to Skip to main content
15,917,060 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: Browser Helper Object Pin
TigerNinja_29-Jan-03 16:39
TigerNinja_29-Jan-03 16:39 
GeneralWTL - Getting a pointer to the Main Window Pin
Tony Hedge20-Jan-03 11:35
Tony Hedge20-Jan-03 11:35 
GeneralRe: WTL - Getting a pointer to the Main Window Pin
Tim Smith20-Jan-03 13:39
Tim Smith20-Jan-03 13:39 
GeneralRe: WTL - Getting a pointer to the Main Window Pin
Tony Hedge20-Jan-03 21:16
Tony Hedge20-Jan-03 21:16 
GeneralRe: WTL - Getting a pointer to the Main Window Pin
Joaquín M López Muñoz20-Jan-03 22:25
Joaquín M López Muñoz20-Jan-03 22:25 
GeneralRe: WTL - Getting a pointer to the Main Window Pin
Tony Hedge20-Jan-03 23:05
Tony Hedge20-Jan-03 23:05 
GeneralRe: WTL - Getting a pointer to the Main Window Pin
AlexO21-Jan-03 2:55
AlexO21-Jan-03 2:55 
GeneralRe: WTL - Getting a pointer to the Main Window Pin
Jörgen Sigvardsson21-Jan-03 10:15
Jörgen Sigvardsson21-Jan-03 10:15 
In stdafx.h, replace
extern CAppModule _Module;
with
// This template code should be placed in it's own header file for
// reusability... 
template <typename TWnd>
class CMainWindowedAppModule : public CAppModule {
     TWnd* m_pWnd;
public:
     void SetMainWindow(TWnd* pWnd) {
          m_pWnd = pWnd;
     }
 
     TWnd* GetMainWindow() {
         return m_pWnd;
     }
};
 
extern CMainWindowedAppModule <class CMainFrame> _Module;

And in <YourAppNameHere>.cpp, replace
CAppModule _Module;
with
CMainWindowedAppModule <class CMainFrame> _Module;

and don't forget to call SetMainWindow() in Run() before entering the message loop.

Nice and simple if HWND isn't enough. Plus, you can stick other stuff into that class too if you want/need.

--
There's a new game we like to play you see. A game with added reality. You treat me like a dog, get me down on my knees.

We call it master and servant.

GeneralRe: WTL - Getting a pointer to the Main Window Pin
Tim Smith21-Jan-03 10:36
Tim Smith21-Jan-03 10:36 
GeneralRe: WTL - Getting a pointer to the Main Window Pin
Jörgen Sigvardsson21-Jan-03 12:51
Jörgen Sigvardsson21-Jan-03 12:51 
GeneralRe: WTL - Getting a pointer to the Main Window Pin
Tony Hedge21-Jan-03 22:13
Tony Hedge21-Jan-03 22:13 
GeneralRe: WTL - Getting a pointer to the Main Window Pin
Jörgen Sigvardsson23-Jan-03 11:00
Jörgen Sigvardsson23-Jan-03 11:00 
GeneralRe: WTL - Getting a pointer to the Main Window Pin
Rob Caldecott21-Jan-03 21:51
Rob Caldecott21-Jan-03 21:51 
GeneralRe: WTL - Getting a pointer to the Main Window Pin
Ed Gadziemski23-Jan-03 5:16
professionalEd Gadziemski23-Jan-03 5:16 
Generalstd::vector question... Pin
Nitron20-Jan-03 7:28
Nitron20-Jan-03 7:28 
GeneralRe: std::vector question... Pin
Michael Dunn20-Jan-03 7:30
sitebuilderMichael Dunn20-Jan-03 7:30 
GeneralRe: std::vector question... Pin
Nitron20-Jan-03 7:34
Nitron20-Jan-03 7:34 
GeneralRe: std::vector question... Pin
harjit28-Jan-03 13:09
harjit28-Jan-03 13:09 
GeneralPost build .dll registration fails in VC 7.0 Pin
Chad Busche20-Jan-03 5:43
Chad Busche20-Jan-03 5:43 
GeneralRe: Post build .dll registration fails in VC 7.0 Pin
Jörgen Sigvardsson21-Jan-03 10:18
Jörgen Sigvardsson21-Jan-03 10:18 
GeneralBitblit with WTL Pin
Tommy2k19-Jan-03 4:41
Tommy2k19-Jan-03 4:41 
GeneralRe: Bitblit with WTL Pin
saierdia19-Jan-03 6:40
saierdia19-Jan-03 6:40 
GeneralRe: Bitblit with WTL Pin
Tommy2k28-Jan-03 6:07
Tommy2k28-Jan-03 6:07 
GeneralRe: Bitblit with WTL Pin
Ben Burnett28-Jan-03 13:53
Ben Burnett28-Jan-03 13:53 
GeneralRe: Bitblit with WTL Pin
Tommy2k29-Jan-03 10:51
Tommy2k29-Jan-03 10:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.