- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, I'm writing an application in IVF using dialogs. Whilst I have tried changing various possible settings for the dialogs I have failed to stop them remaining visible and on-top when my application is minimised. I wonder if anyone can show me how to make them behave appropriately?
Thanks,
ACAR.
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use SetParent() API, but
1) You have to find the dialog handle first (I hope that your third-party GUI builder supports that)
2) APIs such as SetParent(), SetStyle() do not always work the same way as when the parent/style is assigned during window creation (i.e. you cannot really change the property even though the function reports success). The behavior description is scattered accross the documentation though. I am not sure if SetParent works that way too, but you can try.
Spy++ (VS Tools/Spy++) is your friend for examining properties of "live" windows. Take a look at WS_EX_TOPMOST bit under the dialog's "extended styles"; you might want to remove that, too (SetWindowPos if I recall correctly, my Win32 is a bit rusty now).
1) You have to find the dialog handle first (I hope that your third-party GUI builder supports that)
2) APIs such as SetParent(), SetStyle() do not always work the same way as when the parent/style is assigned during window creation (i.e. you cannot really change the property even though the function reports success). The behavior description is scattered accross the documentation though. I am not sure if SetParent works that way too, but you can try.
Spy++ (VS Tools/Spy++) is your friend for examining properties of "live" windows. Take a look at WS_EX_TOPMOST bit under the dialog's "extended styles"; you might want to remove that, too (SetWindowPos if I recall correctly, my Win32 is a bit rusty now).
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dialogs which are children of your app's parent window and modeless, will be minimized along with the parent.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One would have thought so but they are stubborn children! One point is that I'm using a third-party GUI builder whilst I'm building the dialogs in IVF. So, perhaps, they have no idea of who their parent is. Do you know how I might introduce them?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use SetParent() API, but
1) You have to find the dialog handle first (I hope that your third-party GUI builder supports that)
2) APIs such as SetParent(), SetStyle() do not always work the same way as when the parent/style is assigned during window creation (i.e. you cannot really change the property even though the function reports success). The behavior description is scattered accross the documentation though. I am not sure if SetParent works that way too, but you can try.
Spy++ (VS Tools/Spy++) is your friend for examining properties of "live" windows. Take a look at WS_EX_TOPMOST bit under the dialog's "extended styles"; you might want to remove that, too (SetWindowPos if I recall correctly, my Win32 is a bit rusty now).
1) You have to find the dialog handle first (I hope that your third-party GUI builder supports that)
2) APIs such as SetParent(), SetStyle() do not always work the same way as when the parent/style is assigned during window creation (i.e. you cannot really change the property even though the function reports success). The behavior description is scattered accross the documentation though. I am not sure if SetParent works that way too, but you can try.
Spy++ (VS Tools/Spy++) is your friend for examining properties of "live" windows. Take a look at WS_EX_TOPMOST bit under the dialog's "extended styles"; you might want to remove that, too (SetWindowPos if I recall correctly, my Win32 is a bit rusty now).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the response Jugoslav. I'll have a go and report progress.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've solved this problem in the following manner:
1) using a function provided by my gui builder of the main application window handle and,
2) passing this handle as an optional argument in the function dlgmodeless.
The dialogs now minimise with the main application window.
Thanks for your help.
ACAR.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page