|
-
Jan 12th, 2003, 03:42 PM
#1
Thread Starter
<?="Moderator"?>
move popup window
hey im trying to move a window with a popup style. can some one please tell me if the code im using is along the right lines.
[ccode]
case WM_COMMAND:
{
switch(LOWORD(wParam))
{
case WM_MOUSEMOVE:
{
ReleaseCapture();
int y(GET_Y_LPARAM(lParam));
int x(GET_X_LPARAM(lParam));
SetWindowPos(hwnd,HWND_TOPMOST,x,y,NULL,NULL,SWP_NOSIZE);
break;
}
break;
}
[ccode]
-
Jan 12th, 2003, 06:20 PM
#2
Why the ReleaseCapture()?
Other than that it looks ok.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jan 13th, 2003, 12:42 PM
#3
Thread Starter
<?="Moderator"?>
i keep getting these errors any idea whats wrong?
c:\C++\wUnTitled\wUnTitled.cpp(17): error C3861: 'GET_X_LPARAM': identifier not found, even with argument-dependent lookup
c:\C++\wUnTitled\wUnTitled.cpp(16): error C3861: 'GET_Y_LPARAM': identifier not found, even with argument-dependent lookup
Cheers
-
Jan 13th, 2003, 03:30 PM
#4
Thread Starter
<?="Moderator"?>
okay ive only got this code for it now it seems to work, but it exits straight afterwards.
Code:
SendMessage(hwnd,VK_RSHIFT,2,0);
Cheers
-
Jan 14th, 2003, 12:24 AM
#5
VK_RSHIFT is not a message. You need to send a WM_KEYDOWN/WM_KEYUP pair and do correct encoding for wParam and lParam.
To solve the errors you must include <windowsx.h>
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|