Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

PGmeiner

Creating a Win32-Dialogbox

This topic is 5788 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

I want to create a child-Dialogbox which is called from a Parentwindow. I use CreateWindowEx() with the following settings: Extended: WS_EX_LEFT | WS_EX_LTRREADING | WS_EX_RIGHTSCROLLBAR | WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE | WS_EX_CONTROLPARENT Flags: WS_POPUPWINDOW | WS_VISIBLE | WS_CLIPSIBLINGS | WS_DLGFRAME | DS_3DLOOK | DS_SETFONT | DS_MODALFRAME But I get no child window, when I use WS_CHILD flag I can''t see that window because the Parent-window is before them. Which settings i had to take when i want a Window which behaviour is like a Dialogbox (like the MFC one)? Peter Gmeiner

Share this post


Link to post
Share on other sites
Advertisement
Hi

The WinAPI provides quite some functions to create different kinds of dialoges. I think the one that does best what you want would be DialogBoxIndirect()





Runicsoft -- home of my open source Function Parser and more

Share this post


Link to post
Share on other sites
WS_POPUPWINDOW & WS_CHILD are incompatible styles.

The docs say:
quote:

WS_POPUP Creates a pop-up window. This style cannot be used with the WS_CHILD style.

WS_POPUPWINDOW Creates a pop-up window with WS_BORDER, WS_POPUP, and WS_SYSMENU styles. The WS_CAPTION and WS_POPUPWINDOW styles must be combined to make the window menu visible.

WS_CHILD Creates a child window. A window with this style cannot have a menu bar. This style cannot be used with the WS_POPUP style.




Look into creating a modeless dialog.

[edited by - lessbread on September 11, 2002 3:17:49 PM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!