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: