On 12/9/2000 at 3:58 PM Robert Dickow wrote:
>I just started playing with the [RICHBOX dialog box template to try to
>create a richtext edit box. I can't quite get the dialog box containing the
>rich edit control to be created. It seems to quietly exit. Substitution of
>[EDITBOX for the above in the template results in complete success. I must
>be missing some crucial initialization stuff. Has anybody had success
>creating a 'richbox' edit control using the swforth dialog box template
>structures?
Bob,
Before attempting to load a dialog which has a richedit control,
you must load the richedit library. Notice the code in the defintion
of Rich.
Hope this helps,
Rick
DIALOG Rich-TEMPLATE
[MODAL " Rich" 20 20 205 155 ]
[DEFPUSHBUTTON " OK" 1 130 140 32 12 ]
[PUSHBUTTON " Cancel" 2 168 140 32 12 ]
[RICHBOX " ?" 100 2 2 200 136 ]
END-DIALOG
[SWITCH Rich-COMMANDS DROP ( wparam -- )
IDOK RUN: HWND 0 EndDialog ;
IDCANCEL RUN: HWND 0 EndDialog ;
SWITCH]
[SWITCH Rich-MESSAGES ZERO ( msg -- res )
WM_COMMAND RUN: WPARAM LOWORD Rich-COMMANDS ;
SWITCH]
:NONAME ( -- res ) MSG LOWORD Rich-MESSAGES ; 4 CB: Rich-CALLBACK
: Rich ( hwnd -- res ) Z" RICHED32.DLL" LoadLibrary .
HINST Rich-TEMPLATE ROT Rich-CALLBACK 0 DialogBoxIndirectParam ;
: GO ( -- ) HWND Rich DROP ;
Received on Mon Dec 11 2000 - 08:24:59 PST
Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!
This archive was generated 08-Feb-2012. Archive updated nightly.