Sign in to follow this  

Wizard style dialogs

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

This topic is 3466 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this