11-11-2013, 06:18 PM
When I actually tried this, I got bad RT error that closes the dialog:
Exception 0xC00000FD. A new guard page for the stack cannot be created. In ntdll.dll at 0x76EFE04E (0x76ED0000+0x2E04E). ?
But then I saw that this exact issue was already addressed in forum:
http://www.quickmacros.com/forum/showthr...p?tid=1644
So, as suggested using Simple ComboBox this would be the easier and more effective way of getting this exact functionality (it turns out the internet url acts like a simple combo box too, so very appropriate suggestion by Gintaras from this other thread post. If I need to to do it for rich edit, I will set up the WM_APP asynchronous method, but this works for most of my dialogs very easily - and easy to setwintext/getwintext strings from simple combo box field without having to use CB_ functions.
Function Dialog8
Thanks all!
S
Exception 0xC00000FD. A new guard page for the stack cannot be created. In ntdll.dll at 0x76EFE04E (0x76ED0000+0x2E04E). ?
But then I saw that this exact issue was already addressed in forum:
http://www.quickmacros.com/forum/showthr...p?tid=1644
Quote:Edit box receives mouse button message after EN_SETFOCUS. You can PostMessage hDlg WM_APP 0 0, and on WM_APP (which must be in the first sel) set selection. Posted message arrives after the control receives mouse button message.
Easier way - use simple combo instead.
So, as suggested using Simple ComboBox this would be the easier and more effective way of getting this exact functionality (it turns out the internet url acts like a simple combo box too, so very appropriate suggestion by Gintaras from this other thread post. If I need to to do it for rich edit, I will set up the WM_APP asynchronous method, but this works for most of my dialogs very easily - and easy to setwintext/getwintext strings from simple combo box field without having to use CB_ functions.
Function Dialog8
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
out
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 223 135 "Dialog"
;3 ComboBox 0x54230641 0x0 24 14 96 14 ""
;4 ComboBox 0x54230641 0x0 24 38 96 14 ""
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2030605 "" "" "" ""
str controls = "3 4"
str cb3 cb4
if(!ShowDialog("Dialog8" &Dialog8 &controls)) ret
ret
;messages
sel message
,case WM_INITDIALOG
,,_s = "hello";_s.setwintext(id(3 hDlg))
,,_s = "goodbye";_s.setwintext(id(4 hDlg))
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
Thanks all!
S