Home » Category » DotNet Visual C

DotNet Visual C: I tried to move dialog around. but..

206| Mon, 31 Dec 2007 14:10:00 GMT| mihyon| Comments (1)
Dear all,

I tried to maximize dialog in dialog based application. I used
'ShowWindow(SW_MAXIMIZE);'

and

I tried to move dialog around.

I used

::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default

AfxGetMainWnd()->PostMessage(WM_NCLBUTTONDOWN, HTCAPTION,
MAKELPARAM(point.x,point.y));
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_SIZENWSE));

// CDialog::OnLButtonDown(nFlags, point);
}

I don't want to move maximized dialog when I push left mouse button. but it
moves.

and I want to move normal dialog uesed 'ShowWindow(SW_RESTORE)' when I push
left mouse button.

Keywords & Tags: tried, move, dialog, around, dotnet, visual, .net

URL: http://dotnet.itags.org/visual-c/71180/
 
«« Prev - Next »» 1 helpful answers below.
I used flag.
flag =0 when dialog maximized

if (falg==0)
{
AfxGetMainWnd()->PostMessage(WM_NCLBUTTONDOWN, HTCAPTION,
MAKELPARAM(point.x,point.y));
}

I solved. thank you.

"mihyon" <einstone...e-castle.co.kr> wrote in message
news:boplbl$n3p$1...news1.kornet.net...
> Dear all,
> I tried to maximize dialog in dialog based application. I used
> 'ShowWindow(SW_MAXIMIZE);'
> and
> I tried to move dialog around.
> I used
> ::OnLButtonDown(UINT nFlags, CPoint point)
> {
> // TODO: Add your message handler code here and/or call default
> AfxGetMainWnd()->PostMessage(WM_NCLBUTTONDOWN, HTCAPTION,
> MAKELPARAM(point.x,point.y));
> SetCursor(AfxGetApp()->LoadStandardCursor(IDC_SIZENWSE));
> // CDialog::OnLButtonDown(nFlags, point);
> }
>
> I don't want to move maximized dialog when I push left mouse button. but
it
> moves.
> and I want to move normal dialog uesed 'ShowWindow(SW_RESTORE)' when I
push
> left mouse button.

mihyon | Mon, 31 Dec 2007 14:11:00 GMT |

DotNet Visual C Hot Answers

DotNet Visual C New questions

DotNet Visual C Related Categories