home *** CD-ROM | disk | FTP | other *** search
- /*
- Miranda Installer - Installs nightlies and Miranda addons.
- Copyright (C) 2002-2003 Goblineye Entertainment
-
- Authors: Saar (Tornado) and Kai (kai_b)
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
- #include "MirandaInstaller.h"
- #pragma hdrstop
-
-
-
- INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam)
- {
- switch(uMsg)
- {
- case WM_INITDIALOG:
- {
- SendDlgItemMessage(hwndDlg,IDC_OPTSDLG_MIRANDADIR,EM_LIMITTEXT,MAX_PATH-1,0);
- SendDlgItemMessage(hwndDlg,IDC_OPTSDLG_ICONDIR,EM_LIMITTEXT,MAX_PATH-1,0);
- SendDlgItemMessage(hwndDlg,IDC_OPTSDLG_SOUNDDIR,EM_LIMITTEXT,MAX_PATH-1,0);
- SendDlgItemMessage(hwndDlg,IDC_OPTSDLG_LANGDIR,EM_LIMITTEXT,MAX_PATH-1,0);
- SendDlgItemMessage(hwndDlg,IDC_OPTSDLG_TOOLDIR,EM_LIMITTEXT,MAX_PATH-1,0);
- SendDlgItemMessage(hwndDlg,IDC_OPTSDLG_SRCDIR,EM_LIMITTEXT,MAX_PATH-1,0);
- SendDlgItemMessage(hwndDlg,IDC_OPTSDLG_DOCSDIR,EM_LIMITTEXT,MAX_PATH-1,0);
- SendDlgItemMessage(hwndDlg,IDC_OPTSDLG_SKINDIR,EM_LIMITTEXT,MAX_PATH-1,0);
- SendDlgItemMessage(hwndDlg,IDC_OPTSDLG_SKINDIR,EM_LIMITTEXT,MAX_PATH-1,0);
- SendDlgItemMessage(hwndDlg,IDC_OPTSDLG_PROFILENAME,EM_LIMITTEXT,MAX_PATH-1,0);
-
- if (lstrlen(g_WorkOptions.szMirandaDirectory) == 0) // nada. let's set it
- {
- HKEY hKey;
- if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,"SOFTWARE\\Miranda",0,KEY_READ,&hKey) == ERROR_SUCCESS)
- {
- DWORD dwTemp = sizeof(g_WorkOptions.szMirandaDirectory);
- RegQueryValueEx(hKey,"Install_Dir",NULL,NULL,(LPBYTE)g_WorkOptions.szMirandaDirectory,&dwTemp);
- // normally a "to-be-careful" NULLing would go here, but strings in the registry
- // are always NULL terminated, so what's the point...
- RegCloseKey(hKey);
-
- // if we have a backslash at the end, take it off
- if (*(g_WorkOptions.szMirandaDirectory + lstrlen(g_WorkOptions.szMirandaDirectory) - 1) == '\\')
- {
- *(g_WorkOptions.szMirandaDirectory + lstrlen(g_WorkOptions.szMirandaDirectory) - 1) = '\0';
- }
- }
- else // no registry stuff. use current directory
- {
- GetModuleFileName(NULL,g_WorkOptions.szMirandaDirectory,sizeof(g_WorkOptions.szMirandaDirectory));
- *strrchr(g_WorkOptions.szMirandaDirectory,'\\') = '\0';
- }
-
- // apply to other directories
- for (byte index=0;index < 7;index++)
- {
- char *lpCopyTo; // exactly what it means
- char szTemp2[MAX_PATH + 1];
- lstrcpy(szTemp2,g_WorkOptions.szMirandaDirectory);
- lstrcat(szTemp2,"\\");
-
- switch(index)
- {
- case 0:
- {
- lstrcat(szTemp2,"Icons");
- lpCopyTo = g_WorkOptions.szIconDirectory;
- } break;
- case 1:
- {
- lstrcat(szTemp2,"Sounds");
- lpCopyTo = g_WorkOptions.szSoundDirectory;
- } break;
- case 2:
- {
- lstrcat(szTemp2,"Language");
- lpCopyTo = g_WorkOptions.szLangDirectory;
- } break;
- case 3:
- {
- lstrcat(szTemp2,"Tools");
- lpCopyTo = g_WorkOptions.szToolDirectory;
- } break;
- case 4:
- {
- lstrcat(szTemp2,"Source");
- lpCopyTo = g_WorkOptions.szSrcDirectory;
- } break;
- case 5:
- {
- lstrcat(szTemp2,"Docs");
- lpCopyTo = g_WorkOptions.szDocDirectory;
- } break;
- case 6:
- {
- lstrcat(szTemp2,"Skins");
- lpCopyTo = g_WorkOptions.szSkinDirectory;
- } break;
- }
-
- lstrcpy(lpCopyTo,szTemp2);
- }
- }
-
- // now set all of it
- SetDlgItemText(hwndDlg,IDC_OPTSDLG_MIRANDADIR,g_WorkOptions.szMirandaDirectory);
- SetDlgItemText(hwndDlg,IDC_OPTSDLG_ICONDIR,g_WorkOptions.szIconDirectory);
- SetDlgItemText(hwndDlg,IDC_OPTSDLG_SOUNDDIR,g_WorkOptions.szSoundDirectory);
- SetDlgItemText(hwndDlg,IDC_OPTSDLG_LANGDIR,g_WorkOptions.szLangDirectory);
- SetDlgItemText(hwndDlg,IDC_OPTSDLG_TOOLDIR,g_WorkOptions.szToolDirectory);
- SetDlgItemText(hwndDlg,IDC_OPTSDLG_SRCDIR,g_WorkOptions.szSrcDirectory);
- SetDlgItemText(hwndDlg,IDC_OPTSDLG_DOCSDIR,g_WorkOptions.szDocDirectory);
- SetDlgItemText(hwndDlg,IDC_OPTSDLG_SKINDIR,g_WorkOptions.szSkinDirectory);
- SetDlgItemText(hwndDlg,IDC_OPTSDLG_PROFILENAME,g_WorkOptions.szDefaultProfile);
-
- CheckDlgButton(hwndDlg,IDC_OPTSDLG_ASKAUTORUN,(g_WorkOptions.dwFlags & 1) ? (BST_CHECKED) : (BST_UNCHECKED));
- CheckDlgButton(hwndDlg,IDC_OPTSDLG_ASKCLOSEMIR,(g_WorkOptions.dwFlags & 0x8) ? (BST_CHECKED) : (BST_UNCHECKED));
-
- byte bInstallType = (byte)((g_WorkOptions.dwFlags & 6) >> 1);
- CheckRadioButton(hwndDlg,IDC_OPTSDLG_ALWAYSASK,IDC_OPTSDLG_ALWAYSALL,((bInstallType == 0) ? (IDC_OPTSDLG_ALWAYSASK) : ((bInstallType == 1) ? (IDC_OPTSDLG_ALWAYSALL) : (IDC_OPTSDLG_ALWAYSMAIN))));
-
- LP_TranslateDialog(hwndDlg);
- return(true);
- } break;
- case WM_COMMAND:
- {
- if (HIWORD(wParam) == BN_CLICKED) // If we clicked
- {
- switch (LOWORD(wParam))
- {
- case IDCANCEL:
- {
- EndDialog(hwndDlg,1);
- return(true);
- } break;
- case IDOK:
- {
- // save settings here
- char szTemp[MAX_PATH];
- char *lpCopyTo;
-
- for (byte index=0;index < 8;index++)
- {
- GetDlgItemText(hwndDlg,IndexToDirID[index],szTemp,MAX_PATH);
-
- switch(index)
- {
- case 0: lpCopyTo = g_WorkOptions.szMirandaDirectory; break;
- case 1: lpCopyTo = g_WorkOptions.szIconDirectory; break;
- case 2: lpCopyTo = g_WorkOptions.szSoundDirectory; break;
- case 3: lpCopyTo = g_WorkOptions.szLangDirectory; break;
- case 4: lpCopyTo = g_WorkOptions.szToolDirectory; break;
- case 5: lpCopyTo = g_WorkOptions.szSrcDirectory; break;
- case 6: lpCopyTo = g_WorkOptions.szDocDirectory; break;
- case 7: lpCopyTo = g_WorkOptions.szSkinDirectory; break;
- }
-
- lstrcpy(lpCopyTo,szTemp);
- }
-
- g_WorkOptions.dwFlags &= ~1;
- if (IsDlgButtonChecked(hwndDlg,IDC_OPTSDLG_ASKAUTORUN) == BST_CHECKED)
- {
- g_WorkOptions.dwFlags |= 1; // got it
- }
-
- g_WorkOptions.dwFlags &= ~0x8;
- if (IsDlgButtonChecked(hwndDlg,IDC_OPTSDLG_ASKCLOSEMIR) == BST_CHECKED)
- {
- g_WorkOptions.dwFlags |= 0x8; // got it
- }
-
- // installation type
- g_WorkOptions.dwFlags &= ~6; // clear
- if (IsDlgButtonChecked(hwndDlg,IDC_OPTSDLG_ALWAYSMAIN) == BST_CHECKED)
- {
- g_WorkOptions.dwFlags |= 4; // main
- }
- else if (IsDlgButtonChecked(hwndDlg,IDC_OPTSDLG_ALWAYSALL) == BST_CHECKED)
- {
- g_WorkOptions.dwFlags |= 2; // all
- }
- // no need to handle ask
- *szTemp = '\0';
- GetDlgItemText(hwndDlg,IDC_OPTSDLG_PROFILENAME,szTemp,MAX_PATH);
- if (*szTemp != '\0') // got smt there
- {
- CharLower(szTemp); // convert to lowercase
- }
- lstrcpy(g_WorkOptions.szDefaultProfile,szTemp);
-
- EndDialog(hwndDlg,0);
- return(true);
- } break;
- case IDC_OPTSDLG_MIRBROWSE:
- case IDC_OPTSDLG_ICONBROWSE:
- case IDC_OPTSDLG_SOUNDBROWSE:
- case IDC_OPTSDLG_LANGBROWSE:
- case IDC_OPTSDLG_TOOLBROWSE:
- case IDC_OPTSDLG_SRCBROWSE:
- case IDC_OPTSDLG_DOCSBROWSE:
- case IDC_OPTSDLG_SKINBROWSE:
- {
- // more code from wassup
- // heh :)
- char szDirectory[MAX_PATH + 1];
-
- BROWSEINFO browseInfo;
- ZeroMemory(&browseInfo,sizeof(BROWSEINFO)); // quicker than NULLing everything
- browseInfo.hwndOwner = hwndDlg;
- browseInfo.pszDisplayName = szDirectory;
- browseInfo.lpszTitle = Translate("Select directory:");
- browseInfo.ulFlags = BIF_RETURNONLYFSDIRS | BIF_NEWDIALOGSTYLE;
-
- LPITEMIDLIST idList;
- if (idList = SHBrowseForFolder(&browseInfo),idList != NULL) // old habit
- {
- LPMALLOC psMalloc; // [soon to be] pointer to shell's IMalloc object
- SHGetMalloc(&psMalloc);
- SHGetPathFromIDList(idList,szDirectory);
- psMalloc->Free(idList); // release the damn idList
- psMalloc->Release();
-
- // ok now szDirectory is the directory where we're going to put our stuff
- // the lstrlen is so we won't cut up the string
- if ((szDirectory[lstrlen(szDirectory)-1] == '\\') && (lstrlen(szDirectory) > 1)) // backslash
- {
- szDirectory[lstrlen(szDirectory)-1] = '\0';
- }
-
- if (lstrlen(szDirectory) > 0)
- {
- WORD wDestCtrl;
- switch(LOWORD(wParam))
- {
- case IDC_OPTSDLG_MIRBROWSE: wDestCtrl = IDC_OPTSDLG_MIRANDADIR; break;
- case IDC_OPTSDLG_ICONBROWSE: wDestCtrl = IDC_OPTSDLG_ICONDIR; break;
- case IDC_OPTSDLG_SOUNDBROWSE: wDestCtrl = IDC_OPTSDLG_SOUNDDIR; break;
- case IDC_OPTSDLG_LANGBROWSE: wDestCtrl = IDC_OPTSDLG_LANGDIR; break;
- case IDC_OPTSDLG_TOOLBROWSE: wDestCtrl = IDC_OPTSDLG_TOOLDIR; break;
- case IDC_OPTSDLG_SRCBROWSE: wDestCtrl = IDC_OPTSDLG_SRCDIR; break;
- case IDC_OPTSDLG_DOCSBROWSE: wDestCtrl = IDC_OPTSDLG_DOCSDIR; break;
- case IDC_OPTSDLG_SKINBROWSE: wDestCtrl = IDC_OPTSDLG_SKINDIR; break;
- }
- SetDlgItemText(hwndDlg,wDestCtrl,szDirectory);
-
- if (LOWORD(wParam) == IDC_OPTSDLG_MIRBROWSE)
- {
- // set it for the rest with the thingy
- char szNewDir[MAX_PATH + 1];
- lstrcat(szDirectory,"\\");
-
- for (byte index=0;index < 7;index++) // set for rest
- {
- lstrcpy(szNewDir,szDirectory);
- switch(index)
- {
- case 0: lstrcat(szNewDir,"Icons"); break;
- case 1: lstrcat(szNewDir,"Sounds"); break;
- case 2: lstrcat(szNewDir,"Language"); break;
- case 3: lstrcat(szNewDir,"Tools"); break;
- case 4: lstrcat(szNewDir,"Source"); break;
- case 5: lstrcat(szNewDir,"Docs"); break;
- case 6: lstrcat(szNewDir,"Skins"); break;
- }
-
- SetDlgItemText(hwndDlg,IDC_OPTSDLG_ICONDIR+index,szNewDir);
- }
- }
- }
- }
- return(true);
- } break;
- }
- }
- } break;
- case WM_CLOSE:
- {
- EndDialog(hwndDlg,1);
- } break;
- }
- return(false);
- }
-
-
-
- INT_PTR CALLBACK LangPackDlgProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam)
- {
- switch(uMsg)
- {
- case WM_INITDIALOG:
- {
- // ok now we find all langpacks in langdir
- // then add current langpack
- // if we find more than one current langpack (shouldn't be, but could be)
- // then both are marked as "(current)"
- HWND hComboBox = GetDlgItem(hwndDlg,IDC_LANGPACKDLG_LPCOMBO);
- char szSearchPath[MAX_PATH + 1];
- WIN32_FIND_DATA findData;
- wsprintf(szSearchPath,"%s\\langpack_*.txt",g_WorkOptions.szLangDirectory);
-
- // before we start, we add a "(No langpack)" string
- SendMessage(hComboBox,CB_ADDSTRING,0,(LPARAM)Translate("(No Language Pack)"));
- SendMessage(hComboBox,CB_SETITEMDATA,0,2); // no langpack
- SendMessage(hComboBox,CB_SETCURSEL,0,0); // cursel
-
- HANDLE hFindFile;
- if (hFindFile = FindFirstFile(szSearchPath,&findData), hFindFile != INVALID_HANDLE_VALUE)
- {
- do
- {
- *strrchr(findData.cFileName,'.') = '\0'; // cut extension
- CharLower(findData.cFileName); // convert to lowercase
- int iItem = SendMessage(hComboBox,CB_ADDSTRING,0,(LPARAM)findData.cFileName);
-
- SendMessage(hComboBox,CB_SETITEMDATA,iItem,0); // not active
- } while (FindNextFile(hFindFile,&findData));
- }
-
- // now find installed langpack[s]
- wsprintf(szSearchPath,"%s\\langpack_*.txt",g_WorkOptions.szMirandaDirectory);
- if (hFindFile = FindFirstFile(szSearchPath,&findData), hFindFile != INVALID_HANDLE_VALUE)
- {
- do
- {
- char szTemp[MAX_PATH+32]; // to be safe. buffer overrun sux.
- *strrchr(findData.cFileName,'.') = '\0'; // cut extension
- CharLower(findData.cFileName); // convert to lowercase
-
- // let's try to find this lang pack in the current list
- // if it's there, we will delete that file from the list
- // no need to delete it from the dir, it'll be overwritten
- int iSearchItem = SendMessage(hComboBox,CB_FINDSTRINGEXACT,-1,(LPARAM)findData.cFileName);
- if (iSearchItem != CB_ERR)
- {
- SendMessage(hComboBox,CB_DELETESTRING,iSearchItem,0); // gone
- }
-
- wsprintf(szTemp,Translate("%s (Current)"),findData.cFileName);
- findData.cFileName[lstrlen(findData.cFileName)] = '.'; // bring it back (needed soon)
-
- int iItem = SendMessage(hComboBox,CB_INSERTSTRING,1,(LPARAM)szTemp);
-
- SendMessage(hComboBox,CB_SETITEMDATA,iItem,1); // active
- SendMessage(hComboBox,CB_SETCURSEL,iItem,0); // cursel
-
- // now move file from main dir to lang dir
- // szSearchPath is dest
- wsprintf(szSearchPath,"%s\\%s",g_WorkOptions.szLangDirectory,findData.cFileName);
- wsprintf(szTemp,"%s\\%s",g_WorkOptions.szMirandaDirectory,findData.cFileName);
- MoveFile(szTemp,szSearchPath); // MoveFileEx isn't supported on 9x
- } while (FindNextFile(hFindFile,&findData));
- }
-
- LP_TranslateDialog(hwndDlg);
- return(true);
- } break;
- case WM_COMMAND:
- {
- if (HIWORD(wParam) == BN_CLICKED) // If we clicked
- {
- switch (LOWORD(wParam))
- {
- case IDOK:
- {
- // copy back selection
- HWND hComboBox = GetDlgItem(hwndDlg,IDC_LANGPACKDLG_LPCOMBO);
- int iCurSel = SendMessage(hComboBox,CB_GETCURSEL,0,0);
- if (iCurSel == CB_ERR)
- {
- iCurSel = 0; // make it 0
- }
-
- int iType = SendMessage(hComboBox,CB_GETITEMDATA,iCurSel,0);
- if (iType != 2) // we don't do anything, no langpack is to be used
- {
- int iLen = SendMessage(hComboBox,WM_GETTEXTLENGTH,0,0);
- if (iLen > 0) // caution
- {
- char szSrc[MAX_PATH + 1], szDest[MAX_PATH + 1];
- char *szTemp = new char[iLen + 1]; // not a big fan of allocation for practically nothing, but this is better
- GetDlgItemText(hwndDlg,IDC_LANGPACKDLG_LPCOMBO,szTemp,iLen+1);
-
- if (iType == 1) // active
- {
- *(strrchr(szTemp,'(')-1) = '\0'; // take off the ending
- }
-
- wsprintf(szSrc,"%s\\%s.txt",g_WorkOptions.szLangDirectory,szTemp);
- wsprintf(szDest,"%s\\%s.txt",g_WorkOptions.szMirandaDirectory,szTemp);
-
- MoveFile(szSrc,szDest);
-
- delete [] szTemp;
- }
- }
- EndDialog(hwndDlg,1);
- return(true);
- } break;
- case IDCANCEL:
- {
- // we copy back a current one
- HWND hComboBox = GetDlgItem(hwndDlg,IDC_LANGPACKDLG_LPCOMBO);
- for (int index=0, iCount = SendMessage(hComboBox,CB_GETCOUNT,0,0);index < iCount;index++)
- {
- if (SendMessage(hComboBox,CB_GETITEMDATA,index,0) == 1) // current
- {
- int iLen = SendMessage(hComboBox,WM_GETTEXTLENGTH,0,0);
- if (iLen > 0) // caution
- {
- char szSrc[MAX_PATH + 1], szDest[MAX_PATH + 1];
- char *szTemp = new char[iLen + 1];
- GetDlgItemText(hwndDlg,IDC_LANGPACKDLG_LPCOMBO,szTemp,iLen+1);
-
- *(strrchr(szTemp,'(')-1) = '\0'; // take off the ending
-
- wsprintf(szSrc,"%s\\%s.txt",g_WorkOptions.szLangDirectory,szTemp);
- wsprintf(szDest,"%s\\%s.txt",g_WorkOptions.szMirandaDirectory,szTemp);
-
- MoveFile(szSrc,szDest);
-
- delete [] szTemp;
- break;
- }
- }
- }
- EndDialog(hwndDlg,0);
- } break;
- }
- }
- } break;
- case WM_CLOSE:
- {
- return(true);
- } break;
- }
- return(false);
- }
-
-
-
- INT_PTR CALLBACK AboutDlgProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam)
- {
- static HFONT s_hFont = NULL;
- static HCURSOR s_hCursor = NULL;
-
- switch(uMsg)
- {
- case WM_INITDIALOG:
- {
- LP_TranslateDialog(hwndDlg);
-
- HFONT hFont = (HFONT)SendDlgItemMessage(hwndDlg,IDC_ABOUTDLG_HYPERLINK,WM_GETFONT,0,0); // try getting the font used by the control
-
- if (hFont == NULL) // if none...
- hFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT); // get the default font used by the GUI
-
- LOGFONT logFont; // font information
- GetObject(hFont,sizeof(logFont),&logFont); // get font information
- logFont.lfUnderline = true; // underline it
- s_hFont = CreateFontIndirect(&logFont); // recreate the font, underlined
-
- char szBuffer[32]; // big enough
- GetDlgItemText(hwndDlg,IDC_ABOUTDLG_HYPERLINK,szBuffer,32);
-
- if (s_hFont != NULL)
- {
- SendDlgItemMessage(hwndDlg,IDC_ABOUTDLG_HYPERLINK,WM_SETFONT,(WPARAM)s_hFont,true);
- }
-
- OSVERSIONINFO osVers;
- osVers.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
- GetVersionEx(&osVers);
- if ((osVers.dwMajorVersion == 5) || ((osVers.dwMajorVersion == 4) && ((osVers.dwMinorVersion == 10) || (osVers.dwMinorVersion == 90))))
- {
- s_hCursor = LoadCursor(NULL,IDC_HAND);
- }
- else
- {
- s_hCursor = LoadCursor(g_hInstance,MAKEINTRESOURCE(IDC_MYHAND));
- }
- } break;
- case WM_COMMAND:
- {
- if (HIWORD(wParam) == BN_CLICKED) // If we clicked
- {
- switch (LOWORD(wParam))
- {
- case IDCANCEL:
- {
- EndDialog(hwndDlg,1);
- return(true);
- } break;
- case IDC_ABOUTDLG_HYPERLINK: // the hyperlink text was clicked
- {
- char szBuffer[32]; // big enough
- GetDlgItemText(hwndDlg,IDC_ABOUTDLG_HYPERLINK,szBuffer,32);
- ShellExecute(NULL,"open",szBuffer,NULL,NULL,SW_SHOWNORMAL);
- EndDialog(hwndDlg,1); // close this dialog
- return(true);
- } break;
- }
- }
- } break;
- case WM_SETCURSOR: // the mouse is moving
- {
- if ((HWND)wParam == GetDlgItem(hwndDlg,IDC_ABOUTDLG_HYPERLINK))
- {
- SetCursor(s_hCursor);
- SetWindowLongPtr(hwndDlg,DWL_MSGRESULT,true);
- return(true);
- }
- } break;
- case WM_CTLCOLORSTATIC:
- {
- // draw the text in a different color
- HWND hwndDraw = (HWND)lParam;
- if (hwndDraw == GetDlgItem(hwndDlg,IDC_ABOUTDLG_HYPERLINK))
- {
- HDC hDC = (HDC)wParam;
- SetTextColor(hDC,RGB(0,0,255));
- SetBkMode(hDC,TRANSPARENT);
- return((BOOL)GetStockObject(NULL_BRUSH));
- }
- } break;
- case WM_DESTROY:
- {
- if (s_hFont != NULL)
- {
- SendDlgItemMessage(hwndDlg,IDC_ABOUTDLG_HYPERLINK,WM_SETFONT,NULL,true);
- DeleteObject(s_hFont);
- }
- } break;
- default:break;
- }
- return(false);
- }