Problems with SetWindowPos function
-
I'm using on VC6 the SetWindowPos function to set to wndTopMost style for a dialog, but not get the focus. In Win2k it works well, but on Win9x the dialog get the focus. Anyone know how solve this problem ? Thanks, Cristiano ...
-
i had a similar problem. i am not sure way it did not work but seem bto be the way the dialog was created. my work around was to shift the x,y pos 1 pixel. this allowed the setwindowpos to work and setfocus.
-
Explaining better: I'm using SetWindowPos setting the position too. And is not wished that the dialog get the focus, I want set to TOPMOST style. []'s Cristiano
if i understand correctly you wish to bring a child dialog to the top without setting focus to the child. to do this you could use the SWP_NOACTIVATE flag. or you could use a comination of different flags to get the exact settings you require. SWP_ASYNCWINDOWPOS SWP_DEFERERASE SWP_DRAWFRAME SWP_FRAMECHANGED SWP_HIDEWINDOW SWP_NOACTIVATE SWP_NOMOVE SWP_NOOWNERZORDER SWP_NOREDRAW SWP_NOREPOSITION SWP_NOSENDCHANGING SWP_NOSIZE SWP_NOZORDER SWP_SHOWWINDOW
-
if i understand correctly you wish to bring a child dialog to the top without setting focus to the child. to do this you could use the SWP_NOACTIVATE flag. or you could use a comination of different flags to get the exact settings you require. SWP_ASYNCWINDOWPOS SWP_DEFERERASE SWP_DRAWFRAME SWP_FRAMECHANGED SWP_HIDEWINDOW SWP_NOACTIVATE SWP_NOMOVE SWP_NOOWNERZORDER SWP_NOREDRAW SWP_NOREPOSITION SWP_NOSENDCHANGING SWP_NOSIZE SWP_NOZORDER SWP_SHOWWINDOW