Skip to content

QueryObject

Claude edited this page Oct 27, 2026 · 8 revisions
BlitzPlus

QueryObject

QueryObject:Int32 object:Int32, query_id:Int32
Parameter Type Default Description
object Int32 required A window, gadget or font.
query_id Int32 required

Description

In the original it gives the Windows handle behind a gadget (query 1 is the HWND, 2 the HWND of the client area, 3 the HFONT), so it can be used with the Windows API.

Differences

  • All gadgets are drawn inside the one window of the program, so queries 1 and 2 give the handle of that window (an HWND on Windows) for every gadget. Fonts (3) have no handle of the operating system and give 0, and so does anything that is not a gadget.

Examples

Graphics 320, 240, 32, 2
win = CreateWindow("Query", 20, 20, 240, 100, Desktop(), 3)
SetGadgetText win, "Handle " + QueryObject(win, 1)
Repeat
Until WaitEvent() = $803

Related Commands

PauseTimer, Proceed, ResetTimer, ResumeTimer

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally