Ok, I'm trying to let the user move the button while they've clicked it and hold their mouse button down, I've tested the BN_SETFOCUS message (I needed something that was sent BEFORE the user depressed the mouse button) to see if it was sent, and it is. Also, I've checked hTemp to make sure it has the button's hWnd, and it does...and I can't for the life of me see the problem with the code. Someone help me out here, I'm racking my brains to death.
In theory that should work (yeah, and the mX and mY variables DO contain the right mouse info)Code:case WM_COMMAND: switch(HIWORD(wParam)) { case BN_SETFOCUS: bdrag = true; hTemp = (HWND)lParam; break; } return 0; case WM_LBUTTONUP: bdrag = false; return 0; case WM_MOUSEMOVE: if(bdrag == true) MoveWindow(hTemp, mX, mY, 80, 60, TRUE); return 0;