菜鸟问题,GetDlgItem()->EnableWindow()编译时出错,大家帮帮忙,谢谢!
sct02 2003-12-26 01:13:01
基于对话框的工程名为Server,为什么在ServerDlg.cpp中
语句GetDlgItem(IDC_Receive)->EnableWindow(1);能通过编译,
但在同一工程的MySocket.cpp中,
语句GetDlgItem(IDC_Receive)->EnableWindow(1);编译时出错:
'GetDlgItem' : function does not take 1 parameters
left of '->EnableWindow' must point to class/struct/union
其中IDC_Receive是对话框中一按钮的ID,
这种错误一般是什么原因引起的?怎么改?我在MySocket.cpp中加了
#include <afxwin.h>
#include <afxdlgs.h>
也不管用,大家帮帮忙?