I was under the impression that you were doing different buttons than the
normal minimize, maximize, and restore buttons.
AliR.
"AliR" <AliR@online.nospam> wrote in message
news:446a194c$0$23774$a8266bb1@reader.corenews.com...
Wouldn't removing the flags that display the original buttons be an
solution?
Not sure I follow you. Are you saying process the flags so I know what
buttons to paint but then remove them from the style? That makes sense I
guess. Where's the best place to do that, PreCreateWindow?
Anyway, If you want to move the window yourself then here is the code
(roughly)
Hey, now I'm feeling pretty smart as this is basically what I tried but it
didn't work quite right. I'll doublecheck my code as I just did a quick
pass at it before posting this message.
Thanks
void CMyDialog::OnNcLButtonDown(UINT nHitTest,CPoint Pint)
{
CDialog::OnNcLButtonDown(...);
SetCapture();
m_StartPoint = Point;
m_Captured = TRUE;
}
void CMyDialog::OnNcMouseMove(UINT nHitTest,CPoint Point)
{
CDialog::OnNcMouseMove(...);
if (m_Captured)
{
CSize Diff = Point - m_StartPoint;
CRect Rect;
GetWindowRect(&Rect);
GetParent()->ScreenToClient(&Rect);
SetWindowPos(NULL,Rect.left -
Diff.cx,Rect.top-Diff.cy,0,0,SWP_NOSIZE|SWP_NOZORDER);
}
}
void CMyDialog::OnNcLButtonUp(UINT nHitTest,CPoint Point)
{
CDialog::OnNcLButtonUp(...);
ReleaseCapture();
m_Captured = FALSE;
}
AliR.
"Eric Margheim" <NOSPAM***eric@prism-grp.com***NOSPAM> wrote in message
news:ewBgUgQeGHA.5040@TK2MSFTNGP03.phx.gbl...
In my custom CDialog I'm painting the non-client area and have to