Bitmap in parent overlaps child dialog.
-
I've got a parent dialog with a picture control linked to a .bmp file. Then I've got a child dialog that opens in the parent. When I open the child dialog the bitmap of the parent overlaps the child window. Any ideas?
-
I've got a parent dialog with a picture control linked to a .bmp file. Then I've got a child dialog that opens in the parent. When I open the child dialog the bitmap of the parent overlaps the child window. Any ideas?
What are the style and extended style flags used when creating the child dialog? Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
-
What are the style and extended style flags used when creating the child dialog? Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
childDlg = new cChildDlg; childDlg->Create(cChildDlg::IDD, this); childDlg->SetWindowPos(NULL, a, b, c, d, SWP_SHOWWINDOW);
-
childDlg = new cChildDlg; childDlg->Create(cChildDlg::IDD, this); childDlg->SetWindowPos(NULL, a, b, c, d, SWP_SHOWWINDOW);
I meant the window styles :) Try using wndTop as the first parameter to childDlg->SetWindowPos(). You may also want to try editing the child dialog resource and set the clip siblings property to true. Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
-
childDlg = new cChildDlg; childDlg->Create(cChildDlg::IDD, this); childDlg->SetWindowPos(NULL, a, b, c, d, SWP_SHOWWINDOW);
aquawicket wrote:
childDlg->SetWindowPos(NULL, a, b, c, d, SWP_SHOWWINDOW);
if you specify the first parameter as NULL, you must specify the SWP_NOZORDER flag also.
nave [OpenedFileFinder]
-
childDlg = new cChildDlg; childDlg->Create(cChildDlg::IDD, this); childDlg->SetWindowPos(NULL, a, b, c, d, SWP_SHOWWINDOW);
Also call childDlg->BringWindowToTop()
nave [OpenedFileFinder]
-
Also call childDlg->BringWindowToTop()
nave [OpenedFileFinder]
Hmmm... So far I've tried all of the above, nothing does it yet... In the resource editor, the dialog type is set to child. All of my other modal and modeless dialogs overlap the bitmap on the parent ok. It's just these child dialogs.
-
Hmmm... So far I've tried all of the above, nothing does it yet... In the resource editor, the dialog type is set to child. All of my other modal and modeless dialogs overlap the bitmap on the parent ok. It's just these child dialogs.
You stated "Then I've got a child dialog that opens in the parent." How is this dialog created? Modal? Modeless? Try using MoveWindow() instead of SetWindowPos(). MoveWindow doesn't mess with Z-order and your most recent created child should be at the top of the z-order unless you've made another child alwaysontop. Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
-
You stated "Then I've got a child dialog that opens in the parent." How is this dialog created? Modal? Modeless? Try using MoveWindow() instead of SetWindowPos(). MoveWindow doesn't mess with Z-order and your most recent created child should be at the top of the z-order unless you've made another child alwaysontop. Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
Good man mark... It was definetly a Z-order issue.. MoveWindow() works it out.. :) Thank you very very much..