Treasurebox Problem

09/07/2013 12:07 Kabellutscher#1
Hallo

ich habe ein problem mit dem boxen system von adeilson. habe alle im source etc eingefügt nur bekomme ich an der stelle wo auf dem fenster die icon von der box und von dem schlüssel richtig gerückt werden einen fehler.

habe mal gedebuggt. Nur verstehe ich den fehler nicht.

Quote:
void CWndTreasureBox::OnInitialUpdate()
{
CWndNeuz::OnInitialUpdate();

RestoreDeviceObjects();

m_texGauEmptyNormal.LoadTexture( m_pApp->m_pd3dDevice, MakePath( DIR_THEME, "ColoGauge01.bmp" ), 0xffff00ff, TRUE );

CWndButton* pButton = (CWndButton*)GetDlgItem(WIDC_BT_OK);
pButton->EnableWindow(FALSE);

CWndCustom* pWndCustom = (CWndCustom*)GetDlgItem(WIDC_PC_DELAY);
pWndCustom->SetTitle( "" );

m_nCtrlId = GetWndCtrl( WIDC_CB_OPEN )->rect;
m_nBoxRect = GetWndCtrl( WIDC_LB_NOTICE )->rect;

MoveParentCenter();
}
Diese Funktion crasht das ganze. Wenn ich
Quote:
m_nCtrlId = GetWndCtrl( WIDC_CB_OPEN )->rect;
m_nBoxRect = GetWndCtrl( WIDC_LB_NOTICE )->rect;
auskommentiere geht es nur sind die Icons halt an der falschen stelle.