WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Window Manipulation

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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
File Created: 2001:03:01:12:10:20
Last Updated: 2001:03:01:12:10:20