Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Having my HWND and eating it, too...
Re: Having my HWND and eating it, too... [message #12097 is a reply to message #12095] |
Wed, 10 October 2007 21:56   |
Oblivion
Messages: 1211 Registered: August 2007
|
Senior Contributor |
|
|
From where do you get a handle to your window?
If it is your applications main window, (if you are using e.g. mainwindow.run()) you shouldn't try to get a handle to your window in class constructor (unless you explicitly call Open() or OpenMain() -- which, in this case (if you already call run() in your apps main()) you shouldn't use).
You could use instead something safer:
HWND MainWindow::GetHandle()
{
return GetHWND(); // use IsOpen() to check before calling;
}
or
HWND MainWindow::GetHandle()
{
return IsOpen() ? GetHWND() : null; // handle null as an error;
}
and call whenever it's needed.
Github page: https://github.com/ismail-yilmaz
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Wed, 10 October 2007 22:14] Report message to a moderator
|
|
|
 |
|
Having my HWND and eating it, too...
|
 |
|
Re: Having my HWND and eating it, too...
By: Oblivion on Wed, 10 October 2007 21:56
|
 |
|
Re: Having my HWND and eating it, too...
|
 |
|
Re: Having my HWND and eating it, too...
By: Oblivion on Wed, 10 October 2007 22:31
|
 |
|
Re: Having my HWND and eating it, too...
|
 |
|
Re: Having my HWND and eating it, too...
By: Oblivion on Wed, 10 October 2007 22:50
|
 |
|
Re: Having my HWND and eating it, too...
|
 |
|
Re: Having my HWND and eating it, too...
By: Oblivion on Wed, 10 October 2007 23:11
|
 |
|
Re: Having my HWND and eating it, too...
|
 |
 |
Re: Having my HWND and eating it, too...
|
 |
|
Re: Having my HWND and eating it, too...
By: mirek on Fri, 12 October 2007 00:09
|
Goto Forum:
Current Time: Thu Jun 12 20:27:35 CEST 2025
Total time taken to generate the page: 0.03604 seconds
|