HWND CreateWindow( LPCTSTR lpClassName, // registered class name LPCTSTR lpWindowName, // window name DWORD dwStyle, // window style int x, // horizontal position of window int y, // vertical position of window int nWidth, // window width int nHeight, // window height HWND hWndParent, // handle to parent or owner window HMENU hMenu, // menu handle or child identifier HINSTANCE hInstance, // handle to application instance LPVOID lpParam // window-creation data ); 注意到了吗,第一个参数数是一个字符串指针,因此就要象SuperProgMan(编程者)所说的那样要在LISTBOX上加上引号。
你可用VC向导生成一个Win32 Application.
看看他的CreateWindow.
LPCTSTR lpClassName, // registered class name
LPCTSTR lpWindowName, // window name
DWORD dwStyle, // window style
int x, // horizontal position of window
int y, // vertical position of window
int nWidth, // window width
int nHeight, // window height
HWND hWndParent, // handle to parent or owner window
HMENU hMenu, // menu handle or child identifier
HINSTANCE hInstance, // handle to application instance
LPVOID lpParam // window-creation data
);
注意到了吗,第一个参数数是一个字符串指针,因此就要象SuperProgMan(编程者)所说的那样要在LISTBOX上加上引号。