|
Creating a Floating Window |
|
A window is referred to as floating when it can be positioned anywhere on the screen. Prerequisites: Any application that displays on the screen without being maximized is a floating window. The first attribute of a floating window is that it must have a parent. An application that displays on the screen has the desktop window as its parent. The second attribute of a floating window is that, since it has a parent, when the parent gets closed or destroyed, the floating window also gets closed or destroyed. You can create a window that has a parent of your application. In fact every "physical" object that is part of your application as a parent. Like a non-maximized application presents a floating window, you can create a window as part of your application and make it float anywhere on the screen as long as its parent is available. That is the case for toolbars, mini frames, and dialog bars, etc.
In this small how-to topic, we will create an application that uses the document/view architecture to create a framed window. Then we will add a floating dialog box to it. All of that is easy as long as you know how to add a dialog box to an application. The main trick we will need to make sure that only one instance of the floating window can be displayed at one given time. |
|
|
|
|
|
||
| Home | Copyright © 2003-2005 FunctionX, Inc. | FunctionX |
|
|
||