创建一个 Button
HWND hwndButton
hwndButton = CreateWindow(
" BUTTON", // predefined class 不区分大小写
"OK", // button text
WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, // styles 注意 如果样式写错了 Button 将不会正常显示
// Size and position values are given explicitly, because
// the CW_USEDEFAULT constant gives zero values for buttons.
10, // starting x position
10, // starting y position
100, // button width
" BUTTON", // predefined class 不区分大小写
"OK", // button text
WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, // styles 注意 如果样式写错了 Button 将不会正常显示
// Size and position values are given explicitly, because
// the CW_USEDEFAULT constant gives zero values for buttons.
10, // starting x position
10, // starting y position
100, // button width