![]() |
|
#1
|
|||
|
|||
moving a window without using the title barhello...
I want the user to be able to move my application's window by clicking anywhere on the window area and draggin it around.... here is the code i'm currently usin in my main window procedure: CPP / C++ / C Code:
(hWnd is the main window, curpoint and point are POINT variables) now this works, but not very well. If the mouse is moved around too fast while draggin the window gets stuck.... same thing happens if some part of the window is moved outside the viewable area of the screen... Is there a better way to do this? Last edited by LuciWiz : 22-Aug-2005 at 06:52.
Reason: Please insert your C++ code between [c++] & [/c++] tags
|
|
#2
|
|||
|
|||
Re: moving a window without using the title barHay, the window starts freezing becouse as you move the mouse faster the mouse moves off the window and the move mouse message no longer gets sent to your windows window procedure, to fix this u can use the SetCapture(hWnd); command which tells the program tht no matter where the mouse is it only works for your window add this under the case WM_LBUTTONDOWN, also dont forget to add case WM_LBUTTONUP with ReleaseCapture(); in it becouse other wize the mouse wont work out side ur window once u release the button. to ellaborate
CPP / C++ / C Code:
sowi if this is abit confusing i have alwayz been bad at explaining stuff |
Recent GIDBlog
US Elections and the ?Voter?s Responsibility? by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to minimize a application to the system tray? | Thomas555 | C++ Forum | 12 | 20-May-2005 14:35 |
| Win32 Window Shading behavior (like linux) | WillyumYum | C++ Forum | 3 | 18-Apr-2005 15:36 |
| #including resource file causing window procedure to be undeclared??? | ubergeek | C++ Forum | 3 | 07-Feb-2005 15:39 |
| Changing window start colour | Rosdahale | C++ Forum | 5 | 19-Jan-2005 16:51 |
| Can someone check to see if my program is correct | tommy69 | C Programming Language | 2 | 12-Apr-2004 21:36 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The