|
-
May 13th, 1999, 08:29 AM
#1
Why my ATL control can not handle WM_CREATE, WM_DESTROY and all user defined message?
VC 6.0/ATL3.0
Hi.Guys!
I create a ATL control. And handle WM_CREATE, WM_DESTROY and some user-defined message. But the handle function dosn't work at all. But the function OnLButtonDown which handle the message WM_LBUTTONDOWN is work fine.
#define WSA_CLOSE WM_USER+1
#define WSA_CONNECT WM_USER+2
MESSAGE_HANDLER(WSA_CLOSE, OnClose) //don't work
MESSAGE_HANDLER(WSA_CONNECT, OnConnect) //don't work
MESSAGE_HANDLER(WM_CREATE, OnCreate) //don't work
MESSAGE_HANDLER(WM_DESTROY, OnDestroy) //don't work
MESSAGE_HANDLER(WM_LBUTTONDOWN, OnLButtonDown) //work fine
Why my ATL control can not handle WM_CREATE, WM_DESTROY and all user defined message?
I'm appreciate for your help.
-
May 13th, 1999, 11:47 AM
#2
Re: Why my ATL control can not handle WM_CREATE, WM_DESTROY and all user defined message?
Probably your not getting the create and destroy because your windowless stick the following in the constructor and see what happens if it isn't already there m_bWindowOnly = true;
You user defined message hmm how are you sending them? if your using the m_hWnd and your windowless your parent (the hosting window) is going to recieve them and not you.. as you don't have a hwnd of your own!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|