Public Member Functions

TabDialogPointer Class Reference

This reference page is linked to from the following overview topics: Tabbed Dialogs.


Search for all occurrences

Detailed Description

Description:
This smart pointer is used to simplify scope management

#include <ITabDialog.h>

Inheritance diagram for TabDialogPointer:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  TabDialogPointer ()
  TabDialogPointer (ITabbedDialog *dlg)
  TabDialogPointer (TabDialogPointer &src)
  TabDialogPointer (HWND parent, HINSTANCE instance, const MCHAR *dlg, ITabDialogProc *mainProc, bool multiline, DWORD helpID=0, int tabID=-1, const Class_ID &dialogID=Class_ID(0, 0))
  ~TabDialogPointer ()
TabDialogPointer operator= (ITabbedDialog *dlg)
TabDialogPointer operator= (TabDialogPointer &src)
  operator ITabbedDialog * ()
ITabbedDialog operator* ()
ITabbedDialog get ()
ITabbedDialog release ()
ITabbedDialog operator-> ()
ITabbedDialog **  operator& ()
bool  Create (HWND parent, HINSTANCE instance, const MCHAR *dlg, ITabDialogProc *mainProc, bool multiline, int tabID=-1, DWORD helpID=0, const Class_ID &dialogID=Class_ID(0, 0))

Constructor & Destructor Documentation

TabDialogPointer ( ) [inline]
: mpDlg(NULL) { }
TabDialogPointer ( ITabbedDialog dlg ) [inline, explicit]
: mpDlg(dlg) { }
TabDialogPointer ( TabDialogPointer src ) [inline, explicit]
: mpDlg(src.mpDlg) { src.mpDlg = NULL; }
TabDialogPointer ( HWND  parent,
HINSTANCE  instance,
const MCHAR *  dlg,
ITabDialogProc mainProc,
bool  multiline,
DWORD  helpID = 0,
int  tabID = -1,
const Class_ID dialogID = Class_ID(0,0) 
) [inline]
     : mpDlg(NULL)
   {
      ITabDialogManager* i = GetTabDialogManager();
      if (i != NULL) {
         mpDlg = i->CreateTabbedDialog(parent, instance, dlg, mainProc,
            multiline, helpID, tabID, dialogID);
      }
   }
~TabDialogPointer ( ) [inline]
{ FreeDlg(); mpDlg = NULL; }

Member Function Documentation

TabDialogPointer& operator= ( ITabbedDialog dlg ) [inline]
{ FreeDlg(); mpDlg = dlg; return *this; }
TabDialogPointer& operator= ( TabDialogPointer src ) [inline]
{ FreeDlg(); mpDlg = src.mpDlg; src.mpDlg = NULL; return *this; }
operator ITabbedDialog * ( ) [inline]
{ return mpDlg; }
ITabbedDialog& operator* ( ) [inline]
{ return *mpDlg; }
ITabbedDialog* get ( ) [inline]
{ return mpDlg; }
ITabbedDialog* release ( ) [inline]
{ ITabbedDialog* dlg = mpDlg; mpDlg = NULL; return dlg; }
ITabbedDialog* operator-> ( ) [inline]
{ return mpDlg; }
ITabbedDialog** operator& ( ) [inline]
{ return &mpDlg; }
bool Create ( HWND  parent,
HINSTANCE  instance,
const MCHAR *  dlg,
ITabDialogProc mainProc,
bool  multiline,
int  tabID = -1,
DWORD  helpID = 0,
const Class_ID dialogID = Class_ID(0,0) 
) [inline]
   {
      ITabDialogManager* i = GetTabDialogManager();
      if (i != NULL) {
         ITabbedDialog* retVal = i->CreateTabbedDialog(parent, instance, dlg, mainProc,
            multiline, helpID, tabID, dialogID);
         if (retVal != NULL) {
            FreeDlg();
            mpDlg = retVal;
            return true;
         }
      }
      return false;
   }

TabDialogPointer TabDialogPointer TabDialogPointer TabDialogPointer TabDialogPointer TabDialogPointer TabDialogPointer TabDialogPointer TabDialogPointer TabDialogPointer
TabDialogPointer TabDialogPointer TabDialogPointer TabDialogPointer TabDialogPointer TabDialogPointer TabDialogPointer TabDialogPointer TabDialogPointer TabDialogPointer