Using OnNcHItTest for a CWnd not CDialog
Posted
by dev ray
on Stack Overflow
See other posts from Stack Overflow
or by dev ray
Published on 2010-03-23T13:31:15Z
Indexed on
2010/03/23
13:33 UTC
Read the original article
Hit count: 387
I have a CWnd Derived object used in a dialog. I need to be able to drag it anywhere in the dialog. I have a code overriding OnNCHitTest for moving a dialog dragging it from a place other than the title bar. Is there any equivalent code to do the same to move this CWnd. The following code isnt working.
UINT CBaseSliderBtn::OnNcHitTest(CPoint point) { UINT ret=CWnd::OnNcHitTest( point ); if (ret == HTCLIENT) return HTCAPTION;
}
If this isn't the right way, please suggest other optimum method to drag the slider. Thanks
© Stack Overflow or respective owner