AceZhou
September 12th, 2003, 01:39 PM
Hi, there:
I am a new guy to Win32 API. Maybe my question sounds a little stupid.
I have built a display window, which use Win32 graphic API for graphic rendering. Now I need to create a configurable dialog box by using mouse click. By "configurable", I mean that dialog box will be created based on some information obtained from the mouse event, such as coordinates. But I have 2 problems:
1. in the WinProc function, inside the WM_LBUTTONDOWN message section. I use "DialogBox()" function call to generate the dialog box. I have a resource file built by using VC++ 6.0. Is it right way? Do I need to use "GetModuleHandle" function call first to generate hInstance before "DialogBox"? But it doesn't work. When I click the mouse left button. Nothing comes up.
2 in most of tutorials I read, diglog box generation highly depend on the resource file and is invoked by commands, processed in WM_COMMAND section. Are there any other ways to create and configure the dialog box? For example, by mouse clicking, I can have the coordinates. Now I want to create a dialog box, inside which there are a check box that use the coordinates as the caption name.
Thanks a lot! I am waiting online.:confused:
I am a new guy to Win32 API. Maybe my question sounds a little stupid.
I have built a display window, which use Win32 graphic API for graphic rendering. Now I need to create a configurable dialog box by using mouse click. By "configurable", I mean that dialog box will be created based on some information obtained from the mouse event, such as coordinates. But I have 2 problems:
1. in the WinProc function, inside the WM_LBUTTONDOWN message section. I use "DialogBox()" function call to generate the dialog box. I have a resource file built by using VC++ 6.0. Is it right way? Do I need to use "GetModuleHandle" function call first to generate hInstance before "DialogBox"? But it doesn't work. When I click the mouse left button. Nothing comes up.
2 in most of tutorials I read, diglog box generation highly depend on the resource file and is invoked by commands, processed in WM_COMMAND section. Are there any other ways to create and configure the dialog box? For example, by mouse clicking, I can have the coordinates. Now I want to create a dialog box, inside which there are a check box that use the coordinates as the caption name.
Thanks a lot! I am waiting online.:confused: