From Microsoft's site to see a simple method without calculation RECT, do not handle mouse message details and draw the window, you can easily move the window title bar is not the problem, is to use OnNcHitTest news.
Hand to increase the message map:
Can not increase the use of classwizard message, add a message in BEGIN_MESSAGE_MAP ON_WM_NCHITTEST (), and then add in the header file
afx_msg UINT OnNcHitTest (CPoint point);
In the implementation file, add LBUTTONDOWN message function
void CClyzDlg:: OnLButtonDown (UINT nFlags, CPoint point)
(
CTranDialog:: OnLButtonDown (nFlags, point); / / to change your base class CTranDialog
PostMessage (WM_NCLBUTTONDOWN, HTCAPTION, MAKELPARAM (point.x, point.y));
)
Join NCHITTEST message function
UINT CClyzDlg:: OnNcHitTest (CPoint point)
(
UINT nHitTest = CTranDialog:: OnNcHitTest (point); / / to change your base class CTranDialog
return (nHitTest == HTCLIENT)? HTCAPTION: nHitTest;
)
Compile and run, no error is complete, took less than 10 lines of code.
I used the dialog-based applications, in vc6.0, winnt4.0 compile and run well.
Recommended links:
Brief Vehicles - Screen Savers
Active X Wizard
PHOTOSHOP And Seamless Texture
CGI teaching: CGI environment variables used
CSS Syntax Guide (4) text fill, borders, boundaries and location of the property (2)
Understanding of EIP
MSN's new fashion derivative can invite friends online to listen to music all day
Remodeling "value stream"
RMVB to MPEG
factors of 9 2
Dell shipped the wrong price is not The defendant of fraud: frozen funds
M2TS converter
Beijing: a comprehensive modernization of education promote capital
Evaluate File COMPRESSION
Professional human resources workers 132 Tool - factors into account point method
TS To MPG
No comments:
Post a Comment