LRESULT CALLBACK MyButton(HWND hDlg,UINT msg,
WPARAM wParam,LPARAM lParam);
hWndButton =CreateWindowEx(0L,"button",NULL,
(long)0|WS_CHILD|WS_VISIBLE,100,0,30,20,
hWnd,NULL,cs->hInstance,NULL);
我用SetWindwoLong,
SetWindowLong(hWndButtonDWL_DLGPROC,(long)MyButton);
但不行,不知为什么?
你的方法是对的,我也曾经这样做过,没问题。不过好像在hWndButton后面漏了一个逗号,还有就是DWL_DLGPROC应该写成GWL_WNDPROC.