Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / Subclassing windows ;)

Register 
新用户注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Subclassing windows ;)
#3667
Posted by: KaReL 2004-03-31 10:08:50
I'm currently trying to code in custom menus into my application...

Now I tried subclassing my frame and I received this:
04:02:51: (Frame::MSWWindowProc) WM_WINDOWPOSCHANGING
04:02:51: (Frame::MSWWindowProc) WM_NCCALCSIZE
04:02:51: (Frame::MSWWindowProc) WM_SHOWWINDOW
04:02:51: (Frame::MSWWindowProc) WM_WINDOWPOSCHANGING
04:02:51: (Frame::MSWWindowProc) WM_WINDOWPOSCHANGING
04:02:51: (Frame::MSWWindowProc) WM_NCPAINT
04:02:51: (Frame::MSWWindowProc) WM_ERASEBKGND
04:02:51: (Frame::MSWWindowProc) WM_WINDOWPOSCHANGING
04:02:52: (Frame::MSWWindowProc) WM_INITMENUPOPUP
04:02:52: (WndMenuXP::SubClassMenuProc) WM_WINDOWPOSCHANGING
04:02:52: (WndMenuXP::SubClassMenuProc) WM_NCCALCSIZE
04:02:52: (WndMenuXP::SubClassMenuProc) WM_WINDOWPOSCHANGING
04:02:52: (WndMenuXP::SubClassMenuProc) WM_PRINT
04:02:52: (WndMenuXP::SubClassMenuProc) WM_ERASEBKGND
04:02:53: (WndMenuXP::SubClassMenuProc) WM_WINDOWPOSCHANGING
04:02:53: (WndMenuXP::SubClassMenuProc) WM_NCDESTROY
04:02:53: (Frame::MSWWindowProc) WM_INITMENUPOPUP
04:02:53: (WndMenuXP::SubClassMenuProc) WM_WINDOWPOSCHANGING
04:02:53: (WndMenuXP::SubClassMenuProc) WM_NCCALCSIZE
04:02:53: (WndMenuXP::SubClassMenuProc) WM_WINDOWPOSCHANGING
04:02:53: (WndMenuXP::SubClassMenuProc) WM_NCPAINT
04:02:53: (WndMenuXP::SubClassMenuProc) WM_ERASEBKGND
04:02:54: (WndMenuXP::SubClassMenuProc) WM_WINDOWPOSCHANGING
04:02:54: (WndMenuXP::SubClassMenuProc) WM_NCDESTROY
You see twice this:
04:02:52: (Frame::MSWWindowProc) WM_INITMENUPOPUP
04:02:52: (WndMenuXP::SubClassMenuProc) WM_WINDOWPOSCHANGING
04:02:52: (WndMenuXP::SubClassMenuProc) WM_NCCALCSIZE
04:02:52: (WndMenuXP::SubClassMenuProc) WM_WINDOWPOSCHANGING
04:02:52: (WndMenuXP::SubClassMenuProc) WM_PRINT
04:02:52: (WndMenuXP::SubClassMenuProc) WM_ERASEBKGND
04:02:53: (WndMenuXP::SubClassMenuProc) WM_WINDOWPOSCHANGING
04:02:53: (WndMenuXP::SubClassMenuProc) WM_NCDESTROY
Well, that is I selected (let it popup open) twice a menu.

Now my question is why the default MSWWindowProc doesn't catch all this messages (and only this WM_INITMENUPOPUP)?

The WndMenuXP is my custom hook, but it's rather ugly as I do a hook on the entire program, so that's not very nice ;)... But how do I get those messages anyhow?
------------------------
Website: www.KaReLs0ft.be
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Wed 2021-7-28  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0