
[GameWindow] Retrieve window handle
Posted Thursday, 8 October, 2009 - 14:03 by ghiboz| Project: | The Open Toolkit library |
| Version: | 0.9.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Hi! how can I retrieve the window handle of my game window??
thanks


Comments
#1
The window handle is not exposed, as it is an implementation detail. Even if it were part of the public API, you'd still need the display connection, device context or a number of other platform-specific parameters, which would still not be exposed.
OpenTK itself relies on IWindowInfo instances that contain all the necessary parameters. GameWindow provides a WindowInfo property that can be used with other OpenTK APIs (e.g. the GraphicsContext constructor).
Of course, this doesn't help if you need the handle for a non-OpenTK API. To that end, I must ask: what do you need the handle for?
#2
thanks, I tried to send a message to change the icon (my other post), but I think that the solution is to set the icon in a clean way and not with the sendmessage
thanks
#3
I found how to retrieve the window handle...
if someone needs this: