Posted: Sat Mar 29, 2003 4:36 pm
Restored from previous forum. Originally posted by Saboteur.
I get an error in the next code, in SetGadgetText command. Is possible use normal commands in callback procedures? or is my problem only?
I have Win98.
I get an error in the next code, in SetGadgetText command. Is possible use normal commands in callback procedures? or is my problem only?
I have Win98.
Code: Select all
Procedure WindowCallback(WindowID, Message, wParam, lParam)
Result=#PB_ProcessPureBasicEvents
UseWindow(0)
SetGadgetText(1,"Bye")
ProcedureReturn Result
EndProcedure
If OpenWindow(0,200,200,300,300,#PB_Window_SystemMenu,"Demo")
CreateGadgetList(WindowID())
StringGadget(1,10,10,100,20,"Hello")
SetWindowCallback(@WindowCallback())
EndIf
Repeat
Until WaitWindowEvent()=#PB_Event_CloseWindow
End