请教一个关于EDIT控件问题 在线等
LRESULT CALLBACK DlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam){
HDC hdc = ::GetDC(hWnd);
switch(message)
{
case WM_COMMAND:
{
UINT wID = LOWORD(wParam);
UINT wDWORD = HIWORD(wParam);
if (wID == IDOK || wID == IDCANCEL)
{
EndDialog(hWnd, LOWORD(wParam));
return TRUE;
}
if(wID == IDC_EDIT_NAME)
{
if(wDWORD == EN_UPDATE )
{
//我想在这里限定在EDIT控件输入一定的字符和数字 应该怎么限定
}
}
}
break;
}
return 0;
}
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_COMMAND:
{
UINT wID = LOWORD(wParam);
if(wID == IDC_MENU_INPUT)
{
DialogBox(hInst, (LPCTSTR)IDD_DIALOG, hWnd, (DLGPROC)DlgProc);
}
}
break;
case WM_DESTROY:
::PostQuitMessage(0);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
return 0;
}