void CWndNeuz::OnInitialUpdate() { CWndBase::OnInitialUpdate(); m_rectBackup = m_rectWindow; int x = m_rectWindow.Width() / 2; int y = m_rectWindow.Height();// - 45; CSize size = CSize( 60, 25 );//m_pSprPack->GetAt(9)->GetSize(); // //DWORD dwStyle,const RECT& rect,CWndBase* pParentWnd,UINT nID); if( IsWndStyle( WBS_CAPTION ) ) { m_wndTitleBar.Create( WBS_CHILD | WBS_DOCKING | WBS_NODRAWFRAME | WBS_NOFRAME, CRect(0,0,0,0), this, 100000 ); m_wndTitleBar.SetTitle( "f**k" ); m_wndTitleBar.Replace(); } // m_wndButton.Create("OK",0,CRect(0,0,0+size.cx,0+size.cy),this,IDOK);//,m_pSprPack,9); // m_wndClose.SetDefault(TRUE); LPWNDAPPLET lpWndApplet = m_resMng.GetAt ( GetWndId() ); if( lpWndApplet ) { //#ifndef __NEWINTERFACE // lpWndApplet->bTile = FALSE; //#endif SetTitle( lpWndApplet->strTitle ); m_bTile = ( lpWndApplet->bTile != FALSE ); m_strTexture = lpWndApplet->strTexture; m_d3dFormat = lpWndApplet->d3dFormat; for( int i = 0; i < lpWndApplet->ptrCtrlArray.GetSize(); i++ ) { m_wndArrayTemp.Add( CreateControl( m_pApp->GetSafeHwnd(), (LPWNDCTRL)lpWndApplet->ptrCtrlArray.GetAt( i ) ) ); } } // SetFocus(); //m_bWndTile = TRUE; // AdjustWndBase(); #if __VER >= 8 #ifdef __DISABLE_GAMMA_WND if(g_Neuz.m_bStartFullscreen) #endif // g_Neuz.Drv_SetGamma( g_Neuz.GetSafeHwnd(), g_Option.m_fGamma, g_Option.m_nOverBright, g_Option.m_fContrast ); #endif //__Y_GAMMA_CONTROL_8 }
void CWndAbout::OnInitialUpdate() { LPWNDAPPLET lpWndApplet = m_resMng.GetAt ( GetWndId() ); CString strName = "WndAboutFlyff.tga";//lpWndApplet->strTexture; CWndNeuz::OnInitialUpdate(); // 여기에 코딩하세요 if( lpWndApplet ) { SetTexture( m_pApp->m_pd3dDevice, MakePath( "Theme\\", ::GetLanguage(), strName ), TRUE ); } // 윈도를 중앙으로 옮기는 부분. CRect rectRoot = m_pWndRoot->GetLayoutRect(); CRect rectWindow = GetWindowRect(); CPoint point( rectRoot.right - rectWindow.Width(), 110 ); Move( point ); MoveParentCenter(); }
BOOL CWndNeuz::OnChildNotify( UINT message, UINT nID, LRESULT* pLResult ) { if( message == WNM_CLICKED ) { switch(nID) { case WTBID_HELP: // 핼프 버튼 { #ifdef __CLIENT LPWNDAPPLET lpWndApplet = m_resMng.GetAt ( GetWndId() ); #ifdef __HELP_BUG_FIX if(g_WndMng.m_pWndHelpInstant) SAFE_DELETE(g_WndMng.m_pWndHelpInstant); g_WndMng.m_pWndHelpInstant = new CWndHelpInstant; g_WndMng.m_pWndHelpInstant->m_strHelpKey = lpWndApplet->strToolTip; g_WndMng.m_pWndHelpInstant->Initialize(); #else //__HELP_BUG_FIX // 헬프 이중생성 방지 for( int i=0; i<g_vecHelpInsKey.size(); i++ ) { if( g_vecHelpInsKey[i] == lpWndApplet->strToolTip ) return FALSE; } CWndHelpInstant* pHelpInstant = new CWndHelpInstant; pHelpInstant->m_strHelpKey = lpWndApplet->strToolTip; // 헬프 이중생성 방지 g_vecHelpInsKey.push_back( pHelpInstant->m_strHelpKey ); pHelpInstant->Initialize(); #endif //__HELP_BUG_FIX #endif } break; case WTBID_MIN: // 최소화 break; case WTBID_MAX: // 최대화 if( m_nWinSize == WSIZE_WINDOW ) SetSizeMax(); else SetSizeWnd(); break; case WTBID_CLOSE: // 종료 { #ifdef __CLIENT #ifndef __HELP_BUG_FIX // 헬프 이중생성 방지 if( GetWndId() == APP_HELP_INSTANT ) { CString strKey = ((CWndHelpInstant*)this)->m_strHelpKey; vector<CString>::iterator where = find(g_vecHelpInsKey.begin(), g_vecHelpInsKey.end(), strKey ); if(where != g_vecHelpInsKey.end()) g_vecHelpInsKey.erase(where); } #endif //__HELP_BUG_FIX #endif Destroy(); } break; } } return TRUE; }