如何使用vc ++ win32为mdiclient创建消息处理程序 [英] How to create message handler for mdiclient using vc++ win32
问题描述
你好,
任何人都可以告诉我如何在vc ++ win32中为MDIClient控件创建一个处理程序,我的意思是像LRESULT CALLBACK WndProc这样的处理程序(HWND hWnd,UINT消息,WPARAM wParam,LPARAM lParam)它处理hWnd窗口绘图,绘画,破坏等...这里是我如何创建mdiclient控件的代码
代码:
hello,
can anybody tell me how to create a handler for MDIClient control in vc++ win32, i mean a handler like LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) which handles hWnd window Drawing, painting, destroying and etc... here is the code how i create the mdiclient control
code:
HWND ChildWindowCreation(HWND hWnd, HINSTANCE hInst){
hwndClient = CreateWindow (TEXT ("MDICLIENT"), NULL, WS_CHILD |WS_BORDER|
WS_CLIPCHILDREN | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL, 0, 0,
0, 0, hWnd, (HMENU) 1, hInst,
(PSTR)&clientcreate) ;
if(!hwndClient){
MessageBox(NULL, "Program did not made the stuff ready for you", "Error", MB_OK|MB_ICONERROR);
}
return hwndClient;
}
然后我在WM_create中调用hWnd(父窗口)中的函数来完美地创建它。所以我想要一个处理程序。任何人都可以告诉我如何。
提前致谢。
and then i call the function in hWnd(parent window) in WM_create which creates it perfectly. so i wanted to have a handler for it either. can anybody tell me how.
Thanks in advance.
推荐答案
参见 http://www.winprog.org/ [ ^ ],
http://www.relisoft.com/index .htm [ ^ ],
http://www.codeguru.com/cpp/wp/ [ ^ ],
http://www.functionx.com/win32/index.htm [ ^ ],
http://www.blackwasp.co.uk/WindowsProgrammingArticles.aspx [ ^ ]等等。
See http://www.winprog.org/[^],
http://www.relisoft.com/index.htm[^],
http://www.codeguru.com/cpp/w-p/[^],
http://www.functionx.com/win32/index.htm[^],
http://www.blackwasp.co.uk/WindowsProgrammingArticles.aspx[^], etc, etc.
这篇关于如何使用vc ++ win32为mdiclient创建消息处理程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!