The MASM Forum

General => The Workshop => Topic started by: clamicun on January 17, 2015, 05:19:20 AM

Title: Setfocus again
Post by: clamicun on January 17, 2015, 05:19:20 AM
.data
ft_mask TCHAR '*.',0
IDC_EDIT = 100

.code
"
"
CallModalDialog hInstance,main_hWnd,dlg_FileTypes,0

dlg_FileTypes proc hWin:DWORD,uMsg:DWORD,wParam:DWORD,lParam:DWORD
.if uMsg == WM_INITDIALOG
                 
INVOKE SetDlgItemText,hWin,IDC_EDIT1,offset ft_mask
INVOKE SetFocus,rv(GetDlgItem,hWin,IDC_EDIT1)
"
"
--------------------------------------------------
Yes, the focus is on the editfield, but at the beginning.
Is it possible to get the focus after *.    ???

Thank you
Title: Re: Setfocus again
Post by: jj2007 on January 17, 2015, 05:45:13 AM
EM_SETSEL
Title: Re: Setfocus again
Post by: clamicun on January 17, 2015, 06:57:52 AM
JJ, good evening and many thanks

Invoke SendMessage,rv(GetDlgItem,hWin,IDC_EDIT1),EM_SETSEL,2,2