Jump to content
  • Advertisement
Sign in to follow this  
n3Xus

C++ and Win32

This topic is 3411 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I'm digging a bit more into Win32 programming (so far I only know the basics, how to set a fullscreen window for game rendering) and so far I know how to create a dialog with edit controls and buttons. Since I use visual studio I want to create controls with the editor obviously, but I only know how to do that for dialog boxes. The problem is that the dialog boxes don't show up in the bottom menu (like when the program is minimized or in the background) and I don't know how to visually create a normal window with controls. So, how do I make a Win32 window with controls (visually)?

Share this post


Link to post
Share on other sites
Advertisement
Controls are just specialized windows. To create common controls, you call CreateWindowEx and specify the name of the window class that corresponds to the common control you want. You can find those classes here. You'll also want to make the controls child windows of the window you're putting them in by giving them the WS_CHILD style and specifying the handle to the parent window as the hWndParent parameter of CreateWindowEx. To give the control an ID, pass it the ID as the hMenu parameter.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!