is there any way that all the text in an edit box can be selected by just one click of the mouse in the box?...been trying all ways but to no avail... help will be greatly appreciated..
You can add handler for WM_ONLBUTTONDOWN for Your box IDC_YOUR_CONTROL_ID and enter in the handler this code:
GetDlgItem( IDC_YOUR_CONTROL_ID)->SetFocus( );
((CEdit*)GetDlgItem( IDC_YOUR_CONTROL_ID))->SetSel( 0, -1);
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.