Main handle of MFC dialog
-
Hi, one stupid question: I need to know the handle of the main dialog created by the MFC Wizzard (dialog based app). How to get that? I am confused that I couldnt find anything about it. I am using this for a class for minimizing the app to the tray. Do this dialogs have a handle? DKT
-
Hi, one stupid question: I need to know the handle of the main dialog created by the MFC Wizzard (dialog based app). How to get that? I am confused that I couldnt find anything about it. I am using this for a class for minimizing the app to the tray. Do this dialogs have a handle? DKT
-
CWnd::m_hWnd CDialog is derived from CWnd, so you can access m_hwnd from CDialog or through CDialog !
There is no spoon. mail -
Thank you! Thats it! Btw, why cant I see this member variable in the ClassWizzard? I just see my own vars... DKT
I think if you saw every inherited function and variable from all the parent classes, classwizard would be almost useless. :) If I write code in my sleep, does that make me brilliant, or just a lazy programmer? My articles www.stillwaterexpress.com BlackDice - the programmer formerly known as bdiamond
-
Hi, one stupid question: I need to know the handle of the main dialog created by the MFC Wizzard (dialog based app). How to get that? I am confused that I couldnt find anything about it. I am using this for a class for minimizing the app to the tray. Do this dialogs have a handle? DKT
Kreatief wrote: I am using this for a class for minimizing the app to the tray. You use
Shell_NotifyIcon()
for this. There are plenty of examples on how to do this here at CP, and on MSDN. You can Google for even more.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
-
Kreatief wrote: I am using this for a class for minimizing the app to the tray. You use
Shell_NotifyIcon()
for this. There are plenty of examples on how to do this here at CP, and on MSDN. You can Google for even more.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
Yeah sure. I did that, and got it to work. I am having other problems with the trayicon, which caused the problem! I have an MFC app, where I wanna handle Messages, eg. a Buttonclick on the icon. I dunno how to do that. Who can tell me just the base. I can learn myself, but I need to know the base. For a normal app you make an endless loop checking for messages. But here? DKT