diff --git a/src/Cedar/WinUi.c b/src/Cedar/WinUi.c index aef66e71..6a543079 100644 --- a/src/Cedar/WinUi.c +++ b/src/Cedar/WinUi.c @@ -1130,25 +1130,6 @@ void FreeWizard(WIZARD *w) Free(w); } -// Get the index page of the wizard -UINT GetWizardPageIndex(WIZARD *w, UINT id) -{ - WIZARD_PAGE *p; - // Validate arguments - if (w == NULL || id == 0) - { - return INFINITE; - } - - p = GetWizardPage(w, id); - if (p == NULL) - { - return INFINITE; - } - - return p->Index; -} - // Get the wizard page WIZARD_PAGE *GetWizardPage(WIZARD *w, UINT id) { @@ -1555,10 +1536,6 @@ UINT WinConnectDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void * } // TCP connection with showing the UI -SOCK *WinConnectEx2(HWND hWnd, char *server, UINT port, UINT timeout, UINT icon_id, wchar_t *caption, wchar_t *info, bool try_start_ssl, bool ssl_no_tls) -{ - return WinConnectEx3(hWnd, server, port, timeout, icon_id, caption, info, NULL, false, try_start_ssl, ssl_no_tls); -} SOCK *WinConnectEx3(HWND hWnd, char *server, UINT port, UINT timeout, UINT icon_id, wchar_t *caption, wchar_t *info, UINT *nat_t_error_code, char *nat_t_svc_name, bool try_start_ssl, bool ssl_no_tls) { wchar_t tmp[MAX_SIZE]; @@ -2020,183 +1997,6 @@ bool Win32CnCheckAlreadyExists(bool lock) return false; } -// Get whether it is set to not display the dialog about the free version -bool IsRegistedToDontShowFreeEditionDialog(char *server_name) -{ - // Validate arguments - if (server_name == NULL) - { - return false; - } - - if (MsRegReadInt(REG_LOCAL_MACHINE, FREE_REGKEY, server_name) != 0) - { - return true; - } - - if (MsRegWriteInt(REG_LOCAL_MACHINE, FREE_REGKEY, "__test__", 1) == false) - { - return true; - } - - MsRegDeleteValue(REG_LOCAL_MACHINE, FREE_REGKEY, "__test__"); - - return false; -} - -// Set in the registry not to show a dialog about the free version -void RegistToDontShowFreeEditionDialog(char *server_name) -{ - // Validate arguments - if (server_name == NULL) - { - return; - } - - MsRegWriteInt(REG_LOCAL_MACHINE, FREE_REGKEY, server_name, 1); -} - -// Free Edition dialog procedure -UINT FreeInfoDialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *param) -{ - FREEINFO *info = (FREEINFO *)param; - // Validate arguments - if (hWnd == NULL) - { - return 0; - } - - switch (msg) - { - case WM_INITDIALOG: - SetIcon(hWnd, 0, ICO_HUB); - Top(hWnd); - info->hWnd = hWnd; - Set(info->Event); - FormatText(hWnd, S_INFO_2, info->ServerName); - DlgFont(hWnd, S_INFO_1, 13, true); - DlgFont(hWnd, S_INFO_3, 13, false); - DlgFont(hWnd, B_HIDE, 10, true); - break; - - case WM_COMMAND: - switch (wParam) - { - case IDOK: - case IDCANCEL: - if (IsChecked(hWnd, B_HIDE)) - { - RegistToDontShowFreeEditionDialog(info->ServerName); - } - - Close(hWnd); - break; - } - break; - - case WM_CLOSE: - EndDialog(hWnd, 0); - break; - } - - return 0; -} - -// Display the dialog about the Free Edition -void ShowFreeInfoDialog(HWND hWnd, FREEINFO *info) -{ - // Validate arguments - if (info == NULL) - { - return; - } - - Dialog(hWnd, D_FREEINFO, FreeInfoDialogProc, info); - Set(info->Event); -} - -// Free Edition dialog thread -void FreeInfoThread(THREAD *thread, void *param) -{ - FREEINFO *info = (FREEINFO *)param; - // Validate arguments - if (thread == NULL || info == NULL) - { - return; - } - - ShowFreeInfoDialog(NULL, info); -} - -// Start the Free Edition Announcement dialog -FREEINFO *StartFreeInfoDlg(char *server_name) -{ - FREEINFO *info; - - if (IsRegistedToDontShowFreeEditionDialog(server_name)) - { - return NULL; - } - - info = ZeroMalloc(sizeof(FREEINFO)); - - StrCpy(info->ServerName, sizeof(info->ServerName), server_name); - info->Event = NewEvent(); - - info->Thread = NewThread(FreeInfoThread, info); - Wait(info->Event, INFINITE); - ReleaseEvent(info->Event); - info->Event = NULL; - - return info; -} - -// End the Free Edition Announcement dialog -void EndFreeInfoDlg(FREEINFO *info) -{ - // Validate arguments - if (info == NULL) - { - return; - } - - SendMsg(info->hWnd, 0, WM_CLOSE, 0, 0); - WaitThread(info->Thread, INFINITE); - ReleaseThread(info->Thread); - - Free(info); -} - -// Execute a EXE in the hamcore -bool ExecuteHamcoreExe(char *name) -{ - BUF *b; - wchar_t tmp[MAX_PATH]; - char tmp2[MAX_PATH]; - UCHAR hash[MD5_SIZE]; - // Validate arguments - if (name == NULL) - { - return false; - } - - b = ReadDump(name); - if (b == NULL) - { - return false; - } - - Hash(hash, name, StrLen(name), false); - BinToStr(tmp2, sizeof(tmp2), hash, sizeof(hash)); - UniFormat(tmp, sizeof(tmp), L"%s\\tmp_%S.exe", MsGetMyTempDirW(), tmp2); - SeekBuf(b, 0, 0); - DumpBufW(b, tmp); - - FreeBuf(b); - - return RunW(tmp, NULL, false, false); -} - // Show the Easter Egg void ShowEasterEgg(HWND hWnd) { @@ -2921,40 +2721,6 @@ HFONT GetDialogDefaultFontEx(bool meiryo) return GetFont(default_font_name, default_font_size, false, false, false, false); } -// Get the adjustment scale between the control size and the window size -void GetWindowAndControlSizeResizeScale(HWND hWnd, bool *need_resize, double *factor_x, double *factor_y) -{ - UINT dlgfont_x, dlgfont_y; - HFONT hDlgFont; - // Validate arguments - if (hWnd == NULL || need_resize == NULL || factor_x == NULL || factor_y == NULL) - { - return; - } - - *need_resize = true; - - // Get the font of the current window - hDlgFont = (HFONT)SendMsg(hWnd, 0, WM_GETFONT, 0, 0); - - // Get the width and height of the font of the current window - CalcFontSize(hDlgFont, &dlgfont_x, &dlgfont_y); - - if ((dlgfont_x == WINUI_DEFAULT_DIALOG_UNIT_X) && - (dlgfont_y == WINUI_DEFAULT_DIALOG_UNIT_Y)) - { - // There is no need to adjust - *need_resize = false; - *factor_x = 1.0; - *factor_y = 1.0; - return; - } - - // Calculate the adjustment amount - *factor_x = (double)dlgfont_x / (double)WINUI_DEFAULT_DIALOG_UNIT_X; - *factor_y = (double)dlgfont_y / (double)WINUI_DEFAULT_DIALOG_UNIT_Y; -} - // Adjust the control size and window size void AdjustWindowAndControlSize(HWND hWnd, bool *need_resize, double *factor_x, double *factor_y) { @@ -3648,20 +3414,6 @@ char *StringDlgA(HWND hWnd, wchar_t *title, wchar_t *info, char *def, UINT icon, return ret; } -// Draw frame -void LedDrawRect(LED *d) -{ - RECT r; - // Validate arguments - if (d == NULL) - { - return; - } - - SetRect(&r, 0, 0, LED_WIDTH, LED_HEIGHT); - FrameRect(d->hDC, &r, GetStockObject(WHITE_BRUSH)); -} - // Restarting dialog UINT Win9xRebootDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *param) { @@ -3916,11 +3668,6 @@ void AboutEx(HWND hWnd, CEDAR *cedar, wchar_t *product_name, WINUI_UPDATE *u) Dialog(hWnd, D_ABOUT, AboutDlgProc, &a); } -// Test -void UiTest() -{ -} - // Examine the number of fields that an IP address is entered UINT IpGetFilledNum(HWND hWnd, UINT id) { @@ -3960,18 +3707,6 @@ bool IpIsFilled(HWND hWnd, UINT id) } } -// Clear the IP address -void IpClear(HWND hWnd, UINT id) -{ - // Validate arguments - if (hWnd == NULL) - { - return; - } - - SendMsg(hWnd, id, IPM_CLEARADDRESS, 0, 0); -} - // Get an IP address UINT IpGet(HWND hWnd, UINT id) { @@ -4535,39 +4270,6 @@ void SetMenuItemBold(HMENU hMenu, UINT pos, bool bold) SetMenuItemInfo(hMenu, pos, true, &info); } -// Enable / disable the menu item -void SetMenuItemEnable(HMENU hMenu, UINT pos, bool enable) -{ - MENUITEMINFO info; - // Validate arguments - if (hMenu == NULL || pos == INFINITE) - { - return; - } - - Zero(&info, sizeof(info)); - info.cbSize = sizeof(info); - info.fMask = MIIM_STATE; - - if (GetMenuItemInfo(hMenu, pos, true, &info) == false) - { - return; - } - - if (enable) - { - info.fState |= MFS_ENABLED; - info.fState = info.fState & ~MFS_DISABLED; - } - else - { - info.fState |= MFS_DISABLED; - info.fState = info.fState & ~MFS_ENABLED; - } - - SetMenuItemInfo(hMenu, pos, true, &info); -} - // Remove a menu item void DeleteMenuItem(HMENU hMenu, UINT pos) { @@ -5700,10 +5402,6 @@ UINT LvInsertItemByImageListIdA(HWND hWnd, UINT id, UINT image, void *param, cha } // Change the image -void LvSetItemImage(HWND hWnd, UINT id, UINT index, UINT icon) -{ - LvSetItemImageByImageListId(hWnd, id, index, GetIcon(icon)); -} void LvSetItemImageByImageListId(HWND hWnd, UINT id, UINT index, UINT image) { LVITEM t; @@ -5827,18 +5525,6 @@ void LvSetView(HWND hWnd, UINT id, bool details) } } -// Ensure that the specified item is visible -void LvShow(HWND hWnd, UINT id, UINT index) -{ - // Validate arguments - if (hWnd == NULL) - { - return; - } - - ListView_EnsureVisible(DlgItem(hWnd, id), index, false); -} - // Get whether there is currently selected item bool LvIsSelected(HWND hWnd, UINT id) { @@ -5996,31 +5682,6 @@ bool LvIsMasked(HWND hWnd, UINT id) return true; } -// Get the number of items that are currently masked -UINT LvGetMaskedNum(HWND hWnd, UINT id) -{ - UINT i = INFINITE; - UINT num = 0; - // Validate arguments - if (hWnd == NULL) - { - return 0; - } - - while (true) - { - i = LvGetNextMasked(hWnd, id, i); - if (i == INFINITE) - { - break; - } - - num++; - } - - return num; -} - // Get the items that is currently masked UINT LvGetNextMasked(HWND hWnd, UINT id, UINT start) { @@ -6033,27 +5694,6 @@ UINT LvGetNextMasked(HWND hWnd, UINT id, UINT start) return ListView_GetNextItem(DlgItem(hWnd, id), start, LVNI_SELECTED); } -// Search an item with the specified string -UINT LvSearchStr_(HWND hWnd, UINT id, UINT pos, wchar_t *str) -{ - UINT ret; - LVFINDINFOW t; - // Validate arguments - if (hWnd == NULL || str == NULL) - { - return INFINITE; - } - - Zero(&t, sizeof(t)); - t.flags = LVFI_STRING; - t.psz = str; - t.vkDirection = VK_DOWN; - - ret = SendMsg(hWnd, id, LVM_FINDITEMW, -1, (LPARAM)&t); - - return ret; -} - // Search an item with the specified string UINT LvSearchStr(HWND hWnd, UINT id, UINT pos, wchar_t *str) { @@ -6808,143 +6448,6 @@ STATUS_WINDOW *StatusPrinterWindowStart(SOCK *s, wchar_t *account_name) return sw; } -// Get the string -wchar_t *LbGetStr(HWND hWnd, UINT id) -{ - // Validate arguments - if (hWnd == NULL) - { - return NULL; - } - - return GetText(hWnd, id); -} - -// String search -UINT LbFindStr(HWND hWnd, UINT id, wchar_t *str) -{ - UINT ret; - // Validate arguments - if (hWnd == NULL || str == NULL) - { - return INFINITE; - } - - ret = SendMsg(hWnd, id, LB_FINDSTRING, -1, (LPARAM)str); - - return ret; -} - -// Get the number of items -UINT LbNum(HWND hWnd, UINT id) -{ - // Validate arguments - if (hWnd == NULL) - { - return INFINITE; - } - - return SendMsg(hWnd, id, LB_GETCOUNT, 0, 0); -} - -// Add a string -UINT LbAddStr(HWND hWnd, UINT id, wchar_t *str, UINT data) -{ - UINT ret; - - if (MsIsNt() == false) - { - char *s = CopyUniToStr(str); - ret = LbAddStrA(hWnd, id, s, data); - Free(s); - return ret; - } - - // Validate arguments - if (hWnd == NULL || str == NULL) - { - return INFINITE; - } - - ret = SendMsg(hWnd, id, LB_ADDSTRING, 0, (LPARAM)str); - SendMsg(hWnd, id, LB_SETITEMDATA, ret, (LPARAM)data); - - if (LbNum(hWnd, id) == 1) - { - LbSelectIndex(hWnd, id, 0); - } - - return ret; -} -UINT LbAddStrA(HWND hWnd, UINT id, char *str, UINT data) -{ - UINT ret; - // Validate arguments - if (hWnd == NULL || str == NULL) - { - return INFINITE; - } - - ret = SendMsg(hWnd, id, LB_ADDSTRING, 0, (LPARAM)str); - SendMsg(hWnd, id, LB_SETITEMDATA, ret, (LPARAM)data); - - if (LbNum(hWnd, id) == 1) - { - LbSelectIndex(hWnd, id, 0); - } - - return ret; -} - -// Insert a string -UINT LbInsertStr(HWND hWnd, UINT id, UINT index, wchar_t *str, UINT data) -{ - UINT ret; - - if (MsIsNt() == false) - { - char *s = CopyUniToStr(str); - ret = LbInsertStrA(hWnd, id, index, s, data); - Free(s); - return ret; - } - - // Validate arguments - if (hWnd == NULL || str == NULL) - { - return INFINITE; - } - - ret = SendMsg(hWnd, id, LB_INSERTSTRING, index, (LPARAM)str); - SendMsg(hWnd, id, LB_SETITEMDATA, ret, (LPARAM)data); - - if (LbNum(hWnd, id) == 1) - { - LbSelect(hWnd, id, 0); - } - - return ret; -} -UINT LbInsertStrA(HWND hWnd, UINT id, UINT index, char *str, UINT data) -{ - UINT ret; - // Validate arguments - if (hWnd == NULL || str == NULL) - { - return INFINITE; - } - - ret = SendMsg(hWnd, id, LB_INSERTSTRING, index, (LPARAM)str); - SendMsg(hWnd, id, LB_SETITEMDATA, ret, (LPARAM)data); - - if (LbNum(hWnd, id) == 1) - { - LbSelect(hWnd, id, 0); - } - - return ret; -} - // Remove all void LbReset(HWND hWnd, UINT id) { @@ -6957,128 +6460,6 @@ void LbReset(HWND hWnd, UINT id) SendMsg(hWnd, id, LB_RESETCONTENT, 0, 0); } -// Select by specifying the index -void LbSelectIndex(HWND hWnd, UINT id, UINT index) -{ - // Validate arguments - if (hWnd == NULL) - { - return; - } - - SendMsg(hWnd, id, LB_SETCURSEL, index, 0); -} - -// Get the data -UINT LbGetData(HWND hWnd, UINT id, UINT index) -{ - // Validate arguments - if (hWnd == NULL || index == INFINITE) - { - return INFINITE; - } - - return SendMsg(hWnd, id, LB_GETITEMDATA, index, 0); -} - -// Search for the data -UINT LbFindData(HWND hWnd, UINT id, UINT data) -{ - UINT i, num; - // Validate arguments - if (hWnd == NULL) - { - return INFINITE; - } - - num = LbNum(hWnd, id); - if (num == INFINITE) - { - return INFINITE; - } - - for (i = 0;i < num;i++) - { - if (LbGetData(hWnd, id, i) == data) - { - return i; - } - } - - return INFINITE; -} - -// Set the height of the item -void LbSetHeight(HWND hWnd, UINT id, UINT value) -{ - // Validate arguments - if (hWnd == NULL) - { - return; - } - - SendMsg(hWnd, id, LB_SETITEMHEIGHT, 0, (UINT)(GetTextScalingFactor() * (double)value)); -} - -// Search by specifying the data -void LbSelect(HWND hWnd, UINT id, int data) -{ - UINT index; - // Validate arguments - if (hWnd == NULL) - { - return; - } - - if (data == INFINITE) - { - // Get the first item - LbSelectIndex(hWnd, id, 0); - return; - } - - index = LbFindData(hWnd, id, data); - if (index == INFINITE) - { - // Can not be found - return; - } - - // Select - LbSelectIndex(hWnd, id, index); -} - -// Get the currently selected item -UINT LbGetSelectIndex(HWND hWnd, UINT id) -{ - // Validate arguments - if (hWnd == NULL) - { - return INFINITE; - } - - return SendMsg(hWnd, id, LB_GETCURSEL, 0, 0); -} - -// Get the value that is currently selected -UINT LbGetSelect(HWND hWnd, UINT id) -{ - UINT index; - // Validate arguments - if (hWnd == NULL) - { - return INFINITE; - } - - index = LbGetSelectIndex(hWnd, id); - if (index == INFINITE) - { - return INFINITE; - } - - return LbGetData(hWnd, id, index); -} - // Password input dialog state change void PasswordDlgProcChange(HWND hWnd, UI_PASSWORD_DLG *p) { @@ -7236,54 +6617,6 @@ UINT CbAddStr9xA(HWND hWnd, UINT id, char *str, UINT data) return ret; } -// Insert a string -UINT CbInsertStr(HWND hWnd, UINT id, UINT index, wchar_t *str, UINT data) -{ - UINT ret; - // Validate arguments - if (hWnd == NULL || str == NULL) - { - return INFINITE; - } - - if (MsIsNt() == false) - { - char *s = CopyUniToStr(str); - ret = CbInsertStr9xA(hWnd, id, index, s, data); - Free(s); - return ret; - } - - ret = SendMsg(hWnd, id, CB_INSERTSTRING, index, (LPARAM)str); - SendMsg(hWnd, id, CB_SETITEMDATA, ret, (LPARAM)data); - - if (CbNum(hWnd, id) == 1) - { - CbSelect(hWnd, id, 0); - } - - return ret; -} -UINT CbInsertStr9xA(HWND hWnd, UINT id, UINT index, char *str, UINT data) -{ - UINT ret; - // Validate arguments - if (hWnd == NULL || str == NULL) - { - return INFINITE; - } - - ret = SendMsg(hWnd, id, CB_INSERTSTRING, index, (LPARAM)str); - SendMsg(hWnd, id, CB_SETITEMDATA, ret, (LPARAM)data); - - if (CbNum(hWnd, id) == 1) - { - CbSelect(hWnd, id, 0); - } - - return ret; -} - // Remove all void CbReset(HWND hWnd, UINT id) { @@ -7850,155 +7183,6 @@ UINT PassphraseDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void * return 0; } -// PKCS utility -void PkcsUtil() -{ - InitWinUi(_UU("PKCS_UTIL_TITLE"), _SS("DEFAULT_FONT"), _II("DEFAULT_FONT_SIZE")); - Dialog(NULL, D_PKCSUTIL, PkcsUtilProc, NULL); - FreeWinUi(); -} - -// PKCS writing -void PkcsUtilWrite(HWND hWnd) -{ - wchar_t *filename; - BUF *in_buf; - char filename_ansi[MAX_SIZE]; - char pass[MAX_SIZE]; - // Validate arguments - if (hWnd == NULL) - { - return; - } - - filename = OpenDlg(hWnd, _UU("DLG_PKCS12_FILTER"), _UU("PKCS_UTIL_SAVEDLG_TITLE")); - if (filename == NULL) - { - return; - } - - UniToStr(filename_ansi, sizeof(filename_ansi), filename); - - in_buf = ReadDump(filename_ansi); - - if (in_buf == NULL) - { - MsgBoxEx(hWnd, MB_ICONEXCLAMATION, _UU("PKCS_UTIL_READ_ERROR"), filename); - } - else - { - if (PassphraseDlg(hWnd, pass, sizeof(pass), in_buf, true)) - { - P12 *p12 = BufToP12(in_buf); - if (p12 == NULL) - { - MsgBox(hWnd, MB_ICONEXCLAMATION, _UU("PKCS_UTIL_BAD_FILE")); - } - else - { - X *x = NULL; - K *k = NULL; - BUF *b; - ParseP12(p12, &x, &k, pass); - FreeP12(p12); - p12 = NewP12(x, k, NULL); - FreeX(x); - FreeK(k); - b = P12ToBuf(p12); - FreeP12(p12); - if (b != NULL) - { - // Batch processing - WINUI_SECURE_BATCH batch[] = - { - {WINUI_SECURE_WRITE_DATA, _SS("PKCS_UTIL_SECA_FILENAME"), false, - b, NULL, NULL, NULL, NULL, NULL}, - }; - - if (SecureDeviceWindow(hWnd, batch, sizeof(batch) / sizeof(batch[0]), 2, 0)) - { - MsgBoxEx(hWnd, MB_ICONINFORMATION, _UU("PKCS_UTIL_WRITE_OK_MSG"), filename); - } - } - FreeBuf(b); - } - } - - FreeBuf(in_buf); - } - - Free(filename); -} - -// PKCS erase -void PkcsUtilErase(HWND hWnd) -{ - // Validate arguments - if (hWnd == NULL) - { - return; - } - - if (MsgBox(hWnd, MB_ICONQUESTION | MB_YESNO | MB_DEFBUTTON2, - _UU("PKCS_MAKE_SURE")) == IDYES) - { - // Batch processing - WINUI_SECURE_BATCH batch[] = - { - {WINUI_SECURE_DELETE_OBJECT, _SS("PKCS_UTIL_SECA_FILENAME"), false, - NULL, NULL, NULL, NULL, NULL, NULL}, - }; - - if (SecureDeviceWindow(hWnd, batch, sizeof(batch) / sizeof(batch[0]), 2, 0)) - { - MsgBox(hWnd, MB_ICONINFORMATION, _UU("PKCS_UTIL_DELETE_OK_MSG")); - } - } -} - -// PKCS Utility dialog -UINT PkcsUtilProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *param) -{ - // Validate arguments - if (hWnd == NULL) - { - return 0; - } - - switch (msg) - { - case WM_INITDIALOG: - DlgFont(hWnd, S_TITLE, 12, true); - SetIcon(hWnd, 0, ICO_CERT); - SetFont(hWnd, S_COPYRIGHT, GetFont("Arial", 8, false, false, false, false)); - break; - - case WM_COMMAND: - switch (wParam) - { - case B_WRITE: - PkcsUtilWrite(hWnd); - break; - - case B_ERASE: - PkcsUtilErase(hWnd); - break; - - case IDCANCEL: - Close(hWnd); - break; - } - - break; - - case WM_CLOSE: - EndDialog(hWnd, 0); - break; - } - - return 0; -} - // [Save File] dialog wchar_t *SaveDlg(HWND hWnd, wchar_t *filter, wchar_t *title, wchar_t *default_name, wchar_t *default_ext) { @@ -8932,114 +8116,6 @@ UINT DialogEx2(HWND hWnd, UINT id, WINUI_DIALOG_PROC *proc, void *param, bool wh return ret; } -// Create a modeless dialog -HWND DialogCreateEx(HWND hWnd, UINT id, WINUI_DIALOG_PROC *proc, void *param, bool white) -{ - HWND ret = NULL; - DIALOG_PARAM p; - // Validate arguments - if (id == 0) - { - return 0; - } - - Zero(&p, sizeof(p)); - p.param = param; - p.white = white; - p.proc = proc; - - if (MsIsNt() == false) - { - // Win9x - ret = CreateDialogParamA(hDll, MAKEINTRESOURCEA(id), hWnd, - (DLGPROC)proc, (LPARAM)param); - } - else - { - // WinNT - ret = CreateDialogParamW(hDll, MAKEINTRESOURCEW(id), hWnd, - (DLGPROC)proc, (LPARAM)param); - } - - return ret; -} - -// Set the bitmap to the button -void SetBitmap(HWND hWnd, UINT id, UINT bmp_id) -{ - HBITMAP bmp; - char *class_name; - DIALOG_PARAM *dialog_param = NULL; - bool need_resize = 0; - double resize_x = 1.0; - double resize_y = 1.0; - bool add_to_free_list = false; - // Validate arguments - if (hWnd == NULL) - { - return; - } - - bmp = LoadImage(hDll, MAKEINTRESOURCE(bmp_id), IMAGE_BITMAP, 0, 0, (MsIsNt() ? LR_SHARED : 0) | LR_VGACOLOR); - if (bmp == NULL) - { - return; - } - - dialog_param = GetParam(hWnd); - - // Determine the need for resizing - if (dialog_param) - { - if (MsIsVista()) - { - GetWindowAndControlSizeResizeScale(hWnd, &need_resize, &resize_x, &resize_y); - - if (need_resize) - { - // Resize - UINT src_x, src_y, dst_x, dst_y; - - if (GetBitmapSize(bmp, &src_x, &src_y)) - { - HBITMAP new_bmp; - double scale_factor = MIN(resize_x, resize_y); - - dst_x = (UINT)((double)src_x * scale_factor); - dst_y = (UINT)((double)src_y * scale_factor); - - new_bmp = ResizeBitmap(bmp, src_x, src_y, dst_x, dst_y); - - if (new_bmp != NULL) - { - bmp = new_bmp; - - add_to_free_list = true; - } - } - } - } - } - - class_name = GetClassA(hWnd, id); - - if (StrCmpi(class_name, "Static") != 0) - { - SendMsg(hWnd, id, BM_SETIMAGE, IMAGE_BITMAP, (LPARAM)bmp); - } - else - { - SendMsg(hWnd, id, STM_SETIMAGE, IMAGE_BITMAP, (LPARAM)bmp); - } - - Free(class_name); - - if (add_to_free_list) - { - Add(dialog_param->BitmapList, bmp); - } -} - // Initialize the icon cache void InitIconCache() { @@ -9248,44 +8324,6 @@ void Check(HWND hWnd, UINT id, bool b) } } -// Confirm that the character size of the text-box is less than or equal to specified size -bool CheckTextSize(HWND hWnd, UINT id, UINT size, bool unicode) -{ - // Validate arguments - if (hWnd == NULL) - { - return false; - } - - if (GetTextSize(hWnd, id, unicode) <= size) - { - return true; - } - else - { - return false; - } -} - -// Confirm that a length of the string in the text-box is less than or equal to the specified size -bool CheckTextLen(HWND hWnd, UINT id, UINT len, bool unicode) -{ - // Validate arguments - if (hWnd == NULL) - { - return false; - } - - if (GetTextLen(hWnd, id, unicode) <= len) - { - return true; - } - else - { - return false; - } -} - // Limit the number of characters that can be entered into the text-box void LimitText(HWND hWnd, UINT id, UINT count) { @@ -9319,58 +8357,6 @@ void SetFontEx(HWND hWnd, UINT id, HFONT hFont, bool no_adjust_font_size) } } -// Get the font size -bool GetFontSize(HFONT hFont, UINT *x, UINT *y) -{ - bool ret = false; - UINT xx = 0; - UINT yy = 0; - - // Search for the font handle - LockList(font_list); - { - UINT i; - - for (i = 0;i < LIST_NUM(font_list);i++) - { - FONT *f = LIST_DATA(font_list, i); - - if (f->hFont == hFont) - { - xx = f->x; - yy = f->y; - - ret = true; - break; - } - } - } - UnlockList(font_list); - - if (ret == false) - { - ret = CalcFontSize(hFont, &xx, &yy); - } - - if (xx == 0 || yy == 0) - { - xx = 8; - yy = 16; - } - - if (x != NULL) - { - *x = xx; - } - - if (y != NULL) - { - *y = yy; - } - - return ret; -} - // Calculate the font size bool CalcFontSize(HFONT hFont, UINT *x, UINT *y) { @@ -9755,45 +8741,6 @@ void CenterParent(HWND hWnd) SetWindowPos(hWnd, NULL, x, y, 0, 0, SWP_NOSIZE | SWP_NOACTIVATE); } -// Get the coordinates of the client region of the window -void GetWindowClientRect(HWND hWnd, struct tagRECT *rect) -{ - RECT r1, r2; - HWND hParent; - WINDOWINFO info; - Zero(rect, sizeof(RECT)); - // Validate arguments - if (hWnd == NULL || rect == NULL) - { - return; - } - - hParent = GetParent(hWnd); - if (hParent == NULL) - { - return; - } - - Zero(&info, sizeof(info)); - info.cbSize = sizeof(WINDOWINFO); - - if (GetWindowInfo(hParent, &info) == false) - { - return; - } - - if (GetWindowRect(hWnd, &r1) == false || - GetWindowRect(hParent, &r2) == false) - { - return; - } - - rect->left = r1.left - r2.left - (info.rcClient.left - info.rcWindow.left); - rect->right = r1.right - r2.left - (info.rcClient.left - info.rcWindow.left); - rect->top = r1.top - r2.top - (info.rcClient.top - info.rcWindow.top); - rect->bottom = r1.bottom - r2.top - (info.rcClient.top - info.rcWindow.top); -} - // Move the window to the center void Center(HWND hWnd) { @@ -9837,19 +8784,6 @@ void Center(HWND hWnd) SetWindowPos(hWnd, NULL, x, y, 0, 0, SWP_NOSIZE | SWP_NOACTIVATE); } -// Get the size of the monitor -void GetMonitorSize(UINT *width, UINT *height) -{ - // Validate arguments - if (width == NULL || height == NULL) - { - return; - } - - *width = GetSystemMetrics(SM_CXSCREEN); - *height = GetSystemMetrics(SM_CYSCREEN); -} - // Format the string in the window void FormatText(HWND hWnd, UINT id, ...) { @@ -9882,83 +8816,6 @@ void FormatText(HWND hWnd, UINT id, ...) Free(str); va_end(args); } -void FormatTextA(HWND hWnd, UINT id, ...) -{ - va_list args; - char *buf; - UINT size; - char *str; - // Validate arguments - if (hWnd == NULL) - { - return; - } - - str = GetTextA(hWnd, id); - if (str == NULL) - { - return; - } - - size = MAX(StrSize(str) * 10, MAX_SIZE * 10); - buf = MallocEx(size, true); - - va_start(args, id); - FormatArgs(buf, size, str, args); - - SetTextA(hWnd, id, buf); - - Free(buf); - - Free(str); - va_end(args); -} - -// Set a variable-length argument string to the window -void SetTextEx(HWND hWnd, UINT id, wchar_t *str, ...) -{ - va_list args; - wchar_t *buf; - UINT size; - // Validate arguments - if (str == NULL || hWnd == NULL) - { - return; - } - - size = MAX(UniStrSize(str) * 10, MAX_SIZE * 10); - buf = MallocEx(size, true); - - va_start(args, str); - UniFormatArgs(buf, size, str, args); - - SetText(hWnd, id, buf); - - Free(buf); - va_end(args); -} -void SetTextExA(HWND hWnd, UINT id, char *str, ...) -{ - va_list args; - char *buf; - UINT size; - // Validate arguments - if (str == NULL || hWnd == NULL) - { - return; - } - - size = MAX(StrSize(str) * 10, MAX_SIZE * 10); - buf = MallocEx(size, true); - - va_start(args, str); - FormatArgs(buf, size, str, args); - - SetTextA(hWnd, id, buf); - - Free(buf); - va_end(args); -} // Show the variable-length message box UINT MsgBoxEx(HWND hWnd, UINT flag, wchar_t *msg, ...) @@ -10043,13 +8900,6 @@ UINT DialogInternal(HWND hWnd, UINT id, DIALOG_PROC *proc, void *param) } } -// Notice that the system configuration has been updated -void NoticeSettingChange() -{ - PostMessage(HWND_BROADCAST, WM_SETTINGCHANGE, 0, 0); - DoEvents(NULL); -} - // Dialog box procedure managed by WinUi UINT DlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, bool white_color) { @@ -10151,18 +9001,6 @@ void *GetParam(HWND hWnd) return ret; } -// Relieve the window from foreground -void NoTop(HWND hWnd) -{ - // Validate arguments - if (hWnd == NULL) - { - return; - } - - SetWindowPos(hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); -} - // Show the windows as foreground void Top(HWND hWnd) { @@ -10353,21 +9191,6 @@ UINT GetStyle(HWND hWnd, UINT id) return GetWindowLong(DlgItem(hWnd, id), GWL_STYLE); } -// Get the number of bytes of the text -UINT GetTextSize(HWND hWnd, UINT id, bool unicode) -{ - UINT len; - // Validate arguments - if (hWnd == NULL) - { - return 0; - } - - len = GetTextLen(hWnd, id, unicode); - - return len + (unicode ? 2 : 1); -} - // Get the number of characters in the text UINT GetTextLen(HWND hWnd, UINT id, bool unicode) { @@ -10787,68 +9610,11 @@ bool IsEnable(HWND hWnd, UINT id) static LOCK *winui_debug_lock = NULL; -// Initialize the debug function -void WinUiDebugInit() -{ - winui_debug_lock = NewLock(); -} - // Release the debug function void WinUiDebugFree() { DeleteLock(winui_debug_lock); } - -// Write a string to the debug file -void WinUiDebug(wchar_t *str) -{ - wchar_t tmp[1024]; - char dtstr[256]; - char *buf; - wchar_t exename[MAX_PATH]; - UINT tid; - // Validate arguments - if (str == NULL) - { - return; - } - - tid = GetCurrentThreadId(); - - GetExeNameW(exename, sizeof(exename)); - GetFileNameFromFilePathW(exename, sizeof(exename), exename); - - GetDateTimeStrMilli64(dtstr, sizeof(dtstr), LocalTime64()); - - UniFormat(tmp, sizeof(tmp), L"[%S] (%s:%u) %s\r\n", dtstr, exename, tid, str); - - buf = CopyUniToUtf(tmp); - - Lock(winui_debug_lock); - { - IO *o = FileOpenEx(WINUI_DEBUG_TEXT, true, true); - if (o == NULL) - { - o = FileCreate(WINUI_DEBUG_TEXT); - } - - if (o != NULL) - { - UINT size = FileSize(o); - - FileSeek(o, FILE_BEGIN, size); - - FileWrite(o, buf, StrLen(buf)); - FileFlush(o); - - FileClose(o); - } - } - Unlock(winui_debug_lock); - - Free(buf); -} - // If the control protrude by large font size, adjust into appropriate size void AdjustFontSize(HWND hWnd, UINT id) { @@ -11268,19 +10034,6 @@ HWND DlgItem(HWND hWnd, UINT id) } } -// Set the title -void SetWinUiTitle(wchar_t *title) -{ - // Validate arguments - if (title == NULL) - { - return; - } - - Free(title_bar); - title_bar = CopyUniStr(title); -} - // Initialize the WinUi void InitWinUi(wchar_t *software_name, char *font, UINT fontsize) { diff --git a/src/Cedar/WinUi.h b/src/Cedar/WinUi.h index 31e0cc8e..752521d9 100644 --- a/src/Cedar/WinUi.h +++ b/src/Cedar/WinUi.h @@ -410,7 +410,6 @@ struct LED }; void LedDrawString(LED *d, char *str, HFONT f); -void LedDrawRect(LED *d); void LedMainDraw(LED *d, HANDLE h); void LedSpecial(LED *d, HANDLE h, UINT n); @@ -575,7 +574,6 @@ struct WINUI_UPDATE_DLG_PARAM // Function prototype void InitWinUi(wchar_t *software_name, char *font, UINT fontsize); -void SetWinUiTitle(wchar_t *title); void FreeWinUi(); WINUI_UPDATE *InitUpdateUi(wchar_t *title, char *name, char *family_name, UINT64 current_date, UINT current_build, UINT current_ver, char *client_id, bool use_suppress_flag); @@ -619,7 +617,6 @@ void UnselectEdit(HWND hWnd, UINT id); UINT SendMsg(HWND hWnd, UINT id, UINT msg, WPARAM wParam, LPARAM lParam); bool IsEmpty(HWND hWnd, UINT id); UINT GetTextLen(HWND hWnd, UINT id, bool unicode); -UINT GetTextSize(HWND hWnd, UINT id, bool unicode); UINT GetStyle(HWND hWnd, UINT id); void SetStyle(HWND hWnd, UINT id, UINT style); void RemoveStyle(HWND hWnd, UINT id, UINT style); @@ -632,23 +629,15 @@ void SetShow(HWND hWnd, UINT id, bool b); bool IsHide(HWND hWnd, UINT id); bool IsShow(HWND hWnd, UINT id); void Top(HWND hWnd); -void NoTop(HWND hWnd); void *GetParam(HWND hWnd); void SetParam(HWND hWnd, void *param); UINT DlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, bool white_color); -void NoticeSettingChange(); -void UiTest(); UINT DialogInternal(HWND hWnd, UINT id, DIALOG_PROC *proc, void *param); UINT MsgBox(HWND hWnd, UINT flag, wchar_t *msg); UINT MsgBoxEx(HWND hWnd, UINT flag, wchar_t *msg, ...); -void SetTextEx(HWND hWnd, UINT id, wchar_t *str, ...); -void SetTextExA(HWND hWnd, UINT id, char *str, ...); void FormatText(HWND hWnd, UINT id, ...); -void FormatTextA(HWND hWnd, UINT id, ...); void Center(HWND hWnd); -void GetWindowClientRect(HWND hWnd, struct tagRECT *rect); void CenterParent(HWND hWnd); -void GetMonitorSize(UINT *width, UINT *height); void DisableClose(HWND hWnd); void EnableClose(HWND hWnd); void InitFont(); @@ -657,21 +646,16 @@ int CompareFont(void *p1, void *p2); HFONT GetFont(char *name, UINT size, bool bold, bool italic, bool underline, bool strikeout); double GetTextScalingFactor(); bool CalcFontSize(HFONT hFont, UINT *x, UINT *y); -bool GetFontSize(HFONT hFont, UINT *x, UINT *y); void SetFont(HWND hWnd, UINT id, HFONT hFont); void SetFontEx(HWND hWnd, UINT id, HFONT hFont, bool no_adjust_font_size); void LimitText(HWND hWnd, UINT id, UINT count); -bool CheckTextLen(HWND hWnd, UINT id, UINT len, bool unicode); -bool CheckTextSize(HWND hWnd, UINT id, UINT size, bool unicode); void Check(HWND hWnd, UINT id, bool b); bool IsChecked(HWND hWnd, UINT id); void SetIcon(HWND hWnd, UINT id, UINT icon_id); -void SetBitmap(HWND hWnd, UINT id, UINT bmp_id); bool SecureDeviceWindow(HWND hWnd, WINUI_SECURE_BATCH *batch, UINT num_batch, UINT device_id, UINT bitmap_id); UINT Dialog(HWND hWnd, UINT id, WINUI_DIALOG_PROC *proc, void *param); UINT DialogEx(HWND hWnd, UINT id, WINUI_DIALOG_PROC *proc, void *param, bool white); UINT DialogEx2(HWND hWnd, UINT id, WINUI_DIALOG_PROC *proc, void *param, bool white, bool meiryo); -HWND DialogCreateEx(HWND hWnd, UINT id, WINUI_DIALOG_PROC *proc, void *param, bool white); UINT __stdcall InternalDialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); UINT SecureDeviceWindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *param); HFONT Font(UINT size, UINT bold); @@ -689,10 +673,6 @@ wchar_t *SaveDlg(HWND hWnd, wchar_t *filter, wchar_t *title, wchar_t *default_na char *SaveDlgA(HWND hWnd, char *filter, char *title, char *default_name, char *default_ext); wchar_t *MakeFilter(wchar_t *str); char *MakeFilterA(char *str); -void PkcsUtil(); -UINT PkcsUtilProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *param); -void PkcsUtilWrite(HWND hWnd); -void PkcsUtilErase(HWND hWnd); bool PassphraseDlg(HWND hWnd, char *pass, UINT pass_size, BUF *buf, bool p12); UINT PassphraseDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *param); bool PasswordDlg(HWND hWnd, UI_PASSWORD_DLG *p); @@ -702,8 +682,6 @@ void PasswordDlgProcChange(HWND hWnd, UI_PASSWORD_DLG *p); UINT CbAddStr(HWND hWnd, UINT id, wchar_t *str, UINT data); UINT CbAddStrA(HWND hWnd, UINT id, char *str, UINT data); UINT CbAddStr9xA(HWND hWnd, UINT id, char *str, UINT data); -UINT CbInsertStr(HWND hWnd, UINT id, UINT index, wchar_t *str, UINT data); -UINT CbInsertStr9xA(HWND hWnd, UINT id, UINT index, char *str, UINT data); void CbSelectIndex(HWND hWnd, UINT id, UINT index); UINT CbNum(HWND hWnd, UINT id); UINT CbFindStr(HWND hWnd, UINT id, wchar_t *str); @@ -718,21 +696,7 @@ UINT CbGetSelectIndex(HWND hWnd, UINT id); UINT CbGetSelect(HWND hWnd, UINT id); void SetRange(HWND hWnd, UINT id, UINT start, UINT end); void SetPos(HWND hWnd, UINT id, UINT pos); -UINT LbAddStr(HWND hWnd, UINT id, wchar_t *str, UINT data); -UINT LbAddStrA(HWND hWnd, UINT id, char *str, UINT data); -UINT LbInsertStr(HWND hWnd, UINT id, UINT index, wchar_t *str, UINT data); -UINT LbInsertStrA(HWND hWnd, UINT id, UINT index, char *str, UINT data); -void LbSelectIndex(HWND hWnd, UINT id, UINT index); -UINT LbNum(HWND hWnd, UINT id); -UINT LbFindStr(HWND hWnd, UINT id, wchar_t *str); -wchar_t *LbGetStr(HWND hWnd, UINT id); -UINT LbFindData(HWND hWnd, UINT id, UINT data); -UINT LbGetData(HWND hWnd, UINT id, UINT index); -void LbSelect(HWND hWnd, UINT id, int data); void LbReset(HWND hWnd, UINT id); -void LbSetHeight(HWND hWnd, UINT id, UINT value); -UINT LbGetSelectIndex(HWND hWnd, UINT id); -UINT LbGetSelect(HWND hWnd, UINT id); STATUS_WINDOW *StatusPrinterWindowStart(SOCK *s, wchar_t *account_name); void StatusPrinterWindowStop(STATUS_WINDOW *sw); void StatusPrinterWindowPrint(STATUS_WINDOW *sw, wchar_t *str); @@ -753,14 +717,12 @@ UINT LvInsertItemByImageListIdA(HWND hWnd, UINT id, UINT image, void *param, cha void LvSetItem(HWND hWnd, UINT id, UINT index, UINT pos, wchar_t *str); void LvSetItemA(HWND hWnd, UINT id, UINT index, UINT pos, char *str); void LvSetItemParam(HWND hWnd, UINT id, UINT index, void *param); -void LvSetItemImage(HWND hWnd, UINT id, UINT index, UINT icon); void LvSetItemImageByImageListId(HWND hWnd, UINT id, UINT index, UINT image); void LvDeleteItem(HWND hWnd, UINT id, UINT index); UINT LvNum(HWND hWnd, UINT id); void *LvGetParam(HWND hWnd, UINT id, UINT index); wchar_t *LvGetStr(HWND hWnd, UINT id, UINT index, UINT pos); char *LvGetStrA(HWND hWnd, UINT id, UINT index, UINT pos); -void LvShow(HWND hWnd, UINT id, UINT index); UINT LvSearchParam(HWND hWnd, UINT id, void *param); UINT LvSearchStr(HWND hWnd, UINT id, UINT pos, wchar_t *str); UINT LvSearchStrA(HWND hWnd, UINT id, UINT pos, char *str); @@ -775,7 +737,6 @@ UINT LvGetNextMasked(HWND hWnd, UINT id, UINT start); bool LvIsMasked(HWND hWnd, UINT id); bool LvIsSingleSelected(HWND hWnd, UINT id); bool LvIsMultiMasked(HWND hWnd, UINT id); -UINT LvGetMaskedNum(HWND hWnd, UINT id); void LvAutoSize(HWND hWnd, UINT id); void LvSelect(HWND hWnd, UINT id, UINT index); void LvSelectByParam(HWND hWnd, UINT id, void *param); @@ -807,7 +768,6 @@ void LvRemoveStyle(HWND hWnd, UINT id, UINT style); HMENU LoadSubMenu(UINT menu_id, UINT pos, HMENU *parent_menu); UINT GetMenuItemPos(HMENU hMenu, UINT id); void DeleteMenuItem(HMENU hMenu, UINT pos); -void SetMenuItemEnable(HMENU hMenu, UINT pos, bool enable); void SetMenuItemBold(HMENU hMenu, UINT pos, bool bold); wchar_t *GetMenuStr(HMENU hMenu, UINT pos); char *GetMenuStrA(HMENU hMenu, UINT pos); @@ -831,7 +791,6 @@ void LvSortHander(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, UINT id); void LvStandardHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, UINT id); void IpSet(HWND hWnd, UINT id, UINT ip); UINT IpGet(HWND hWnd, UINT id); -void IpClear(HWND hWnd, UINT id); bool IpIsFilled(HWND hWnd, UINT id); UINT IpGetFilledNum(HWND hWnd, UINT id); void About(HWND hWnd, CEDAR *cedar, wchar_t *product_name); @@ -844,7 +803,6 @@ char *StringDlgA(HWND hWnd, wchar_t *title, wchar_t *info, char *def, UINT icon, UINT StringDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *param); void InitDialogInternational(HWND hWnd, void *pparam); void AdjustWindowAndControlSize(HWND hWnd, bool *need_resize, double *factor_x, double *factor_y); -void GetWindowAndControlSizeResizeScale(HWND hWnd, bool *need_resize, double *factor_x, double *factor_y); void AdjustDialogXY(UINT *x, UINT *y, UINT dlgfont_x, UINT dlgfont_y); HFONT GetDialogDefaultFont(); HFONT GetDialogDefaultFontEx(bool meiryo); @@ -862,19 +820,10 @@ void KakushiThread(THREAD *thread, void *param); KAKUSHI *InitKakushi(); void FreeKakushi(KAKUSHI *k); void ShowEasterEgg(HWND hWnd); -bool ExecuteHamcoreExe(char *name); -bool IsRegistedToDontShowFreeEditionDialog(char *server_name); -void RegistToDontShowFreeEditionDialog(char *server_name); -void ShowFreeInfoDialog(HWND hWnd, FREEINFO *info); -UINT FreeInfoDialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *param); -FREEINFO *StartFreeInfoDlg(char *server_name); -void FreeInfoThread(THREAD *thread, void *param); -void EndFreeInfoDlg(FREEINFO *info); bool Win32CnCheckAlreadyExists(bool lock); void RegistWindowsFirewallAll(); void RegistWindowsFirewallAllEx(char *dir); void InitVistaWindowTheme(HWND hWnd); -void WinUiDebug(wchar_t *str); void WinUiDebugInit(); void WinUiDebugFree(); void OnceMsg(HWND hWnd, wchar_t *title, wchar_t *message, bool show_checkbox, UINT icon); @@ -891,7 +840,6 @@ HFONT GetMeiryoFont(); HFONT GetMeiryoFontEx(UINT font_size); HFONT GetMeiryoFontEx2(UINT font_size, bool bold); bool ShowWindowsNetworkConnectionDialog(); -SOCK *WinConnectEx2(HWND hWnd, char *server, UINT port, UINT timeout, UINT icon_id, wchar_t *caption, wchar_t *info, bool try_start_ssl, bool ssl_no_tls); SOCK *WinConnectEx3(HWND hWnd, char *server, UINT port, UINT timeout, UINT icon_id, wchar_t *caption, wchar_t *info, UINT *nat_t_error_code, char *nat_t_svc_name, bool try_start_ssl, bool ssl_no_tls); UINT WinConnectDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *param); void WinConnectDlgThread(THREAD *thread, void *param); @@ -909,7 +857,6 @@ WIZARD_PAGE *NewWizardPage(UINT id, WINUI_WIZARD_PROC *proc, wchar_t *title); void FreeWizardPage(WIZARD_PAGE *p); void AddWizardPage(WIZARD *w, WIZARD_PAGE *p); WIZARD_PAGE *GetWizardPage(WIZARD *w, UINT id); -UINT GetWizardPageIndex(WIZARD *w, UINT id); void *CreateWizardPageInstance(WIZARD *w, WIZARD_PAGE *p); void ShowWizard(HWND hWndParent, WIZARD *w, UINT start_id); void SetWizardButton(WIZARD_PAGE *p, bool enable_next, bool enable_back, bool enable_close, bool is_finish);