I have made a tab control, using the code from Jim Huguley's
MsgExe.Bas and it works beutifully. (Thanks, Jim -- you do say
"any comments welcome"
)
This tab control has three tab sheets, of which the third one has
another tab control with four tab sheets, all of which works
very well indeed. Until I started sub-classing the text boxes on
the various tab sheets.
The code now bombs as it is, giving an "illegal operation" --
invalid page fault in module <unknown> at 0000:00000013.
If the MsgBox AFTER is made active, it shows up before the
"illegal operation". When the rem'd items are activated it works
as expected without any trouble.
The m$ is made up of the several strings shown which contain the
str$ form of a largish number of text boxes (317 of them, which
are used elsewhere to distinguish between those containing money
values and those containing times in hours/minutes format
("12h:25m").
The reverse procedure (un-subclassing) use the same method.
This demonstrates what? The power of the MsgBox statement? Any
ideas are welcome!
------------------
MsgExe.Bas and it works beutifully. (Thanks, Jim -- you do say
"any comments welcome"

This tab control has three tab sheets, of which the third one has
another tab control with four tab sheets, all of which works
very well indeed. Until I started sub-classing the text boxes on
the various tab sheets.
The code now bombs as it is, giving an "illegal operation" --
invalid page fault in module <unknown> at 0000:00000013.
If the MsgBox AFTER is made active, it shows up before the
"illegal operation". When the rem'd items are activated it works
as expected without any trouble.
The m$ is made up of the several strings shown which contain the
str$ form of a largish number of text boxes (317 of them, which
are used elsewhere to distinguish between those containing money
values and those containing times in hours/minutes format
("12h:25m").
The reverse procedure (un-subclassing) use the same method.
This demonstrates what? The power of the MsgBox statement? Any
ideas are welcome!
Code:
m$=Trim$(DsMainCst$)+" " _ +Trim$(DsPrfsCst$)+" " _ +Trim$(DsPrfsTme$)+" " _ +Trim$(DsFilmCst$)+" " _ +Trim$(DsPhtsCst$)+" " _ +Trim$(DsPhtsTme$)+" " 'n&=Tally(m$, " ") 'Dim tst&(n&) 't$="Sequence test"+Chr$(10) 'x&=0 'While Val(m$)>0 ' Incr x& ' tst&(x&)=Val(m$) ' m$=Right$(m$,Len(m$)-Instr(m$," ")) ' Wend 'Array Sort tst&(1) For x& 'For i&=2 To x& ' If tst&(i&)-tst&(i&-1)<>1 Then t$=t$+Str$(i&)+Str$(tst&(i&-1))+Str$(tst&(i&))+Chr$(10) ' Next 'MsgBox(Str$(x&)+" / "+t$) While Val(m$)>0 n&=Val(m$) m$=Right$(m$,Len(m$)-Instr(m$," ")) hCtl&=GetDlgItem(hDlg&, n&) MainWndProc&=SetWindowLong(hCtl&,%GWL_WNDPROC,CodePtr(SetupSubProc)) Wend 'MsgBox("After") Case %WM_DESTROY DeleteObject RmFont& ' m$=Trim$(DsMainCst$)+" " ' m$=m$+Trim$(DsPrfsCst$)+" " ' m$=m$+Trim$(DsPrfsTme$)+" " ' m$=m$+Trim$(DsFilmCst$)+" " ' m$=m$+Trim$(DsPhtsCst$)+" " ' m$=m$+Trim$(DsPhtsTme$)+" " m$=Trim$(DsMainCst$)+" " _ +Trim$(DsPrfsCst$)+" " _ +Trim$(DsPrfsTme$)+" " _ +Trim$(DsFilmCst$)+" " _ +Trim$(DsPhtsCst$)+" " _ +Trim$(DsPhtsTme$)+" " DsMainCst$="" DsPrfsCst$="" DsPrfsTme$="" DsFilmCst$="" DsPhtsCst$="" DsPhtsTme$="" While Val(m$)>0 n&=Val(m$) m$=Right$(m$, Len(m$)-Instr(m$," ")) Control Handle hDlg&, n& To hCtl& SetWindowLong hCtl&,%GWL_WNDPROC, MainWndProc& Wend
Comment