Описание класса, от которого наследуют все диалоги.

class CGinaDlg 
{
private:
	LPGINA_CONTEXT		m_lpContext;
public:
	CGinaDlg( LPGINA_CONTEXT lpContext ) { m_lpContext = lpContext; }
	virtual ~CGinaDlg() {}
	virtual int ShowModal() { return 0; }
protected:
	int DoModal( LPWSTR wszTemplate,DLGPROC lpDlgProcedure ) 
	{ 
		if( ( m_lpContext != NULL ) && ( m_lpContext->pWlxFuncs != NULL ) )
			return m_lpContext->pWlxFuncs->WlxDialogBox( m_lpContext->hWlx,m_lpContext->
hDllInstance,wszTemplate,m_lpContext->hWndOwner,lpDlgProcedure ); 
		else
			return WLX_SAS_ACTION_NONE;
	}
	static INT_PTR WINAPI DefGinaDlgProc( HWND hWnd,UINT nMessage,WPARAM wParam,LPARAM lParam )
	{
		INT_PTR	nRet	= 0;
		switch( nMessage )
		{
			case WM_CTLCOLORSTATIC:
				nRet = OnCtlColorStatic( (HDC)wParam );
				break;
			case WM_PAINT:
				FillWindow( hWnd );
				break;
			case WM_INITDIALOG:
				CenterWindow( hWnd );
				CreateEllipticWindow( hWnd );
				break;
		}
		return nRet;
	}
};