المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Preventing a child window to change its z-order?



C++ Programming
08-19-2009, 12:45 AM
Hallo,

is there any possibility to prevent an embedded child window to change its z-order?

My current problem is, I have an control embedded that brings itself into the front sporadically. Since it's embedded in one of my dialogs, the corresponding dialog is popping into the foreground, too. http://www.barakasoft.com/script/Forums/Images/smiley_frown.gif
Within the application this causes an affected dialog to pop in front of another dialog the user could be working in at the same moment.

For testing purposes I made a ::SetParent(controlHwnd, NULL). Once being a child of the desktop, it pops in front of any application now, not only on top of the application it was embedded in.

Anyhow, since I have no chance to modify the control itself (no sources!), I am searching for a way to prevent the control of changing its z-order. Is there any chance to "pin" it?
I have tried nearly all windows styles, but since the control seems to push itself into the front, I cannot do a lot against it this way. Perhaps subclassing the control's window and filtering some specific events? Any help appreciated!


Thanks a lot in advance,
Roland