Time: ctime m_systime = ctime :: getcurrenttime (); setdlgitemtext (idc_static_time, m_systime.format ("% y year% M month% D day% h:% m:% s"));
The dialog box adds the following code in InitDialog ("Hello!" / / Modify Title ModifyStyle (WS_CAPITION, WS_MINIMIMIZEBOX, SWP_DRAWFRAMW); m_brush.createsolidbrush (RGB (0, 0, 0)); // Modify the background color Targes to send Message (WM_CLOSE); // Close PostMessage (WM_NCLBUTTONDOWN, HTCAPTION, MAKELPARAM (Point.x, Point.y)); // Move the method of moving the None Title dialog Create a screen device environment CDC * PDC = Getdc (); // Draw a Customer CDC * PDC = getWindowDC (); // Drawing a non-client CDC * PDC = CDC :: fromHandle (:: getDc (null)); // Draw the entire screen CDC DC; DC. CreateCompaTibleDC (HDC, HDC); // Create a device environment / / to draw a bitmap, you must create a bitmap, and enclose the device with bitmap CDC DC DC; // CREATE CDC Object CBitmap bitmap; // Create CBitmap Object dc.CreateCompatibleDC (pDC); // Create Devic Contextobject bitmap.CreateCompatibleBitmap (pDC, ICON_WIDTH, ICON_HEIGHT); // Create Bitmap Object dc.SelectObject (& bitmap); // point memmory Device Context // To this bitmap dc.deletedc ();