U++ framework
Do not panic. Ask here before giving up.

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: Mon Sep 28 10:26:51 GMT+2 2026

Total time taken to generate the page: 0.00825 seconds