void CWndAdminCreateItem::OnInitialUpdate() 
{ 
	CWndNeuz::OnInitialUpdate(); 

	CWndListBox* pListBox = (CWndListBox*)GetDlgItem( WIDC_CONTROL1 );
	for( int i = 0; i < prj.m_aPropItem.GetSize(); i++ )
	{
		ItemProp* pItemProp =  prj.GetItemProp( i );
		if( pItemProp )
		{
			if( GetLanguage() != LANG_KOR && pItemProp->nVer >= 7 && pItemProp->bCharged == TRUE )
				continue;
			int nIndex = pListBox->AddString( MakeName( pItemProp ) );
			pListBox->SetItemDataPtr( nIndex, pItemProp );
		}
	}
	CWndComboBox* pWndItemKind = (CWndComboBox*)GetDlgItem( WIDC_ITEM_KIND );
	CWndComboBox* pWndItemSex = (CWndComboBox*)GetDlgItem( WIDC_ITEM_SEX );
	CWndComboBox* pWndItemJob = (CWndComboBox*)GetDlgItem( WIDC_ITEM_JOB );
	CWndEdit* pWndLevel = (CWndEdit*)GetDlgItem( WIDC_LEVEL );
	CStringArray strArray;
	CScript::GetFindIdToArray( "IK2_", &strArray );
	int nIndex = pWndItemKind->AddString( "ALL" );
	pWndItemKind->SetItemData( nIndex, NULL_ID );
	for( i = 0; i < strArray.GetSize(); i++ )
	{
		nIndex = pWndItemKind->AddString( strArray.GetAt( i ) );
		DWORD dwNum = CScript::GetDefineNum( strArray.GetAt( i ) );
		pWndItemKind->SetItemData( nIndex, dwNum );
	}
	pWndItemKind->m_wndListBox.SortListBox();
	nIndex = pWndItemKind->m_wndListBox.FindString( 0, "ALL" );
	pWndItemKind->SetCurSel( nIndex );
	strArray.RemoveAll();
	CScript::GetFindIdToArray( "SEX_", &strArray );
	for( i = 0; i < strArray.GetSize(); i++ )
	{
		nIndex = pWndItemSex->AddString( strArray.GetAt( i ) );
		DWORD dwNum = CScript::GetDefineNum( strArray.GetAt( i ) );
		pWndItemSex->SetItemData( nIndex, dwNum );
	}
	pWndItemSex->SetCurSel( 2 );

	strArray.RemoveAll();
	CScript::GetFindIdToArray( "JOB_", &strArray );
	nIndex = pWndItemJob->AddString( "ALL" );
	pWndItemJob->SetItemData( nIndex, -1 );
	for( i = 0; i < strArray.GetSize(); i++ )
	{
		nIndex = pWndItemJob->AddString( strArray.GetAt( i ) );
		DWORD dwNum = CScript::GetDefineNum( strArray.GetAt( i ) );
		pWndItemJob->SetItemData( nIndex, dwNum );
	}
	pWndItemJob->m_wndListBox.SortListBox();
	nIndex = pWndItemJob->m_wndListBox.FindString( 0, "ALL" );
	pWndItemJob->SetCurSel( nIndex );
	// 좌표 이동 

	CRect rectRoot = m_pWndRoot->GetLayoutRect();
	CRect rectWindow = GetWindowRect();
	CPoint point( rectRoot.right - rectWindow.Width(), 110 );
	Move( point );
	MoveParentCenter();
} 
示例#2
0
void CWndGuildVote::OnInitialUpdate() 
{ 
	CWndNeuz::OnInitialUpdate(); 
	// 여기에 코딩하세요

	CWndEdit* pEdit;
	
	pEdit = (CWndEdit*) GetDlgItem( WIDC_EDIT1 );
	pEdit->EnableWindow(FALSE);
	pEdit = (CWndEdit*) GetDlgItem( WIDC_EDIT4 );
	pEdit->EnableWindow(FALSE);
	pEdit = (CWndEdit*) GetDlgItem( WIDC_EDIT2 );
	pEdit->EnableWindow(FALSE);
	pEdit = (CWndEdit*) GetDlgItem( WIDC_EDIT5 );
	pEdit->EnableWindow(FALSE);
	pEdit = (CWndEdit*) GetDlgItem( WIDC_EDIT3 );
	pEdit->EnableWindow(FALSE);

	CGuild* pGuild = g_pPlayer->GetGuild();
	if( !pGuild )
	{
		g_WndMng.PutString( "소속된 길드가 없어서 길드투표창을 열 수 없습니다." );
		Destroy();
		return;
	}
	else
	if( !(pGuild->m_nLevel > 7) )
	{
		g_WndMng.PutString( prj.GetText(TID_GAME_GUILDNOTLEVEL) );
		Destroy();
		return;
	}

	CWndComboBox* pCombo = (CWndComboBox*)GetDlgItem(WIDC_COMBOBOX1);

	pCombo->ResetContent();
	
	list <CGuildVote*>::iterator it = pGuild->m_votes.begin();
	
	for ( ; it != pGuild->m_votes.end() ; ++it )
	{
		int nIndex;
		nIndex = pCombo->AddString( (*it)->GetTitle() );
		pCombo->SetItemData( nIndex, (*it)->GetID() );
	}
		
	CWndButton* pWndButton[4];

	pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_RADIO1 );
	pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_RADIO2 );
	pWndButton[ 2 ] = (CWndButton*)GetDlgItem( WIDC_RADIO3 );
	pWndButton[ 3 ] = (CWndButton*)GetDlgItem( WIDC_RADIO4 );
	pWndButton[ 0 ]->SetGroup( TRUE );

	// 윈도를 중앙으로 옮기는 부분.
	CRect rectRoot = m_pWndRoot->GetLayoutRect();
	CRect rectWindow = GetWindowRect();
	CPoint point( rectRoot.right - rectWindow.Width(), 110 );
	Move( point );
	MoveParentCenter();
}