RE: -Sigh-
- Posted by Derek Parnell <ddparnell at bigpond.com> Feb 07, 2001
- 373 views
Paul, try this example.... -------------------------- include win32lib.ew without warning integer mainwin, msgwin integer btn1, btn2 integer text1, text2 sequence msgtext msgtext = "" procedure ShowMessage() -- Get any text typed in (just to show something) msgtext = getText(text2) -- Copy this to the message area setText(text1, msgtext) -- Show the message window (msgbox) and wait for it to close. openDialog(msgwin) end procedure procedure CloseMessage() -- Close the message window closeWindow(msgwin) end procedure procedure Start() -- Create the main window with a text area and a button. mainwin = create(Window, "Message Window Test Program", 0, 0,0, 400, 200,0) text2 = create(EditText, "", mainwin, 20, 55, 270, 30, 0) btn1 = create(PushButton, "Msg", mainwin, 20, 20, 30, 30, 0) -- Create a message window with a text (readonly) area and a button. msgwin = create(Window, "MESSAGE", 0, 200, 300, 300, 120, {WS_DLGFRAME}) btn2 = create(DefPushButton, "&Close", msgwin, 20, 20, 40, 30, 0) text1 = create(EditText, "", msgwin, 20, 55, 270, 30, ES_READONLY) -- Define what to do when btn1 is clicked. onClick[btn1] = routine_id("ShowMessage") -- Define what to do when btn2 is clicked. onClick[btn2] = routine_id("CloseMessage") -- Get the show on the road. WinMain( mainwin, Normal) end procedure -- start the example running. Start() ------------------------ cheers, Derek Parnell derekp at solace.com.au