Changing the position of a Popup window
I am having a problem in repositioning the Popup window which is also the main window of the program.
1 2 3 4 5 6 7 8 9 10 11 12 13
|
void OnLButtonDown(UINT flags, CPoint curpos)
{
CursorPos = curpos;
CWnd::GetWindowRect(winrc);
}
void OnMouseMove(UINT flags, CPoint curpos)
{
if(/*CaptnLButtonHold == true && */flags == MK_LBUTTON && CursorPos.y<30)
{
CWnd::SetWindowPos(NULL,winrc.left + curpos.x - CursorPos.x, winrc.top + curpos.y - CursorPos.y,100,100,SWP_NOZORDER|SWP_NOSIZE);
}
}
|
The Problem is that the window keeps flickering between two positions during the OnMouseMove() calls.
Last edited on
Topic archived. No new replies allowed.