Can anyone see what is wrong with this function? Its simple but just
doesnt work.
Trying to send a custom message to my control but nothing is happening.
I cant even get a _drawCtlMsg msg to be recognized.
Any ideas.
W.
CLEAR LOCAL
LOCAL FN addTestData(btnID,theStr$,draw%)
DIM btnHndl&,cntrlDefH&,hState%,osErr%
DIM procPtr&,message%,parm&,variant%
DIM msPt.4
msPt.h = 30
msPt.v = 40
btnHndl& = BUTTON&(btnID)
LONG IF btnHndl&
'cntrlDefH& = [[btnHndl&]+ _contrlDefHandle]
cntrlDefH& = btnHndl&..contrlDefHandle&
hState% = FN HGETSTATE(cntrlDefH&)
osErr% = FN HLOCK(cntrlDefH&)
procPtr& = [cntrlDefH&]
_addSome = 30
variant% = FN GETCVARIANT(btnHndl&)
'CALL procPtr&(% variant%,btnHndl&,% _addSome,@theStr$)
'ENTERPROC%(varCode%,cHndl&,message%,param&)
'BEEP
'LONG IF draw% = _true
parm& = 0 'clear parameter and
draw entire control
CALL procPtr&(% FN GETCVARIANT(btnHndl&),btnHndl&,%
_drawCtlMsg,@parm&)
'END IF
osErr% = FN HSETSTATE(cntrlDefH&,hState%)
END IF
END FN