After reading a video tutorial from Sun Xin one day, I found that in fact, using MFC for programming in VC ++ can also intercept messages and establish messages
Map to process messages.
Hey, I testedCode.
We found that XP and 2000 have different ranges for handling customer zones.
Void cdrawview: onlbuttonup (uint nflags, cpoint point) {// todo: add your message handler code here and/or call default // * use a global function to implement the draw line function */* HDC; HDC =: getdc (this-> m_hwnd),: movetoex (HDC, m_point.x, m_point.y, null);: lineto (HDC, point. x, point. y);: releasedc (m_hwnd, HDC ); * /// // * use the CDC class to implement the draw line function * // * CDC * PDC = getdc (); PDC-> moveTo (m_point); PDC-> lineto (point); releasedc (PDC ); * //// // * use the cclientdc class to implement the wire draw function * // * cclientdc DC (this); DC. moveTo (m_point.x, m_point.y); DC. lineto (point); * // * cclientdc (getparent (); DC. moveTo (m_point); DC. lineto (point); * // * use the cwindowdc class to draw lines * // * cwindowdc DC (this ); DC. moveTo (m_point); DC. lineto (point); * // * cwindowdc (getmediatopwindow (); DC. moveTo (m_point); DC. lineto (point); DC. textout (100,100, "volcanol", strlen ("volcanol ")); * ////////// // * draw a colored line * // use the cpen class for color drawing/* cpen pen (ps_solid, 5, RGB (123,); cclientdc DC (this); cpen * oldpen = dc. selectObject (& pen); DC. moveTo (m_point); DC. lineto (point); DC. selectObject (& oldpen); * // * use the paint brush to draw the image * // * cbrush brush (RGB (, 23, 255); // create a painter cclientdc (this); // obtain the device content DC in the customer's region. fillrect (crect (m_point, point), & brush ); // fill the area * // * use bitmap to draw a map * // * cbitmap bitmap; bitmap. loadbitmap (idb_bitmap1); cbrush brush (& Bitmap); cclientdc DC (this); // obtain the device content DC in the customer region. fillrect (crect (m_point, point), & brush); // fill area */
If you are familiar with MFC and winapi, use VC to develop an application.ProgramIt's quite quick,
Use MFC to create an interface, and use winapi to implement applications.
In fact, you can implement a program architecture through your own encapsulation.