Tab Control in QuickWin Dialogs

Tab Control in QuickWin Dialogs

Greetings. Briefly I'd like to know if you can use the tab control in a dialog box in QuickWin. The documentation states that the dialog that lives on each tab must be activated using DlgModeless(). It also states DlgModeless() must be run in a Win32 app, not QuickWin.

However, I didn't learn this until after I tried it. I activate a main dialog using DlgModal() from QuickWin. When it starts up, I run DlgModeless() to get the tab dialogs going from within the main dialog's callback, and everything works.

This was in a test program. I would now like to use this code in an application. Is this safe?

Thanks.

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi,

> I activate a main dialog using DlgModal() from QuickWin. When it starts up, I run DlgModeless() to get the tab dialogs going from within the main dialog's callback, and everything works. This was in a test program. I would now like to use this code in an application. Is this safe?

This may work OK. The problem with DlgModeless and QuickWin is QuickWin's message loop does not handle messages in a way that is compatible with modeless dialog boxes. However, the use of DlgModeless in a modal dialog box is not *really* creating a modeless dialog box, but is creating a child window of the modal dialog box. The modal dialog box runs its own message loop while it is active, which is why a modal dialog box is compatible with QuickWin. So, offhand, I can't think of why it won't work, but you may be the first to try it... ;-).

Let us know if you have any problems.

Regards,
Leo

Thanks. I've since discovered that although buttons, sliders, scroolbars, and edit boxes work from a tab in QuickWin, radio buttons and check boxes do not fully. With the former, I can use them in the dialog with or without callbacks as I please, and read the final state of the controls after the dialog closes, except for the buttons which don't have a state. The radio buttons and check boxes, on the other hand, only work fine until the dialog closes. Their callbacks report the correct values, but their final state is always false.

Any ideas?

Thanks,
Douglass.

Hi Douglass,

This looks like a bug that I have fixed for the next patch kit (due out next month). There is an easy workaround for now. Immediately after the call to DlgModal, add a call like the following for each tab dialog box:

dlg_tab1 % hwnd = 0

Then, your DlgGet calls should retrieve the final values.

Regards,
Leo

Thanks! Your fix worked. When you said 'Immediately after the call to DlgModal' you sure meant it. If there is a 'write(*,*)' between DlgModal() and your fix, it doesn't work. This isn't a problem for me, but it's interesting.

Douglass.

Leave a Comment

Please sign in to add a comment. Not a member? Join today