Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


How to Convert between Hwnd and WinID Functions

Keywords:    Hwnd WinID conversions

;=============================cut==========================
winid=WInIdGet("WinBatch Studio")   ; WinState likes these
hwnd=DllHwnd("WinBatch Studio")	   ; Control manager uses this kind
Message(winid,hwnd)	       ; show the two different types
;Convert
AddExtender("WILX34I.DLL")
hexnum=xBaseConvert(hwnd,10,16)	 ; convert to hex
hexnum=StrFixLeft(hexnum,"0",8)
hexnum=strcat("#WIN$ID#",hexnum)
Message(winid,hexnum)

Message("WinState",WinState(hexnum))

Note: The Control Manager Extender has the function cWinIdConvert that can do this easier.


Article ID:   W13369
Filename:   Hwnd to WinID Function Conversions.txt