CMTIApp Class

class CMTIApp: public _Base (default is CComModule)

[VC7] C3747 Fix: Adding Default class for _MessageLoop to prevent template error for VC7 template

Application class for MTI applications

Defined in: Application.h

Class Template Arguments

_Base = ATL::CComModule

This first parameter must either be ATL's CComModule class, or be derived from ATL's CComModule class.

_MessageLoop

Message loop class for handling messages

_Initializer =  CNoopInitializer

Class for handling initialization

Member functions include:  Init,  Term,  Run,  GetMessageLoop,  RunTopLevelWindow,  AddMessageLoop,  RemoveMessageLoop, and  ThreadEntryPoint

See Also  CApp

Class Members

HRESULT  Init(int nShowCmd, _ATL_OBJMAP_ENTRY* p, HINSTANCE h, const GUID* plibid = NULL)

Initialize the MTI application

void  Term()

Terminate the MTI application

int  Run()

Run the MTI application

_MessageLoop*  GetMessageLoop(DWORD dwKey = ::GetCurrentThreadId())

Get a specific message loop

bool  RunTopLevelWindow(void* lpParam = NULL)

Run the top level window

void  AddMessageLoop(_MessageLoop* aMessageLoop)

Add a messsage loop to the MTI app

void  RemoveMessageLoop()

Remove the message loop from the MTI app

Thread entry poin for MTI threads

MessageLoopMap m_MessageLoops

List of message loops for this app