void CWndGuildVote::SetszString(char *text1, char *text2, char *text3, char *text4 ) { CWndEdit* pEdit; pEdit = (CWndEdit*) GetDlgItem( WIDC_EDIT4 ); pEdit->SetString( text1 ); pEdit = (CWndEdit*) GetDlgItem( WIDC_EDIT2 ); pEdit->SetString( text2 ); pEdit = (CWndEdit*) GetDlgItem( WIDC_EDIT5 ); pEdit->SetString( text3 ); pEdit = (CWndEdit*) GetDlgItem( WIDC_EDIT3 ); pEdit->SetString( text4 ); }
void CWndIndirectTalk::OnDraw( C2DRender* p2DRender ) { CWorld* pWorld = g_WorldMng(); CMover* pMover = (CMover*)pWorld->GetObjFocus(); CWndEdit* pWndEdit = (CWndEdit*)GetDlgItem( WIDC_EDIT1 ); TCHAR szNum[ 32 ]; if( pMover && pMover->GetType() == OT_MOVER ) itoa( pMover->GetId(), szNum, 10 ); else itoa( 0, szNum, 10 ); pWndEdit->SetString( szNum ); }
void CWndMessageBox::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags) { if( nChar == VK_RETURN ) { CWndLogin *pWndLogin = (CWndLogin *)g_WndMng.GetWndBase( APP_LOGIN ); if( pWndLogin ) { CWndEdit* pPassword = (CWndEdit*) pWndLogin->GetDlgItem( WIDC_PASSWORD ); if( pPassword ) { pPassword->SetString("");//>m_string = ""; pPassword->PostMessage( WM_SETFOCUS );//SetFocus(); } Destroy(); } } }
void CWndDebugInfo::OnInitialUpdate() { CWndNeuz::OnInitialUpdate(); // 여기에 코딩하세요 CWndButton* pWndButton; pWndButton = (CWndButton*)GetDlgItem( WIDC_GRID ); pWndButton->SetCheck( g_WorldMng()->m_bViewGrid ); pWndButton = (CWndButton*)GetDlgItem( WIDC_TERRAIN ); pWndButton->SetCheck( g_WorldMng()->m_bViewTerrain ); pWndButton = (CWndButton*)GetDlgItem( WIDC_LOD_TERRAIN); pWndButton->SetCheck( g_WorldMng()->m_bViewLODTerrain); pWndButton = (CWndButton*)GetDlgItem( WIDC_LOD_OBJ ); pWndButton->SetCheck( g_WorldMng()->m_bViewLODObj ); pWndButton = (CWndButton*)GetDlgItem( WIDC_ANIMATION ); pWndButton->SetCheck( CObj::IsAnimate() ); pWndButton = (CWndButton*)GetDlgItem( WIDC_LIGHT ); pWndButton->SetCheck( g_WorldMng()->m_bViewLight ); //pWndButton = (CWndButton*)GetDlgItem( WIDC_CAPTURE ); pWndButton->SetCheck( ); pWndButton = (CWndButton*)GetDlgItem( WIDC_HIDE ); pWndButton->SetCheck( !g_pPlayer->IsVisible() ); pWndButton = (CWndButton*)GetDlgItem( WIDC_WIREFRAME ); pWndButton->SetCheck( g_WorldMng()->m_bViewWireframe ); pWndButton = (CWndButton*)GetDlgItem( WIDC_OBJECT ); pWndButton->SetCheck( g_WorldMng()->m_bViewAllObjects ); pWndButton = (CWndButton*)GetDlgItem( WIDC_FRAME_SKIP ); pWndButton->SetCheck( GetFrameSkip() ); pWndButton = (CWndButton*)GetDlgItem( WIDC_WEATHER ); pWndButton->SetCheck( g_WorldMng()->m_bViewWeather ); pWndButton = (CWndButton*)GetDlgItem( WIDC_BOUNDBOX ); pWndButton->SetCheck( g_WorldMng()->m_bViewBoundBox ); pWndButton = (CWndButton*)GetDlgItem( WIDC_ATTRIBUTE ); pWndButton->SetCheck( g_WorldMng()->m_bViewHeightAttribute ); pWndButton = (CWndButton*)GetDlgItem( WIDC_SKYBOX ); pWndButton->SetCheck( g_WorldMng()->m_bViewSkybox ); pWndButton = (CWndButton*)GetDlgItem( WIDC_NAME ); pWndButton->SetCheck( g_WorldMng()->m_bViewName ); pWndButton = (CWndButton*)GetDlgItem( WIDC_CULLOBJ ); pWndButton->SetCheck( g_WorldMng()->m_bCullObj ); pWndButton = (CWndButton*)GetDlgItem( WIDC_COLLISION ); pWndButton->SetCheck( CObj::m_bCollision ); pWndButton = (CWndButton*)GetDlgItem( WIDC_FOG ); pWndButton->SetCheck( g_WorldMng()->m_bViewFog ); pWndButton = (CWndButton*)GetDlgItem( WIDC_IDSTATE ); pWndButton->SetCheck( g_WorldMng()->m_bViewIdState ); pWndButton = (CWndButton*)GetDlgItem( WIDC_WATER ); pWndButton->SetCheck( g_WorldMng()->m_bViewWater ); pWndButton = (CWndButton*)GetDlgItem( WIDC_HOUR ); pWndButton->SetCheck( g_GameTimer.IsFixed() ); pWndButton = (CWndButton*)GetDlgItem( WIDC_CHECK1 ); pWndButton->SetCheck( g_WorldMng()->m_bViewHP ); CString string; string.Format( "%d", g_GameTimer.m_nHour ); CWndEdit* pWndEdit = (CWndEdit*)GetDlgItem( WIDC_EDIT_HOUR ); pWndEdit->SetString( string ); pWndButton = (CWndButton*)GetDlgItem( WIDC_HOUR ); pWndButton->SetCheck( g_GameTimer.IsFixed() ); //g_World.m_bViewWater ////////////////////////////////////////////////////// CRect rectRoot = m_pWndRoot->GetLayoutRect(); CRect rectWindow = GetWindowRect(); CPoint point( rectRoot.right - rectWindow.Width(), 110 ); Move( point ); MoveParentCenter(); }
void CWndVendor::SetVendor( CMover* pVendor ) { m_pVendor = pVendor; m_wndctrlVendor.InitVendor( m_pVendor ); if( !m_pVendor->IsActiveMover() ) { CWndEdit* pWndEdit = (CWndEdit*)GetDlgItem( WIDC_EDIT1 ); pWndEdit->SetString( pVendor->m_vtInfo.GetTitle() ); pWndEdit->EnableWindow( FALSE ); CWndButton* pButton = (CWndButton*)GetDlgItem( WIDC_OK ); pButton->SetVisible( FALSE ); pButton = (CWndButton*)GetDlgItem( WIDC_CANCEL ); pButton->SetVisible( FALSE ); } CWndWorld* pWndWorld = (CWndWorld*)g_WndMng.GetWndBase( APP_WORLD ); if( pWndWorld ) pWndWorld->m_objidTracking = NULL_ID; if( g_WndMng.m_pWndDialog ) Destroy(); }
void CWndGuildMerit::OnInitialUpdate() { CWndNeuz::OnInitialUpdate(); // 여기에 코딩하세요 LPWNDCTRL lpWndCtrl = GetWndCtrl( WIDC_LISTBOX1 ); m_wndctrlMerit.Create( WLVS_ICON | WBS_NODRAWFRAME, lpWndCtrl->rect, this, 100 ); // 윈도를 중앙으로 옮기는 부분. CRect rectRoot = m_pWndRoot->GetLayoutRect(); CRect rectWindow = GetWindowRect(); CPoint point( rectRoot.right - rectWindow.Width(), 110 ); Move( point ); MoveParentCenter(); TCHAR szNumber[ 64 ]; CWndEdit* pWndEdit = (CWndEdit*)GetDlgItem( WIDC_EDIT1 ); _itot( 0, szNumber, 10 ); pWndEdit->SetString( szNumber ); pWndEdit->SetFocus(); }
void CWndGuildVoteSeting::OnInitialUpdate() { CWndNeuz::OnInitialUpdate(); // 여기에 코딩하세요 if( m_nSelect != -1 ) { //WIDC_EDIT1 CWndEdit* pEdit; CWndComboBox* pCombo = (CWndComboBox*)GetParentWnd()->GetDlgItem(WIDC_COMBOBOX1); CString str = pCombo->GetString(); pEdit = (CWndEdit*) GetDlgItem( WIDC_EDIT1 ); pEdit->SetString( str ); pEdit = (CWndEdit*) GetDlgItem( WIDC_EDIT2 ); pEdit->SetString( ((CWndEdit*) GetParentWnd()->GetDlgItem(WIDC_EDIT1))->GetString() ); pEdit = (CWndEdit*) GetDlgItem( WIDC_EDIT3 ); pEdit->SetString( ((CWndEdit*) GetParentWnd()->GetDlgItem(WIDC_EDIT4))->GetString() ); pEdit = (CWndEdit*) GetDlgItem( WIDC_EDIT5 ); pEdit->SetString( ((CWndEdit*) GetParentWnd()->GetDlgItem(WIDC_EDIT2))->GetString() ); pEdit = (CWndEdit*) GetDlgItem( WIDC_EDIT6 ); pEdit->SetString( ((CWndEdit*) GetParentWnd()->GetDlgItem(WIDC_EDIT5))->GetString() ); pEdit = (CWndEdit*) GetDlgItem( WIDC_EDIT4 ); pEdit->SetString( ((CWndEdit*) GetParentWnd()->GetDlgItem(WIDC_EDIT3))->GetString() ); } // 윈도를 중앙으로 옮기는 부분. CRect rectRoot = m_pWndRoot->GetLayoutRect(); CRect rectWindow = GetWindowRect(); CPoint point( rectRoot.right - rectWindow.Width(), 110 ); Move( point ); MoveParentCenter(); }
void CWndGuildVote::SetQuestion( const char *question) { CWndEdit* pEdit; pEdit = (CWndEdit*) GetDlgItem( WIDC_EDIT1 ); pEdit->SetString(question); }
BOOL CWndGuildVoteSeting::OnChildNotify( UINT message, UINT nID, LRESULT* pLResult ) { switch( nID ) { // 길드 설정창 클리어 case WIDC_VOTE_CLEAR: { CWndEdit* pEdit; pEdit = (CWndEdit*) GetDlgItem( WIDC_EDIT1 ); pEdit->SetString( "" ); pEdit = (CWndEdit*) GetDlgItem( WIDC_EDIT2 ); pEdit->SetString( "" ); pEdit = (CWndEdit*) GetDlgItem( WIDC_EDIT3 ); pEdit->SetString( "" ); pEdit = (CWndEdit*) GetDlgItem( WIDC_EDIT5 ); pEdit->SetString( "" ); pEdit = (CWndEdit*) GetDlgItem( WIDC_EDIT6 ); pEdit->SetString( "" ); pEdit = (CWndEdit*) GetDlgItem( WIDC_EDIT4 ); pEdit->SetString( "" ); m_nSelect = -1; } break; // 길드 투표 시작 case WIDC_VOTE_START: { CGuild* pGuild = g_pPlayer->GetGuild(); if( pGuild ) { // 현재 투표할 메뉴가 완료된것이냐? CWndComboBox* pCombo = (CWndComboBox*)GetParentWnd()->GetDlgItem(WIDC_COMBOBOX1); if( m_nSelect != -1 ) { if( pGuild->m_votes.size() ) { list <CGuildVote*>::iterator it = pGuild->m_votes.begin(); for ( ; it != pGuild->m_votes.end() ; ++it ) { if( (*it)->GetID() == pCombo->GetItemData(m_nSelect) ) { if( (*it)->IsCompleted() ) { g_WndMng.OpenMessageBox( "투표가 완료된 사항입니다.", MB_OK, this ); return FALSE; } else { g_WndMng.OpenMessageBox( "이미 진행중입니다.", MB_OK, this ); return FALSE; } } } } } // 입력사항 체크 부분... CWndEdit* pEdit1 = (CWndEdit*) GetDlgItem( WIDC_EDIT1 ); CWndEdit* pEdit2 = (CWndEdit*) GetDlgItem( WIDC_EDIT2 ); if( strlen( pEdit1->GetString() ) <= 0 || strlen( pEdit2->GetString() ) <= 0 ) { g_WndMng.OpenMessageBox( "투표제목과 내용은 필수 입력 사항입니다.", MB_OK, this ); break; } int nChk = -1; CWndEdit* pEdit[4]; pEdit[0] = (CWndEdit*) GetDlgItem( WIDC_EDIT3 ); pEdit[1] = (CWndEdit*) GetDlgItem( WIDC_EDIT5 ); pEdit[2] = (CWndEdit*) GetDlgItem( WIDC_EDIT6 ); pEdit[3] = (CWndEdit*) GetDlgItem( WIDC_EDIT4 ); int i; for( i=0; i<4; i++ ) { if( strlen( pEdit[i]->GetString() ) > 0 ) nChk = i; } if( nChk != -1 ) { if( nChk < 1 ) { g_WndMng.OpenMessageBox( "투표 항목은 최소한 2개 이상이어야 합니다.", MB_OK, this ); break; } for( i=0; i<=nChk; i++ ) { if( strlen( pEdit[i]->GetString() ) <= 0 ) { g_WndMng.OpenMessageBox( "중간에 빈 내용이 있습니다.", MB_OK, this ); return FALSE; } } } else { g_WndMng.OpenMessageBox( "투표 항목은 최소한 2개 이상이어야 합니다.", MB_OK, this ); break; } LPCTSTR ptext[4]; ptext[0] = pEdit[0]->GetString(); ptext[1] = pEdit[1]->GetString(); ptext[2] = pEdit[2]->GetString(); ptext[3] = pEdit[3]->GetString(); g_DPlay.SendAddVote( pEdit1->GetString(), pEdit2->GetString(), ptext ); } Destroy(); } break; // 길드투표 끝내기 case WIDC_VOTE_FINISH: { CWndComboBox* pCombo = (CWndComboBox*)GetParentWnd()->GetDlgItem(WIDC_COMBOBOX1); if( pCombo->GetCurSel() != -1 ) g_DPlay.SendCloseVote( pCombo->GetItemData( pCombo->GetCurSel() ) ); Destroy(); } break; } return CWndNeuz::OnChildNotify( message, nID, pLResult ); }