如何让对话框程序中的文本控件和输入框控件变灰并不可用? 如何让对话框程序中的文本控件和输入框控件变灰并不可用? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 GetDlgItem(ID_XXX)->EnableWindow(FALSE); 调用GetDlgItem(ID_XXX)->EnableWindow(FALSE);之前是不是要先获得窗口句柄?我调用窗口的方法是这样的: CChangUserPin m_hChangUserPin; int iRet = m_hChangUserPin.DoModal(); switch( iRet ) { case -1: MessageBox( "对话框不能被创建起来!", "错误信息", MB_OK | MB_ICONEXCLAMATION ); return; case IDABORT: return; case IDOK: //接受cstring值,并传入函数参数中 strncpy(oldUsrPin,(LPCTSTR)m_hChangUserPin.m_OldPin,sizeof(oldUsrPin)); strncpy(newUsrPin,(LPCTSTR)m_hChangUserPin.m_NewPin,sizeof(newUsrPin)); (GetDlgItem(IDC_display ))->SetWindowText( "ChgUsrPin函数返回成功!" ); break; case IDCANCEL: return; default: return; } ::GetDlgItem可以根据窗口hwnd和控件ID获得 是这样吗?(::GetDlgItem(m_hChangUserPin.m_hWnd,IDC_STATIC02))->SetWindowText( "GetKeyInfo函数返回成功!" ); 编译出错:Memory_key_testDlg.cpp(424) : error C2039: 'EnableWindow' : is not a member of 'HWND__' IT公司招聘应届毕业生一般有什么要求 线程是如何被系统调用的呢 大家好,能帮我解决一个很菜很急的问题吗? 求教高手:怎么将半角字符转换为全角字符? 编译出现stack overflow怎么办啊? 结合word编程的疑问 为什么在win2000下编写的程序在win98下不能正常运行? 进程管理 我要用CDatabase类执行一个带输入参数的存储过程,怎么做? 获取某字段最大值失败 如何在MFC AppWizard(exe)中同时选择container与CHtmlView视图基类? 类型转换(在线等)??
之前是不是要先获得窗口句柄?
我调用窗口的方法是这样的: CChangUserPin m_hChangUserPin;
int iRet = m_hChangUserPin.DoModal();
switch( iRet )
{
case -1:
MessageBox( "对话框不能被创建起来!", "错误信息", MB_OK | MB_ICONEXCLAMATION );
return;
case IDABORT:
return;
case IDOK:
//接受cstring值,并传入函数参数中
strncpy(oldUsrPin,(LPCTSTR)m_hChangUserPin.m_OldPin,sizeof(oldUsrPin));
strncpy(newUsrPin,(LPCTSTR)m_hChangUserPin.m_NewPin,sizeof(newUsrPin));
(GetDlgItem(IDC_display ))->SetWindowText( "ChgUsrPin函数返回成功!" );
break;
case IDCANCEL:
return;
default:
return;
}
(::GetDlgItem(m_hChangUserPin.m_hWnd,IDC_STATIC02))->SetWindowText( "GetKeyInfo函数返回成功!" );
Memory_key_testDlg.cpp(424) : error C2039: 'EnableWindow' : is not a member of 'HWND__'