Vortex86DX-MSJK Windows Embedded CE 6.0 R3 Jump Start Rev 2.2
Page 55 of 144
Add Codes and Build the Application Project
With the
VS2005_Win32_HelloWorld
project active, the VS2005 IDE should look similar to the IDE
as shown in Figure 43.
Fig. 43 -
VS2005 IDE with VS2005_Win32_HelloWorld project active
Work through the following steps to add some code to the
VS2005_Win32_HelloWorld
project:
•
From the VS2005 IDE’s Solution Explorer tab, double click on the
VS2005_Win32_HelloWorld.cpp
file, in the
\Source Files
folder to view and edit the codes
in the center code editor window.
•
Replace the codes in the “
case WM_PAINT:”
statement with the following codes, as shown
in Figure 44.
Case WM_PAINT:
//
RECT rect;
GetClientRect (hWnd, &rect);
Hdc = BeginPaint(hWnd, &ps);
DrawText (hdc, TEXT ("Hello World Win32 Native Application!"), -1, &rect,
DT_CENTER | DT_VCENTER | DT_SINGLELINE);
EndPaint(hWnd. &ps);
break;