www.pudn.com > SDK 工具条,分割条,TREE 等控件演示代码.rar > button.cpp
#include "WinMain.h"
#include "button.h"
//extern HWND hwnd;
extern HINSTANCE hInst;
HWND hwndButton;
HWND button(HWND hWndParent,int x,int y,int xx,int yy)
{
hwndButton = CreateWindow(
"BUTTON", // predefined class
"发送", // button text
WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, // styles
// Size and position values are given explicitly, because
// the CW_USEDEFAULT constant gives zero values for buttons.
x, // starting x position
y, // starting y position
xx, // button width
yy, // button height
hWndParent, // parent window
NULL,
hInst,// No menu
// (HINSTANCE) GetWindowLong(hwnd, GWL_HINSTANCE),
NULL); // pointer not needed
return hwndButton;
}