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++ Widgets - General questions or Mixed problems » why the ctrl does`t have HWND?
Re: why the ctrl does`t have HWND? [message #46393 is a reply to message #46390] Wed, 04 May 2016 22:24 Go to previous messageGo to previous message
Lance is currently offline  Lance
Messages: 656
Registered: March 2007
Contributor
Dig into GetHWND code, you will see that a Ctrl need to be top and no parent and be created to have non-null HWND.

In you case, if you call a Open() to have it created before calling to GetHWND(), you have a better chance to get what you want.


GUI_APP_MAIN
{
	MyApp a;
	DUMP(a.GetHWND());
	a.Open();
	a.Hide(); // call this if you don't want the window actually opened
	DUMP(a.GetHWND());
	
	
	a.Sizeable().MinimizeBox().MaximizeBox().Run();
}


Output

a.GetHWND() = 0x00000000
a.GetHWND() = 0x000402d8



HTH,

Lance
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: DropList color is the same when editable or not
Next Topic: ColumnList clipping problem
Goto Forum:
  


Current Time: Sat May 10 21:24:51 CEST 2025

Total time taken to generate the page: 0.03305 seconds