// AjudJDlg.cpp : implementation file
//

#include "stdafx.h"
#include "ajuda.h"
#include "AjudJDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CAjudJDlg dialog


CAjudJDlg::CAjudJDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CAjudJDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CAjudJDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CAjudJDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CAjudJDlg)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CAjudJDlg, CDialog)
	//{{AFX_MSG_MAP(CAjudJDlg)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CAjudJDlg message handlers

BOOL CAjudJDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
   // tenta carregar bitmaps
	if ( ! m_oBmp.LoadBitmaps ( _T ( "BMP_COMOJOGA" ), NULL, NULL ) || 
        ! m_oBmpEx.LoadBitmaps ( _T ( "BMP_EXCOMOJOGA" ), NULL, NULL ) ) {

		TRACE0 ( "Impossível ler bitmaps.\n ");
		AfxThrowResourceException ();
	}
	
	// define qual controle da caixa de dialogo vai ter qual bitmap
	VERIFY ( m_oBmp.SubclassDlgItem ( IDC_AJUDA_COMOJOGAR, this ) );
	VERIFY ( m_oBmpEx.SubclassDlgItem ( IDC_AJUDA_EXCOMOJOGAR, this ) );

	// muda tamanho dos controles para caber os bitmaps
	m_oBmp.SizeToContent ();
	m_oBmpEx.SizeToContent ();

	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
