beautypg.com

Sample program, 5 sample program – Casio PA-2400W User Manual

Page 38

background image

38

5.5 Sample

Program

This sample program is created with the method of “Multiple-Thread Mode” under development

environment of Visual C++ 5.0 plus and Windows CE SDK/DDK.

It introduces the IOBOX1.C program and its reference sources, and shows a list of environment variables.

// windows ce iobox sample file

#include
#include

#include "iobox1.h"

VOID ioProc( void);

TCHAR szAppName[ ] = TEXT("Hello Windows CE");

TCHAR szTitle[ ] = TEXT("PA-2400 I/O BOX TEST");

LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);

HINSTANCE hInst = NULL;
HWND

hWndCB = NULL;

HANDLE hWnd;

HANDLE h;

const int WINDOW_WIDTH = 480;

const int WINDOW_HEIGHT = 214;

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR

lpCmdLine, int nCmdShow )

{

// HWND hWnd;

MSG msg;

WNDCLASS wc;

wc.style = 0L;
wc.lpfnWndProc = (WNDPROC) WndProc;

wc.cbClsExtra = 0;

wc.cbWndExtra = 0;

wc.hInstance = hInstance;
wc.hIcon = NULL;

wc.hCursor = NULL;

wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH);

wc.lpszMenuName = NULL;
wc.lpszClassName = szAppName;

RegisterClass(&wc);