Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Toolbar vs Dialog, minimizing and closing with apps
#1
Hi,
This is a two-part question. I am using some dialogs as toolbars because the dialog buttons are more flexible in layout and professional looking than the results I get with toolbars. (Maybe I don't know how to master toolbars).

Anyway, with toolbar it is easy to attach to parent window by adding hwnd after mac name
mac "sample toolbar" hwnd.
This will maximize and minimize and close with parent window app.

With dialog, it doesn't seem to work as easily. When I specify hwnd like this:


if(!ShowDialog("SampleTbDlg" &SampleTbDlg hwnd 0 0 0 0 905 27)) ret

the dialog will appropriate minimize and maximize with the hwnd app window, but will still hang on screen after app window is closed.

I saw this in Help file:
Quote:hwndowner - owner window handle. If the dialog is child window (flags includes 1, and style includes WS_CHILD), hwndowner must be parent window handle.

Sometimes dialogs are used as child windows. To create child dialog, when calling ShowDialog specify parent window handle, flag 1 (modeless) and WS_CHILD style.

when I change flag to 1 it doesn't work and there is no WS_CHILD choice in the Dialog Editor Style choices.

Thanks for any advice,

Stuart

p.s. doesn't have to a "smart" dialog - just a simple collection of button triggers but they do have tooltips and it would be nice to have icons which I know how to do with smart dialogs.
THanks again!!.


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)