#include #include int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { MSG msg; HWND hwnd, updn, edit; InitCommonControls(); hwnd = CreateWindow("STATIC", "Main", WS_OVERLAPPEDWINDOW | WS_VISIBLE, 0, 0, 100, 100, NULL, NULL, NULL, NULL); edit = CreateWindow("EDIT", 0, WS_VISIBLE|WS_CHILD, 0, 0, 25, 15, hwnd, NULL, NULL, NULL); updn = CreateWindow(UPDOWN_CLASS, 0, UDS_SETBUDDYINT|WS_VISIBLE|WS_CHILD, 25, 0, 25, 15, hwnd, NULL, NULL, NULL); SendMessage(edit, WM_SETTEXT, 0, (LPARAM)"10"); SendMessage(updn, UDM_SETBUDDY, (WPARAM)edit, 0); while (GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } DestroyWindow(hwnd); return 0; }