vc 文本输出
switch (message) /* handle the messages */ { case WM_COMMAND: switch (LOWORD(wParam)) { case HELP_WAY1: 、、SetWindowText(hwnd,TEXT("i love you")); //TextOut(hdc, TEXT("woshihebin"), lstrlen("woshihebin"), &rt, DT_CENTER); // EndPaint(hwnd, &ps); break; case IDM_EXIT: DestroyWindow(hwnd); break; /*case IDM_love: TextOut(hdc,0,50,"i love you!",strlen("i love you!")); break;*/ default: return DefWindowProc(hwnd, message, wParam, lParam); } break; case WM_PAINT: hdc = BeginPaint(hwnd, &ps); SetTextColor(hdc,RGB(255,0,0)); /* TODO: Add any drawing code here... */ GetClientRect(hwnd, &rt); DrawText(hdc, szHello, lstrlen(szHello), &rt, DT_CENTER); EndPaint(hwnd, &ps); break; case WM_DESTROY: PostQuitMessage (0); /* send a WM_QUIT to the message queue */ break; default: /* for messages that we don't deal with */ return DefWindowProc (hwnd, message, wParam, lParam); } return 0;}