Hi !
i try to figure out which RichEditGadget is active. Is there a function who give me the right RichEditHadget ID/Handle ?
MFG
WolfgangS
What i did...
Code: Select all
#ID_MWindow.l =0 ; ID Mother Window
#ID_MPanel.l =1 ; ID Mother Panel
#ID_Frame3d.l =2 ; ID Frame3d
dID_Rich.l =500 ; dynamic ID RichGadget
hnd_MWindow.l =0
hnd_rich0.l =0
hnd_rich1.l =0
hnd_MWindow=OpenWindow(#ID_MWindow,100,100,640,480,#PB_Window_SystemMenu,"Bla")
If CreateGadgetList(WindowID())
PanelGadget(#ID_MPanel,0,28,640,365)
AddGadgetItem(#ID_MPanel,-1,"Info")
Frame3DGadget(#ID_Frame3d,0,0,640,300,"bla",0)
hnd_Rich0=OpenRichEdit(GadgetID(#ID_Frame3d),dID_Rich,0,0,635,290,"RichEdit No "+Str(dID_Rich)):dID_Rich+1
AddGadgetItem(#ID_MPanel,-1,"Info")
Frame3DGadget(#ID_Frame3d,0,0,640,300,"bla",0)
hnd_Rich1=OpenRichEdit(GadgetID(#ID_Frame3d),dID_Rich,0,0,635,290,"RichEdit No "+Str(dID_Rich)):dID_Rich+1
ClosePanelGadget()
Else : End
EndIf
Repeat
Event=WaitWindowEvent()
;if ?????=hnd_Rich0 ; true if RichRadget 0 is ACTIVE
If Event=#WM_CHAR
beep_(1000,80)
EndIf
;EndIf
;if ?????=hnd_Rich1 ; true if RichRadget 1 is ACTIVE
If Event=#WM_CHAR
beep_(2000,80)
EndIf
;EndIf
Until Event=#PB_EventCloseWindow