dialog boxes and windows c++ win32
I am trying to create an application that has a window on the left, which has graphics in it that can be modified by selecting options on the right side.
Is there either a way to put buttons in a normal window or to draw in a dialog box?
http://www.winprog.net/tutorial/
Depending upon the API. 99% chance that you can put buttons in a normal window or draw in a dialog box.
A dialog after all is really just a window. It has a windows handle (HWND). As for the buttons, you'll just have to manually create them. A button too is just a window. In this case, it's parent windows handle would be the window you want to put the buttons in. The only drawback is that you won't be able to create it via the dialog resource editor.
Depending upon the API. 99% chance that you can put buttons in a normal window or draw in a dialog box.
A dialog after all is really just a window. It has a windows handle (HWND). As for the buttons, you'll just have to manually create them. A button too is just a window. In this case, it's parent windows handle would be the window you want to put the buttons in. The only drawback is that you won't be able to create it via the dialog resource editor.
Add a Picture Control to your dialog then grab the HWND of that control via GetDlgItem() and use it for drawing.
If you're not using MFC, create a static control window (Static Controls, Static Control styles), get the hwnd (per Dave Hunt) then get the hdc for the hwnd, then draw on it.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement