Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » GetHWND() always returns NULL?
GetHWND() always returns NULL? [message #15444] Wed, 23 April 2008 22:57 Go to next message
cdoty is currently offline  cdoty
Messages: 23
Registered: April 2008
Location: Houston, TX
Promising Member

Under Windows, GetHWND() always returns NULL. How can I get the HWND of a control?

I've tried to get the handle during the control constuctor, during a Paint, and during the constructor for the App.


a3e77f341aa1d91d0388a0c8b786e8b5

[Updated on: Wed, 23 April 2008 22:59]

Report message to a moderator

Re: GetHWND() always returns NULL? [message #15445 is a reply to message #15444] Wed, 23 April 2008 23:08 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
cdoty wrote on Wed, 23 April 2008 16:57

Under Windows, GetHWND() always returns NULL. How can I get the HWND of a control?

I've tried to get the handle during the control constuctor, during a Paint, and during the constructor for the App.


You can't. Ctrls do not have HWND Wink

Only top-level Ctrls have one or DHCtrl derived widgets (like GLCtrl).

Mirek
Re: GetHWND() always returns NULL? [message #15446 is a reply to message #15445] Wed, 23 April 2008 23:12 Go to previous messageGo to next message
cdoty is currently offline  cdoty
Messages: 23
Registered: April 2008
Location: Houston, TX
Promising Member

luzr wrote on Wed, 23 April 2008 16:08

You can't. Ctrls do not have HWND Wink

Only top-level Ctrls have one or DHCtrl derived widgets (like GLCtrl).



Any suggestions on working with a library that can draw video to a window?


a3e77f341aa1d91d0388a0c8b786e8b5
Re: GetHWND() always returns NULL? [message #15447 is a reply to message #15446] Wed, 23 April 2008 23:30 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
DHCtrl.

It is special Ctrl intended to serve as base class for widgets that require having HWND.

Check GLCtrl, IMO similar situation.

Mirek
Re: GetHWND() always returns NULL? [message #15452 is a reply to message #15447] Thu, 24 April 2008 17:27 Go to previous message
cdoty is currently offline  cdoty
Messages: 23
Registered: April 2008
Location: Houston, TX
Promising Member

luzr wrote on Wed, 23 April 2008 16:30

DHCtrl.

It is special Ctrl intended to serve as base class for widgets that require having HWND.



Thanks. That worked great, even as a control within a tab.


a3e77f341aa1d91d0388a0c8b786e8b5
Previous Topic: Problem when sorting arrays of arrays
Next Topic: BlockStream::_Get does not buffer data (current svn version)
Goto Forum:
  


Current Time: Tue May 07 13:32:34 CEST 2024

Total time taken to generate the page: 0.02775 seconds