MoveWindow()
-
Under what circumstances will this function not work? I mean using it to change the width of the window. I find it kinda weird that this function sometimes works but sometimes not. Anyone could help? Many thx!
// I find it kinda weird that this function sometimes(yes) works but sometimes(no) not. Probably it could be calculated as following :) :
needs_to_work = sometimes(yes) - sometimes(no);
They sought it with thimbles, they sought it with care; They pursued it with forks and hope; They threatened its life with a railway-share; They charmed it with smiles and soap. :)
-
Under what circumstances will this function not work? I mean using it to change the width of the window. I find it kinda weird that this function sometimes works but sometimes not. Anyone could help? Many thx!
If the window is created on a class that doesn't have the
CS_HREDRAW
andCS_VREDRAW
styles, you've also to invalidate the window, since it is not done automatically. UseSetWindowPos
to have more control on the possible options.2 bugs found. > recompile ... 65534 bugs found. :doh:
-
Under what circumstances will this function not work? I mean using it to change the width of the window. I find it kinda weird that this function sometimes works but sometimes not. Anyone could help? Many thx!
It's possible your target windows prevents resizing or changes the behaviour. For example if it answers to the WM_GETMINMAXINFO message like so:
case WM\_GETMINMAXINFO: ((MINMAXINFO\*)lParam)->ptMinTrackSize.x = 200; ((MINMAXINFO\*)lParam)->ptMinTrackSize.y = 150; break;
The window will not allow itself to be resized to anything smaller than 200x150 pixels.
-
Under what circumstances will this function not work? I mean using it to change the width of the window. I find it kinda weird that this function sometimes works but sometimes not. Anyone could help? Many thx!
Krauze wrote:
I find it kinda weird that this function sometimes works but sometimes not.
And in those instances where it does not, are you calling
GetLastError()
to find out why?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius