2007.04.05 Thursday
16:58 | posted by
gardener
LRESULT CALLBACK WndProc( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam )
{
PAINTSTRUCT ps;
HDC hdc;
wchar_t wstr[256];
int x=10, y=10;
switch ( message )
{
case WM_PAINT:
hdc = BeginPaint(hWnd, &ps);
// TODO: 描画コードをここに追加してください...
SetTextColor( hdc, RGB( 128, 128, 128 ) ); // 文字色の色
SetBkMode( hdc, TRANSPARENT ); // 文字の背景を透明にする
wsprintf( wstr, L"x=%d y=%d", x, y ); // 数値の文字列化
TextOut( hdc, 10, 10, wstr, ( int )wcslen( wstr ) ); // 文字列を表示
EndPaint( hWnd, &ps );
break;
}
return 0;
}
Trackbacks
Trackback URL : http://gardener.hustle.ne.jp/programming/sb.cgi/80
Comments