VC ++ Programming Skill Set

Source: Internet
Author: User
The Code is as follows: voidCSys1View: OnDraw (CDC * pDC) {CSys1Doc * pDocGetDocument (); ASSERT_VALID (pDoc); TODO: Display WCHARszPath [MAX_PATH]; GetWindowsDirectoryW (szPath, sizeof (szPath); pD

The Code is as follows: void CSys1View: OnDraw (CDC * pDC) {CSys1Doc * pDoc = GetDocument (); ASSERT_VALID (pDoc); // TODO: add draw code for native data here // display the Windows directory WCHAR szPath [MAX_PATH]; GetWindowsDirectoryW (szPath, sizeof (szPath); pD

The Code is as follows:

Void CSys1View: OnDraw (CDC * pDC)
{
CSys1Doc * pDoc = GetDocument ();
ASSERT_VALID (pDoc );
// TODO: add draw code for native data here


// Display the Windows directory
WCHAR szPath [MAX_PATH];
GetWindowsDirectoryW (szPath, sizeof (szPath ));
PDC-> TextOut (100,100, "Windows Directory :");
PDC-> TextOut (250,100, szPath );

// Display the temp directory
Char tempPath [_ MAX_PATH + 1];
: GetTempPath (_ MAX_PATH, tempPath );
PDC-> TextOut (100,150, "temp Directory :");
PDC-> TextOut (250,150, tempPath );

// Display the system resolution
Char a1 [12], b1 [12];
CSize sizeScreen (GetSystemMetrics (SM_CXSCREEN ),
GetSystemMetrics (SM_CYSCREEN ));
Itoa (sizeScreen. cx, a1, 10 );
Itoa (sizeScreen. cy, b1, 10 );
PDC-> TextOut (100,200, "horizontal resolution :");
PDC-> TextOut (100,225, "vertical resolution :");
PDC-> TextOut (250,200, a1 );
PDC-> TextOut (250,225, b1 );
}

As follows:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.