PreTranslateMessage() 에 다음과 같이 설정해 주면, EditBox를 클릭시 전체 선택이 된다.
BOOL CTestDlg::PreTranslateMessage(MSG* pMsg)
{
CEdit *webmacrotext = (CEdit *)GetDlgItem(IDC_WEBMACROTEXT);
if(pMsg->message == WM_LBUTTONDOWN && pMsg->hwnd==webmacrotext->m_hWnd &&
GetFocus()->m_hWnd != webmacrotext->m_hWnd )
{
webmacrotext->SetFocus();
webmacrotext->SetSel(0,-1,true);
return true;
}
return CDialog::PreTranslateMessage(pMsg);
}



Prev
Rss Feed