I am having a problem with text being highlighted in an edit control in a dialog,
thats being called from another dialog.
I have an dialog as main application in radasm, I am using this code in the wndproc to call a modal dialog,
when a user presses a button:
.elseif eax == IDC_VIEW
invoke DialogBoxParam, hInstance, IDD_VIEWDLG, hWnd, ADDR ViewDlgProc,NULL
That works fine.
The modal dialog only has an edit control and a button on it.
This is the dlg proc for the modal dialog:
ViewDlgProc proc hWin:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM
mov eax,uMsg
.if eax==WM_INITDIALOG
invoke SetDlgItemText,hWin,IDC_EDT1, hMem
.elseif eax==WM_COMMAND
mov eax,wParam
mov edx,eax
shr edx,16
and eax,0FFFFh
.if edx==BN_CLICKED
.if eax==IDC_BTNOK
invoke EndDialog,hWin,0
.endif
.endif
.elseif eax==WM_CLOSE
invoke EndDialog,hWin,0
.else
mov eax,FALSE
ret
.endif
mov eax,TRUE
ret
ViewDlgProc endp
The edit control displays the text as it should, but the text shows as being highlighted,
as if one were to select it to copy or delete it.The edit control is set as read only, and
this also happens when it is not set as read only.
Am I missing a setting in the resource file, or am I doing something wrong with the coding
of the dialog proceedure?
thanks,
Rags
Nevermind, I found my problem. The tabstop order was the problem.
I was just too tired last night to think enough to do a search....
shame on me :naughty: