The problem I'm getting is that I can't keep the zOrder of the control I'm
resizing. It always comes to
the front of the zOrder even with the SWP_NOZORDER flag set.
Here's my statement to resize...
lpNewStyle = GetWindowLong(cpControl.hwnd, GWL_STYLE)
lpNewStyle = lpNewStyle Or WS_THICKFRAME
lpNewStyle = SetWindowLong(cpControl.hwnd, GWL_STYLE, lpNewStyle)
SetWindowPos cpControl.hwnd, 0, 0, 0, 0, 0, SWP_NOZORDER Or SWP_NOSIZE
Or SWP_NOMOVE Or SWP_DRAWFRAME
I keep track of the original style so that I can get rid of the sizable
border ...
lpReturn = SetWindowLong(cpControl.hwnd, GWL_STYLE, lpOrigStyle)
SetWindowPos cpControl.hwnd, 0, 0, 0, 0, 0, SWP_NOZORDER Or SWP_NOSIZE
Or SWP_NOMOVE Or SWP_DRAWFRAME
.. am I being blind!!! Can anybody see what I'm doing wrong?
Thanks in advance,
Graeme.
Const SWP_NOZORDER = 4
--
Eduardo A. Morcillo
Create your own shell extensions with VB
Free ActiveX Controls, TypeLibs & Code
http://www.geocities.com/SiliconValley/Foothills/9940
I tried playing around with them and noticed that when you execute the
SetWindowPos function the control does take note of the zOrder you place it
in.. i.e., I can send it to the back, bring it to the front or keep it in
the same place.
It's when you resize the control - as soon as you let go of the mouse button
i.e. you've dragged the control to a new size, it gets brought to the front.
I can't find an event which fires when you let go of the mouse button
though. I could manually do the zOrders otherwise. The mouseup doesn't
fire on the form or on the control after resizing it.
Graeme.
Eduardo Morcillo <eda...@geocities.com.removeme> wrote in message
news:eDq3aN0C$GA....@cppssbbsa02.microsoft.com...
--
Sincerely,
Farshad Hemmati
Microsoft Visual Basic MVP
CompuCated Technologies
http://www.compucated.com/
-------------------------------------------------------
MAKE YOUR MEMORIES ELECTRONIC
Get Your Photo Album Now!
http://www.compucated.com/album/
-------------------------------------------------------
Graeme Foster <graeme...@hotmail.com> wrote in message
news:7svnuo$81s$1...@ayers.ftech.net...
SWP_NOACTIVATE
http://msdn.microsoft.com/library/sdkdoc/winui/windows_2blf.htm
on the microsoft web site which stops the window becoming active and moving
to the top after resizing it......