Jump to content
  • Advertisement
Sign in to follow this  
AnAss

Wizard style dialogs

This topic is 3774 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 am trying to create a wizard style dialog. It is a pretty simple dialog, and 99% of the program does not use the windows GUI system, so I'm just using straight winapi with the dialog resource editor. Currently what I have done is I've made a dialog resource that is the dialog with a blank page, i.e. just a blank space with prev, next, finish, cancel buttons. Each page is another dialog resource. I create all the dialogs at once, the pages are child windows of the main dialog. When the user changes pages, I show the current page, and hide the rest of the pages. Problems: 1) The tab order is wrong. No matter what control the user is currently on in any page, tab always jumps to the 4 prev, next, finish, cancel buttons. Then it cycles through those buttons only. 2) I am trying to use DM_SETDEFID to change the default button depending on whether finish or next are enabled:
	
if(finishEnabled)
	SendMessage(g_hDlg, DM_SETDEFID, IDC_FINISH, 0);
else
	SendMessage(g_hDlg, DM_SETDEFID, IDC_NEXT, 0);
This works for all but when the dialog is initialized. If I try to call this code from within WM_INITDIALOG, the cancel button ends up being the default button. I tried to put it in WM_SHOWWINDOW, but that made BOTH the cancel button and finish buttons have the default 'look', but cancel still behaved as the default button.

Share this post


Link to post
Share on other sites
Advertisement
I call shenanigans on this post. The title was obviously written in a misleading manner so that I would click on it thinking that we would be talking about how Wizards speak.

How disappointing...

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.

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!