3D PLM Enterprise Architecture

User Interface - Dialogs

CATDlgWindow

Base class for windows
Quick Reference

CATDialog
  |
  +---CATDlgWindow

CATDlgWindow is the base class for all dialog window classes. All the tasks described here consequently apply to any dialog window instance. Its derived classes are:


Styles
Name Description
default The window layout uses tabulations
CATDlgGridLayout The window layout uses a grid. This is the recommended way of arranging objects in a dialog window

[Top]


Events
Notification Method Sent when
CATDlgWindSizeNotification GetWindSizeNotification When the window is resized
CATDlgWindCloseNotification GetWindCloseNotification When the window is closed
CATDlgWindMoveNotification GetWindMoveNotification When the window is moved
CATDlgWindMaximizeNotification GetWindMaximizeNotification When the window is maximized
CATDlgWindMinimizeNotification GetWindMinimizeNotification When the window is minimized
CATDlgWindRestoreNotification GetWindRestoreNotification When the window is restored to its previous size after being minimized or maximized

[Top]


Programmer's Guide

The methods described below are valid for the derived classes CATDlgDocument and CATDlgDialog only, because CATDlgNotify and CATDlgFile do not allow for dialog children.

The programming tasks fall into the following topics:

[Top]

Constructing a Dialog Window

A CATDlgWindow can be constructed as the base class of one of its derived class only.

[Top]

Managing the Window Size

You can do the following to manage the size of a dialog window.

Get maximum window size
int Height, Width;
_pWindow->GetMaximumSize(&Height, &Width);
Make the window content occupy the full screen
// The window content occupies the full screen
_pWindow->SetFullScreen(1);
// The window is restored to its previous size
_pWindow->SetFullScreen(0);
Maximize
_pWindow->Maximize();
Minimize
_pWindow->Minimize();
Restore
_pWindow->Restore();
Is maximized?
if (_pWindow->IsMaximized())
  ... // The window is maximized
else
  ... // The window is NOT maximized
Is minimized?
if (_pWindow->IsMinimized())
  ... // The window is minimized
else
  ... // The window is NOT minimized

[Top]

Setting a Callback on a Dialog Window

Set a callback on a dialog window as follows:

AddAnalyseNotificationCB(
  _pWindow,                                     // window 
  _pWindow->GetWindCloseNotification(),         // notification
  (CATCommand)&Container::MethodToExecute,      // method to execute 
  CATCommandClientData iUsefulData);            // useful data for this method 

[Top]

Managing the Window Layout Using a Grid

This is explained in Arranging Dialog Objects Using Grid. Layout using a grid is available only if the CATDlgGridLayout style is used in the window constructor. 

[Top]

Setting a Title to a Dialog Window

The dialog window title should be on the derived class instance and set by the resource file using a key built with the identifier you declare as the second parameter of the dialog window constructor.

[Top]


History

Version: 1 [Jan 2000] Document created
[Top]

Copyright © 2000, Dassault Systèmes. All rights reserved.