How to move window with no border using picture control
-
I have one dialog without border and on it i have one picture control I wanted to move the window using picture control like we are moving using title bar
-
I have one dialog without border and on it i have one picture control I wanted to move the window using picture control like we are moving using title bar
-
Exactly what do you want to move, and how? Do you want to move the picture within the dialog using the mouse, or some other feature? Or do you want to move the entire dialog?
Entire Dialog I want to move
-
Entire Dialog I want to move
-
I have one dialog without border and on it i have one picture control I wanted to move the window using picture control like we are moving using title bar
See if this helps.
"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
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
I have one dialog without border and on it i have one picture control I wanted to move the window using picture control like we are moving using title bar
You need to process the mouse messages in your dialog, you have to do all the work because you don't have a frame. Usually you have a select trigger, lets say that is left mouse click down (WM_LBUTTONDOWN) that sets a flag in your dialog handler. When that flag is set you process WM_MOUSEMOVE messages to actually move the the window with the mouse. Then you have a trigger to release, lets say that is left mouse button up (WM_LBUTTONUP) that clears the flag in your dialog handler. You can confine the triggers to areas on your dialog or the whole dialog just by looking at position of the trigger messages and allowing or ignoring. That is what the frame handler does and why you can't drag the dialog around without the frame. It also has triggers on the keys to allow you to size and move the window by the keys. The normal frame handler has special areas that turn triggers on/off the top bar allows dragging, the bottom right allows X,Y sizing the sides one direction sizing etc. On MDI and SDI's they call a global default handler called DefFrameProc with some structures, you can look it up on MSDN. That should give you the detail of what you need to do if you want to complete implementation. For graphical dragging and the like I only ever do the basic mouse one.
In vino veritas
-
See if this helps.
"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
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles