result WebForm::OnInitializing(void) { result r = E_SUCCESS; // TODO: Add your initialization code here r = CreateWebControl(); if (IsFailed(r)) { AppLog("CreateMainForm() has failed.\n"); goto CATCH; } __pWeb->LoadUrl("file:///Res/index.html"); //__pWeb->LoadUrl("file:///Res/mobile-spec/index.html"); return r; CATCH: return false; }
BOOL CBetaPatchClientDlg::InitControls() { #ifdef __LANG_RUS enum PublisherVersion { PUBLISHER_VERSION_1 = 0, PUBLISHER_VERSION_2 = 1 }; PublisherVersion ePublisherVersion = PUBLISHER_VERSION_1; CScanner scanner; if( scanner.Load( "a.txt" ) == TRUE ) { int nKeyNumber = scanner.GetNumber(); if( nKeyNumber == 1 ) ePublisherVersion = PUBLISHER_VERSION_2; else ePublisherVersion = PUBLISHER_VERSION_1; } else ePublisherVersion = PUBLISHER_VERSION_1; #endif // __LANG_RUS #ifdef __LANG_RUS DWORD dwBitmapID = ( ePublisherVersion == PUBLISHER_VERSION_1 ) ? IDC_BITMAP_MAIN : IDC_BITMAP_MAIN_2; if( m_pic.Load( dwBitmapID ) ) #else // __LANG_RUS if( m_pic.Load( IDC_BITMAP_MAIN ) ) #endif // __LANG_RUS { CSize size = m_pic.GetImageSize(); SetWindowPos( NULL, 0, 0, size.cx, size.cy, SWP_NOZORDER | SWP_NOMOVE ); HRGN hRgn = CreateRoundRectRgn( 0, 0, size.cx, size.cy, 20, 20 ); if( hRgn ) ::SetWindowRgn( m_hWnd, hRgn, FALSE ); } int nInfoGap = 0; int nWeblinkGap = 0; #if defined(__LANG_JAP) #if 0 //JAPAN 패치 클라이언트 이미지 변경관련 삭제. nInfoGap = 5; nWeblinkGap = 35; srand( (unsigned)time( NULL ) ); int nsel = rand()%4; UINT nchrarry[4] = { IDB_BITMAP_CHAR1, IDB_BITMAP_CHAR3, IDB_BITMAP_CHAR5, IDB_BITMAP_CHAR7 }; UINT nchrarryM[4] = { IDB_BITMAP_CHAR2, IDB_BITMAP_CHAR4, IDB_BITMAP_CHAR6, IDB_BITMAP_CHAR8 }; m_bmpchr[0].LoadBitmap( nchrarry[nsel] ); m_bmpchr[1].LoadBitmap( nchrarryM[nsel] ); #endif #endif // __LANG_JAP m_Button_Exit.SetBitmaps(IDB_BITMAP_CLOSE00, RGB(255, 0, 255), IDB_BITMAP_CLOSE01, RGB(255, 0, 255) ); m_Button_Exit.SetAlign(CButtonST::ST_ALIGN_OVERLAP, FALSE); m_Button_Exit.SetPressedStyle(CButtonST::BTNST_PRESSED_LEFTRIGHT, FALSE); m_Button_Exit.SetColor(CButtonST::BTNST_COLOR_FG_IN, RGB(0, 0, 0)); m_Button_Exit.SetColor(CButtonST::BTNST_COLOR_FG_OUT, RGB(0, 0, 0)); m_Button_Exit.SizeToContent(); m_Button_Exit.DrawTransparent(TRUE); m_Button_Exit.DrawBorder(FALSE, FALSE); m_Button_Exit.SetBtnCursor(IDC_CURSOR1); m_Button_Option.SetBitmaps(IDB_BITMAP_OPTION00, RGB(255, 0, 255), IDB_BITMAP_OPTION01, RGB(255, 0, 255) ); m_Button_Option.SetAlign(CButtonST::ST_ALIGN_OVERLAP, FALSE); m_Button_Option.SetPressedStyle(CButtonST::BTNST_PRESSED_LEFTRIGHT, FALSE); m_Button_Option.SetColor(CButtonST::BTNST_COLOR_FG_IN, RGB(0, 0, 0)); m_Button_Option.SetColor(CButtonST::BTNST_COLOR_FG_OUT, RGB(0, 0, 0)); m_Button_Option.SizeToContent(); m_Button_Option.DrawTransparent(TRUE); m_Button_Option.DrawBorder(FALSE, FALSE); m_Button_Option.SetBtnCursor(IDC_CURSOR1); m_Button_Start.SetBitmaps(IDB_BITMAP_START00, RGB(255, 0, 255), IDB_BITMAP_START01, RGB(255, 0, 255) ); m_Button_Start.SetAlign(CButtonST::ST_ALIGN_OVERLAP, FALSE); m_Button_Start.SetPressedStyle(CButtonST::BTNST_PRESSED_LEFTRIGHT, FALSE); m_Button_Start.SetColor(CButtonST::BTNST_COLOR_FG_IN, RGB(0, 0, 0)); m_Button_Start.SetColor(CButtonST::BTNST_COLOR_FG_OUT, RGB(0, 0, 0)); m_Button_Start.SizeToContent(); m_Button_Start.DrawTransparent(TRUE); m_Button_Start.DrawBorder(FALSE, FALSE); m_Button_Start.SetBtnCursor(IDC_CURSOR1); m_Button_Register.SetBitmaps(IDB_BITMAP_REGISTER00, RGB(255, 0, 255), IDB_BITMAP_REGISTER01, RGB(255, 0, 255) ); m_Button_Register.SetAlign(CButtonST::ST_ALIGN_OVERLAP, FALSE); m_Button_Register.SetPressedStyle(CButtonST::BTNST_PRESSED_LEFTRIGHT, FALSE); m_Button_Register.SetColor(CButtonST::BTNST_COLOR_FG_IN, RGB(0, 0, 0)); m_Button_Register.SetColor(CButtonST::BTNST_COLOR_FG_OUT, RGB(0, 0, 0)); m_Button_Register.SizeToContent(); m_Button_Register.DrawTransparent(TRUE); m_Button_Register.DrawBorder(FALSE, FALSE); m_Button_Register.SetBtnCursor(IDC_CURSOR1); #if defined(__LANG_ENG_USA) || defined(__LANG_ENG_USATEST) || defined(__LANG_GER) || defined(__LANG_FRA) || defined(__LANG_POR) m_Button_Register.ShowWindow(SW_SHOW); #else m_Button_Register.ShowWindow(SW_HIDE); #endif // static //#if defined(__LANG_THAI) //Background Image 교체로 Font Color 변경 COLORREF cr = RGB( 0,0,0 ); m_Static_CurrentState.SetTextColor( cr ); m_Static_CurrentState.SetFontBold(true); m_Static_DownSpeed.SetTextColor( cr ); m_Static_FileNumber.SetTextColor( cr ); m_Static_MasqueradeVersion.SetTextColor( cr ); m_Static_MasqueradeVersion.SetFontBold(true); //#endif /*#if (__CURRENT_LANG == LANG_ENG || __CURRENT_LANG == LANG_GER || __CURRENT_LANG == LANG_FRA )//|| __CURRENT_CNTRY == CNTRY_TWN) #if __VER == 12 COLORREF cr = RGB( 255, 255, 255 ); m_Static_CurrentState.SetTextColor( cr ); m_Static_DownSpeed.SetTextColor( cr ); m_Static_FileNumber.SetTextColor( cr ); m_Static_MasqueradeVersion.SetTextColor( cr ); #endif #endif*/ #ifdef __HANGAME0307 // 한게임 대응 버젼 TCHAR* szText = HOME_LINK; TCHAR* szURL = HOME_LINK; TCHAR* szWebURL = WEB_FIRST_PAGE; if( AfxGetApp()->m_lpCmdLine[0] != '\0' && memcmp( AfxGetApp()->m_lpCmdLine, "hangame.co.jp", 13 ) == 0 ) { szText = "http://www.hangame.co.jp"; szURL = "http://www.hangame.co.jp/game.asp?fo"; szWebURL = "http://www.flyff.jp/in_client/info/list.asp?domain=hangame.co.jp"; } #else // 일반버젼 #ifdef __LANG_RUS TCHAR* szText = ( ePublisherVersion == PUBLISHER_VERSION_1 ) ? HOME_LINK : HOME_LINK_2; TCHAR* szURL = ( ePublisherVersion == PUBLISHER_VERSION_1 ) ? HOME_LINK : HOME_LINK_2; TCHAR* szWebURL = ( ePublisherVersion == PUBLISHER_VERSION_1 ) ? WEB_FIRST_PAGE : WEB_FIRST_PAGE_2; #else // __LANG_RUS TCHAR* szText = HOME_LINK; TCHAR* szURL = HOME_LINK; TCHAR* szWebURL = WEB_FIRST_PAGE; #endif // __LANG_RUS #endif // __HANGAME0307 #if __CURRENT_LANG == LANG_KOR #ifdef __LINK_PORTAL // 한국 : 엔젤, 버디 포탈 링크 연결 TCHAR szArg1[64] = {0, }; TCHAR szArg2[64] = {0, }; _stscanf( AfxGetApp()->m_lpCmdLine, "%s %s", szArg1, szArg2 ); // AfxMessageBox( AfxGetApp()->m_lpCmdLine ); CString strCmdLine; strCmdLine.Format("%s", szArg2); int nLength = strCmdLine.GetLength(); if(nLength > 4) { CString strCmpWord = strCmdLine.Mid(nLength-4, nLength); if(strCmpWord == "__an") { szText = "http://af.gameangel.com"; szURL = "http://af.gameangel.com"; } else if(strCmpWord == "__bu") { szText = "http://flyff.buddybuddy.co.kr"; szURL = "http://flyff.buddybuddy.co.kr"; } } #endif //__LINK_PORTAL #endif // LANG_KOR // 홈페이지 링크 m_Static_HomeLink.SetWindowText( szText ); /*#if __CURRENT_CNTRY == CNTRY_HK m_Static_HomeLink.SetWindowPos( NULL, 300, 22+nWeblinkGap, 0, 0, SWP_NOZORDER | SWP_NOSIZE | SWP_NOREDRAW ); #else*/ m_Static_HomeLink.SetWindowPos( NULL, 280, 242+nWeblinkGap, 0, 0, SWP_NOZORDER | SWP_NOSIZE | SWP_NOREDRAW ); //#endif #if __CURRENT_LANG == LANG_THA m_Static_HomeLink.SetColours( RGB( 190, 30, 20 ), RGB( 240, 130, 180), RGB( 112, 147, 219 ) ); #elif __CURRENT_LANG == LANG_RUS m_Static_HomeLink.SetColours( RGB( 255, 255, 255 ), RGB( 255, 0, 0 ), RGB( 0, 130, 0 ) ); #elif __CURRENT_LANG == LANG_GER m_Static_HomeLink.SetColours( RGB( 193, 177, 160 ), RGB( 255, 0, 0 ), RGB( 255, 0, 0 ) ); #elif __CURRENT_LANG == LANG_ENG // ascension m_Static_HomeLink.SetColours( RGB( 255, 255, 255 ), RGB( 0, 0, 255 ), RGB( 0, 0, 255 ) ); #elif __CURRENT_LANG == LANG_FRA m_Static_HomeLink.SetColours( RGB( 193, 177, 160 ), RGB( 255, 0, 0 ), RGB( 255, 0, 0 ) ); #elif __CURRENT_LANG == LANG_POR m_Static_HomeLink.SetColours( RGB( 255, 255, 255 ), RGB( 255, 0, 0 ), RGB( 255, 0, 0 ) ); #else m_Static_HomeLink.SetColours( RGB( 0, 0, 0), RGB( 255, 0, 0), RGB( 0, 130, 0 ) ); #endif m_Static_HomeLink.SetURL( szURL ); m_Static_HomeLink.SetUnderline( CHyperLink::ulAlways ); #ifdef __LANG_JAP //JAPAN 패치 클라이언트 이미지 변경관련 삭제. m_Static_HomeLink.EnableWindow(FALSE); m_Static_HomeLink.ShowWindow(FALSE); #endif //__LANG_JAP // Progress 초기화 m_File_Progress.SetPos(0); m_Total_Progress.SetPos(0); CreateWebControl( szWebURL ); GetDlgItem( IDC_BUTTON_START )->MoveWindow( 25, 465, 100, 20 ); GetDlgItem( IDC_BUTTON_REGISTER )->MoveWindow( 145, 465, 100, 20 ); GetDlgItem( IDC_OPTION )->MoveWindow( 250, 465, 100, 20 ); GetDlgItem( IDC_EXIT )->MoveWindow( 355, 465, 100, 20 ); GetDlgItem( IDC_CURRENT_STATE)->MoveWindow( 25, 495, 170, 20 ); GetDlgItem( IDC_DOWN_SPEED)->MoveWindow( 200, 495, 100, 20 ); GetDlgItem( IDC_FILE_NUMBER)->MoveWindow( 350, 495, 100, 20 ); GetDlgItem( IDC_FILEPROGRESS )->MoveWindow( 25, 515, 430, 20 ); GetDlgItem( IDC_TOTALPROGRESS)->MoveWindow( 25, 540, 430, 20 ); GetDlgItem( IDC_MASQUERADEVERSION)->MoveWindow( 200, 570-nInfoGap, 200, 20 ); return TRUE; }