|
Post by Walt Decker on Mar 30, 2022 8:49:24 GMT -5
Found this by thinking of a way to create a window using the same code with different handle tags and without using the MAPHANDLES function. I thought "Since I can get the numeric handle from a string variable using HWND(#Tag$), maybe I can use a string tag to create a window and its controls."
The window is created but the controls are not. Judging from the function returned value I think this is a left-over from a development phase.
Given:
' GfxTag$ = "#DMO.GFX" WinTag$ = "#DMO" TmpTag$ = FN.CreateWin$("PARSE ERROR DMO", GfxTag$, WinTag$) PRINT TmpTag$, WinTag$ WAIT
'-------------------------------------------------------------- '--------------------------------------------------------------
SUB END.DMO WinTag$ PRINT WinTag$ CLOSE #WinTag$ '<--- bad handle: #WinTag1 see error log END END SUB
'-------------------------------------------------------------- '--------------------------------------------------------------
FUNCTION FN.CreateWin$(Title$, GfxTag$, WinTag$)
PRINT WinTag$ 'TmpTag$ = WinTagS '<--- ERROR: Type Mismatch
STYLEBITS #GfxTag$, 0, _WS_BORDER, 0, 0 '<--- SHOULD STOP HERE 'GRAPHICBOX #GfxTag$, 0, 0, 100, 100 '<--- ERROR: handle needs extension GRAPHICBOX #DMO.GFX, 0, 0, 100, 100
OPEN Title$ FOR WINDOW AS #WinTag$ '<--- SHOULD STOP HERE PRINT #WinTag$, "TRAPCLOSE END.DMO"
FN.CreateWin$ = WinTag$ END FUNCTION '
|
|