Swinc
SourceForge.net Logo

 

 

swinc::SwincWindow Class Reference

SwincWindow - Class to create and manage a SDI window. More...

#include <swinc.h>

Inheritance diagram for swinc::SwincWindow:

swinc::SwincWindowBase List of all members.

Public Member Functions

 SwincWindow ()
 Constructs a SwincWindow.
virtual ~SwincWindow ()
 Virtual Destructor.
SwincWindowSetLargeIcon (int)
SwincWindowSetSmallIcon (int)
void setMenu (int menuResource, bool classmenu=false)
void setBackGroundColor (HBRUSH)
void registerWindow ()
 Register the window with current settings and default classname.
void registerWindow (tstring classname)
void createWindow ()
 Creates the window.
void createWindow (tstring title)
bool showWindow (int Command=SW_NORMAL)
 Shows the window.
bool hideWindow ()
 Hides the window.
void rcs (void)
 Combines registerWindow(), createWindow() and showWindow() into one function.
virtual LRESULT CALLBACK WindowProc (UINT msg, WPARAM wp, LPARAM lp)

Detailed Description

SwincWindow - Class to create and manage a SDI window.

SwincWindow can be used as is by instantiating a window of type SwincWindow or you can derive your class from SwincWindow.

You can customize the class by adding message handlers to handle various windows messages and notifications.
Using the overloaded member addMsgHandler(), you can add either a global message handlers or a class define member message handler.
The global handler have a prototype of LRESULT function_name(SwincWindowBase*, WPARAM, LPARAM), While the member version will have the form LRESULT YourClass::function name(WPARAM, LPARAM).
You will notice that a pointer to the instance of the window is passed in as a base class pointer for the global handler. This will give you access to base public members. By using a dynamic_cast, you could also gain access to the derived members.


Constructor & Destructor Documentation

swinc::SwincWindow::SwincWindow (  ) 

Constructs a SwincWindow.

swinc::SwincWindow::~SwincWindow (  )  [virtual]

Virtual Destructor.


Member Function Documentation

swinc::SwincWindow & swinc::SwincWindow::SetLargeIcon ( int   ) 

swinc::SwincWindow & swinc::SwincWindow::SetSmallIcon ( int   ) 

void swinc::SwincWindow::setMenu ( int  menuResource,
bool  classmenu = false 
)

void swinc::SwincWindow::setBackGroundColor ( HBRUSH   ) 

void swinc::SwincWindow::registerWindow (  ) 

Register the window with current settings and default classname.

void swinc::SwincWindow::registerWindow ( tstring  classname  ) 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Register the window with current settings and classname of your choice.

void swinc::SwincWindow::createWindow (  ) 

Creates the window.

void swinc::SwincWindow::createWindow ( tstring  title  ) 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters:
title - Window title dispayed in Title bar for normal window. Other windows such as labels and edits uses this as their display value.

bool swinc::SwincWindow::showWindow ( int  Command = SW_NORMAL  ) 

Shows the window.

bool swinc::SwincWindow::hideWindow (  ) 

Hides the window.

void swinc::SwincWindow::rcs ( void   ) 

Combines registerWindow(), createWindow() and showWindow() into one function.

LRESULT swinc::SwincWindow::WindowProc ( UINT  msg,
WPARAM  wp,
LPARAM  lp 
) [virtual]

Implements swinc::SwincWindowBase.


The documentation for this class was generated from the following files:
Generated on Sat Jul 7 11:45:10 2007 for SWinC by  doxygen 1.5.2