void Main_OnInitDialog (HWND hDlg) { // Resize and reposition the main window // RECT rWindow = gr.rMain; if (!rWindow.right) GetWindowRect (hDlg, &rWindow); ResizeWindow (hDlg, awdMain, rwaMoveToHere, &rWindow); // Add tabs to the main window's tab control // HWND hTab = GetDlgItem (hDlg, IDC_TAB); TabCtrl_SetImageList (hTab, AfsAppLib_CreateImageList (FALSE)); TCHAR szText[ cchRESOURCE ]; TC_ITEM tci; tci.mask = TCIF_TEXT | TCIF_PARAM | TCIF_IMAGE; tci.pszText = szText; for (size_t iTab = 0; iTab < cTABS; ++iTab) { tci.iImage = aTABS[ iTab ].idiImage; tci.lParam = (LPARAM)aTABS[ iTab ].tt; GetString (tci.pszText, aTABS[ iTab ].idsText); TabCtrl_InsertItem (hTab, iTab, &tci); } // Subclass the tab control, so that we can make it forward any WM_SIZE // messages to its child window. // Subclass_AddHook (hTab, Main_TabHookProc); // Since we just subclassed this control, our new wndproc wasn't around // when the window was created. Any WM_CREATE processing we'd ordinarily // in that wndproc must therefore be done here. // WM_CREATE: RECT rTab; GetRectInParent (hTab, &rTab); ResizeWindow (hTab, awdTabChild, rwaMoveToHere, &rTab); // Select an appropriate tab and display it. // Main_PrepareTabChild (gr.iTabLast); // Tell the admin client that we're interested in any actions that occur // ULONG status; asc_ActionListen (g.idClient, g.hMain, &status); }
/* * Event Handler Functions _________________________________________________________________ * */ static void OnInitDialog(HWND hwndDlg) { HOURGLASS hg; hDlg = hwndDlg; hDriveList = GetDlgItem(hDlg, IDC_DRIVE_LIST); g_pWiz->SetButtonText(IDNEXT, IDS_NEXT); g_pWiz->SetDefaultControl(IDNEXT); if (g_CfgData.configPartition == CS_ALREADY_CONFIGURED) { CantMakePartition(IDS_PARTITION_ALREADY_CREATED); return; } // Should this step be disabled? Yes, if this machine is // not configured as a file server. if (!ConfiguredOrConfiguring(g_CfgData.configFS)) { CantMakePartition(IDS_NOT_A_FS_SERVER); EnableStep(g_CfgData.configPartition, FALSE); return; } // Do this in case it was disabled the last time EnableStep(g_CfgData.configPartition); switch (g_CfgData.configPartition) { case CS_DONT_CONFIGURE: SetCheck(hDlg, IDC_DONT_CREATE_PARTITION); EnableDriveListCtrls(FALSE); break; case CS_CONFIGURE: default: SetCheck(hDlg, IDC_CREATE_PARTITION); EnableDriveListCtrls(); break; } Subclass_AddHook(g_pWiz->GetWindow(), WizardDlgProc); SetupDriveList(hDriveList); UpdateDriveList(); ShowPartitionInfo(); if (g_CfgData.bFirstServer) MustMakePartition(); }
int rwFindOrAddWnd (HWND hWnd, rwWindowData *awd) { // Is the window handle listed in awl[] already? // int ii; for (ii = 0; ii < (int)cwl; ii++) { if (awl[ii].hWnd == hWnd) { if (awd) awl[ii].awdLast = awd; return ii; } } // No? Then add it. // for (ii = 0; ii < (int)cwl; ii++) { if (awl[ii].hWnd == NULL) break; } if (ii == (int)cwl) { if (!REALLOC (awl, cwl, ii+1, 1)) return (DWORD)-1; } awl[ii].hWnd = hWnd; awl[ii].awdLast = awd; if (IsWindow (hWnd)) { GetWindowRect (hWnd, &awl[ii].rWnd); Subclass_AddHook (hWnd, Resize_DialogProc); } else { awl[ii].rWnd.left = 0; awl[ii].rWnd.right = 0; awl[ii].rWnd.top = 0; awl[ii].rWnd.bottom = 0; } awl[ii].cxDeltaCenter = 0; awl[ii].cyDeltaCenter = 0; return ii; }
void WIZARD::Template_OnInitDialog (HWND hWnd) { m_hWnd = hWnd; m_fShowing = TRUE; HWND hLHS; if ((hLHS = GetDlgItem (m_hWnd, m_idcLeftPane)) != NULL) { Subclass_AddHook (hLHS, WIZARD::Template_LeftPaneHook); } HWND hRHS; if ((hRHS = GetDlgItem (m_hWnd, m_idcRightPane)) != NULL) { ShowWindow (hRHS, SW_HIDE); } Refresh (REFRESH_RIGHT_PANE); ShowWindow (m_hWnd, SW_SHOW); }
void Elapsed_OnCreate (ElapsedInfo *pei) { Subclass_AddHook (GetParent(pei->hElapsed), ElapsedDlgProc); TCHAR szTimeSep[ cchRESOURCE ]; if (!GetLocaleInfo (LOCALE_USER_DEFAULT, LOCALE_STIME, szTimeSep, cchRESOURCE)) lstrcpy (szTimeSep, TEXT(":")); RECT rElapsed; GetClientRect (pei->hElapsed, &rElapsed); POINT ptElapsed = {0,0}; ClientToScreen (pei->hElapsed, &ptElapsed); ScreenToClient (GetParent (pei->hElapsed), &ptElapsed); SIZE s88; // size of widest likely double-digit number SIZE s888; // maximum width to which we'll go for second- and minute- fields SIZE sTimeSep; // size of ":" HDC hdc = GetDC (GetParent (pei->hElapsed)); GetTextExtentPoint (hdc, TEXT("88"), lstrlen(TEXT("88")), &s88); GetTextExtentPoint (hdc, szTimeSep, lstrlen(szTimeSep), &sTimeSep); ReleaseDC (GetParent (pei->hElapsed), hdc); s888 = s88; s888.cx = (LONG)( (double)(s88.cx) * 1.2 ); LONG cxNumbers = cxRECT(rElapsed) - (2 * sTimeSep.cx) - GetSystemMetrics (SM_CXVSCROLL); LONG cxSeconds = min( max( cxNumbers/3, s88.cx ), s888.cx ); LONG cxMinutes = min( max( cxNumbers/3, s88.cx ), s888.cx ); LONG cxHours = cxNumbers - cxSeconds - cxMinutes; LONG yy = ptElapsed.y; LONG cy = cyRECT(rElapsed); pei->idHours = 100+NextControlID (GetParent (pei->hElapsed)); pei->hHours = CreateWindow ( TEXT("EDIT"), TEXT(""), WS_CHILD | WS_TABSTOP | ES_RIGHT | ES_NUMBER, ptElapsed.x, yy, cxHours, cy, GetParent(pei->hElapsed), (HMENU)pei->idHours, THIS_HINST, 0); pei->hSep1 = CreateWindow ( TEXT("STATIC"), szTimeSep, WS_CHILD, ptElapsed.x + cxHours, yy, sTimeSep.cx, cy, GetParent(pei->hElapsed), (HMENU)-1, THIS_HINST, 0); pei->idMinutes = 100+NextControlID (GetParent (pei->hElapsed)); pei->hMinutes = CreateWindow ( TEXT("EDIT"), TEXT(""), WS_CHILD | WS_TABSTOP | ES_RIGHT | ES_NUMBER, ptElapsed.x + cxHours + sTimeSep.cx, yy, cxMinutes, cy, GetParent(pei->hElapsed), (HMENU)pei->idMinutes, THIS_HINST, 0); pei->hSep2 = CreateWindow ( TEXT("STATIC"), szTimeSep, WS_CHILD, ptElapsed.x + cxHours + cxMinutes + sTimeSep.cx, yy, sTimeSep.cx, cy, GetParent(pei->hElapsed), (HMENU)-1, THIS_HINST, 0); pei->idSeconds = 100+NextControlID (GetParent (pei->hElapsed)); pei->hSeconds = CreateWindow ( TEXT("EDIT"), TEXT(""), WS_CHILD | WS_TABSTOP | ES_RIGHT | ES_NUMBER, ptElapsed.x + cxHours + cxMinutes + 2 * sTimeSep.cx, yy, cxSeconds, cy, GetParent(pei->hElapsed), (HMENU)pei->idSeconds, THIS_HINST, 0); Subclass_AddHook (pei->hHours, ElapsedEditProc); Subclass_AddHook (pei->hMinutes, ElapsedEditProc); Subclass_AddHook (pei->hSeconds, ElapsedEditProc); HFONT hf = (HFONT)SendMessage (GetParent (pei->hElapsed), WM_GETFONT, 0, 0); SendMessage (pei->hHours, WM_SETFONT, (WPARAM)hf, MAKELPARAM(TRUE,0)); SendMessage (pei->hSep1, WM_SETFONT, (WPARAM)hf, MAKELPARAM(TRUE,0)); SendMessage (pei->hMinutes, WM_SETFONT, (WPARAM)hf, MAKELPARAM(TRUE,0)); SendMessage (pei->hSep2, WM_SETFONT, (WPARAM)hf, MAKELPARAM(TRUE,0)); SendMessage (pei->hSeconds, WM_SETFONT, (WPARAM)hf, MAKELPARAM(TRUE,0)); EnableWindow (pei->hHours, IsWindowEnabled (pei->hElapsed)); EnableWindow (pei->hSep1, IsWindowEnabled (pei->hElapsed)); EnableWindow (pei->hMinutes, IsWindowEnabled (pei->hElapsed)); EnableWindow (pei->hSep2, IsWindowEnabled (pei->hElapsed)); EnableWindow (pei->hSeconds, IsWindowEnabled (pei->hElapsed)); ShowWindow (pei->hHours, TRUE); ShowWindow (pei->hSep1, TRUE); ShowWindow (pei->hMinutes, TRUE); ShowWindow (pei->hSep2, TRUE); ShowWindow (pei->hSeconds, TRUE); RECT rWindow; GetWindowRect (pei->hElapsed, &rWindow); rWindow.right += (cxHours + cxMinutes + cxSeconds + 2 * sTimeSep.cx) - cxRECT(rElapsed); SetWindowPos (pei->hElapsed, NULL, 0, 0, cxRECT(rWindow), cyRECT(rWindow), SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER); SET_ELAPSED_TIME(&pei->timeMin, 0, 0, 0); SET_ELAPSED_TIME(&pei->timeMax, 24, 0, 0); Elapsed_Edit_OnEnforceRange (pei, pei->hHours); Elapsed_Edit_OnEnforceRange (pei, pei->hMinutes); Elapsed_Edit_OnEnforceRange (pei, pei->hSeconds); Elapsed_Edit_OnSetFocus (pei, pei->hHours); pei->fCanCallBack = TRUE; }
void Time_OnCreate (TimeInfo *pti) { Subclass_AddHook (GetParent(pti->hTime), TimeDlgProc); TCHAR szTimeSep[ cchRESOURCE ]; if (!GetLocaleInfo (LOCALE_USER_DEFAULT, LOCALE_STIME, szTimeSep, cchRESOURCE)) lstrcpy (szTimeSep, TEXT(":")); TCHAR sz24Hour[ cchRESOURCE ]; if (!GetLocaleInfo (LOCALE_USER_DEFAULT, LOCALE_ITIME, sz24Hour, cchRESOURCE)) pti->f24Hour = FALSE; else pti->f24Hour = (sz24Hour[0] == TEXT('1')) ? TRUE : FALSE; TCHAR sz0Hour[ cchRESOURCE ]; if (!GetLocaleInfo (LOCALE_USER_DEFAULT, LOCALE_ITLZERO, sz0Hour, cchRESOURCE)) pti->f0Hours = FALSE; else pti->f0Hours = (sz0Hour[0] == TEXT('1')) ? TRUE : FALSE; RECT rTime; GetClientRect (pti->hTime, &rTime); POINT ptTime = {0,0}; ClientToScreen (pti->hTime, &ptTime); ScreenToClient (GetParent (pti->hTime), &ptTime); SIZE s88; // size of widest likely double-digit number SIZE sTimeSep; // size of ":" SIZE sAMPM; // size of "AM/PM" listbox TCHAR szAM[ cchRESOURCE ]; TCHAR szPM[ cchRESOURCE ]; HDC hdc = GetDC (GetParent (pti->hTime)); GetTextExtentPoint (hdc, TEXT("88"), lstrlen(TEXT("88")), &s88); GetTextExtentPoint (hdc, szTimeSep, lstrlen(szTimeSep), &sTimeSep); if (!pti->f24Hour) Time_GetAMPMSize (hdc, &sAMPM, szAM, szPM); ReleaseDC (GetParent (pti->hTime), hdc); LONG cxNumbers = cxRECT(rTime) - GetSystemMetrics (SM_CXVSCROLL) - (sTimeSep.cx); if (!pti->f24Hour) cxNumbers -= sTimeSep.cx + sAMPM.cx; LONG cxMinutes = max( cxNumbers/2, s88.cx ); LONG cxHours = cxNumbers - cxMinutes; cxMinutes = min (cxMinutes, (LONG)( 1.2 * s88.cx )); cxHours = min (cxHours, (LONG)( 1.2 * s88.cx )); // don't be TOO wide. LONG cy = cyRECT(rTime); LONG yy = ptTime.y; pti->idHours = 100+NextControlID (GetParent (pti->hTime)); pti->hHours = CreateWindow ( TEXT("EDIT"), TEXT(""), WS_CHILD | WS_TABSTOP | ES_MULTILINE | ES_RIGHT | ES_NUMBER, ptTime.x, yy, cxHours, cy, GetParent(pti->hTime), (HMENU)pti->idHours, THIS_HINST, 0); pti->hSep1 = CreateWindow ( TEXT("STATIC"), szTimeSep, WS_CHILD | SS_CENTER, ptTime.x + cxHours, yy, sTimeSep.cx, cy, GetParent(pti->hTime), (HMENU)-1, THIS_HINST, 0); pti->idMinutes = 100+NextControlID (GetParent (pti->hTime)); pti->hMinutes = CreateWindow ( TEXT("EDIT"), TEXT(""), WS_CHILD | WS_TABSTOP | ES_MULTILINE | ES_RIGHT | ES_NUMBER, ptTime.x + cxHours + sTimeSep.cx, yy, cxMinutes, cy, GetParent(pti->hTime), (HMENU)pti->idMinutes, THIS_HINST, 0); if (!pti->f24Hour) { pti->hSep2 = CreateWindow ( TEXT("STATIC"), TEXT(""), WS_CHILD | SS_CENTER, ptTime.x + cxHours + cxMinutes + sTimeSep.cx, yy, sTimeSep.cx, cy, GetParent(pti->hTime), (HMENU)-1, THIS_HINST, 0); pti->idAMPM = 100+NextControlID (GetParent (pti->hTime)); pti->hAMPM = CreateWindow ( TEXT("LISTBOX"), TEXT(""), WS_CHILD | WS_TABSTOP | LBS_NOINTEGRALHEIGHT | LBS_HASSTRINGS | LBS_OWNERDRAWFIXED | LBS_NOTIFY, ptTime.x + cxHours + cxMinutes + 2 * sTimeSep.cx, yy, sAMPM.cx, cy, GetParent(pti->hTime), (HMENU)pti->idAMPM, THIS_HINST, 0); } Subclass_AddHook (pti->hHours, TimeEditProc); Subclass_AddHook (pti->hMinutes, TimeEditProc); if (!pti->f24Hour) Subclass_AddHook (pti->hAMPM, TimeEditProc); HFONT hf = (HFONT)SendMessage (GetParent (pti->hTime), WM_GETFONT, 0, 0); SendMessage (pti->hHours, WM_SETFONT, (WPARAM)hf, MAKELPARAM(TRUE,0)); SendMessage (pti->hSep1, WM_SETFONT, (WPARAM)hf, MAKELPARAM(TRUE,0)); SendMessage (pti->hMinutes, WM_SETFONT, (WPARAM)hf, MAKELPARAM(TRUE,0)); if (!pti->f24Hour) { SendMessage (pti->hSep2, WM_SETFONT, (WPARAM)hf, MAKELPARAM(TRUE,0)); SendMessage (pti->hAMPM, WM_SETFONT, (WPARAM)hf, MAKELPARAM(TRUE,0)); } EnableWindow (pti->hHours, IsWindowEnabled (pti->hTime)); EnableWindow (pti->hSep1, IsWindowEnabled (pti->hTime)); EnableWindow (pti->hMinutes, IsWindowEnabled (pti->hTime)); if (!pti->f24Hour) { EnableWindow (pti->hSep2, IsWindowEnabled (pti->hTime)); EnableWindow (pti->hAMPM, IsWindowEnabled (pti->hTime)); LB_StartChange (pti->hAMPM, TRUE); LB_AddItem (pti->hAMPM, szAM, 0); LB_AddItem (pti->hAMPM, szPM, 1); LB_EndChange (pti->hAMPM); LB_SetSelected (pti->hAMPM, 1); } ShowWindow (pti->hHours, TRUE); ShowWindow (pti->hSep1, TRUE); ShowWindow (pti->hMinutes, TRUE); if (!pti->f24Hour) { ShowWindow (pti->hSep2, TRUE); ShowWindow (pti->hAMPM, TRUE); } RECT rWindow; GetWindowRect (pti->hTime, &rWindow); rWindow.right += (cxHours + cxMinutes + sTimeSep.cx) - cxRECT(rTime); if (!pti->f24Hour) rWindow.right += sTimeSep.cx + sAMPM.cx; SetWindowPos (pti->hTime, NULL, 0, 0, cxRECT(rWindow), cyRECT(rWindow), SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER); RECT rSpinner; GetRectInParent (pti->hTime, &rSpinner); rSpinner.left = rSpinner.right; rSpinner.right = rSpinner.left + GetSystemMetrics (SM_CXVSCROLL); rSpinner.bottom -= 2; // just like Win95 does CreateSpinner (pti->hHours, 10, FALSE, 0, pti->timeNow.wHour, 24, &rSpinner); pti->hSpinner = SP_GetSpinner (pti->hHours); pti->hSpinnerBuddy = pti->hHours; Time_Edit_SetText (pti, pti->hHours); Time_Edit_SetText (pti, pti->hMinutes); Time_Edit_OnSetFocus (pti, pti->hHours); pti->fCanCallBack = TRUE; }
void WIZARD::Background_OnInitDialog (HWND hBkg) { m_hBkg = hBkg; Background_OnSize(); Subclass_AddHook (m_hBkg, (DLGPROC)WIZARD::Background_PaintHook); }
void SockAddr_OnCreate (SockAddrInfo *psai) { Subclass_AddHook (GetParent(psai->hSockAddr), SockAddrDlgProc); RECT rSockAddr; GetClientRect (psai->hSockAddr, &rSockAddr); POINT ptSockAddr = {0,0}; ClientToScreen (psai->hSockAddr, &ptSockAddr); ScreenToClient (GetParent (psai->hSockAddr), &ptSockAddr); SIZE s888; // size of widest likely triple-digit number SIZE sSockSep; // size of "." HDC hdc = GetDC (GetParent (psai->hSockAddr)); GetTextExtentPoint (hdc, TEXT("888"), lstrlen(TEXT("888")), &s888); GetTextExtentPoint (hdc, cszSOCKSEP, lstrlen(cszSOCKSEP), &sSockSep); ReleaseDC (GetParent (psai->hSockAddr), hdc); LONG cxNumbers = cxRECT(rSockAddr) - (3 * sSockSep.cx); LONG cxE2 = cxNumbers/4; LONG cxE1 = cxNumbers - cxE2 * 3; LONG yy = ptSockAddr.y; LONG cy = cyRECT(rSockAddr); cxE2 = min (cxE2, (LONG)( 1.4 * s888.cx )); cxE1 = min (cxE1, (LONG)( 1.4 * s888.cx )); // don't be TOO wide. psai->idE1 = 100+NextControlID (GetParent (psai->hSockAddr)); psai->hE1 = CreateWindow ( TEXT("EDIT"), TEXT(""), WS_CHILD | WS_TABSTOP | ES_RIGHT | ES_NUMBER | ES_MULTILINE, ptSockAddr.x, yy, cxE1, cy, GetParent(psai->hSockAddr), (HMENU)psai->idE1, THIS_HINST, 0); psai->hSep1 = CreateWindow ( TEXT("STATIC"), cszSOCKSEP, WS_CHILD | SS_CENTER, ptSockAddr.x + cxE1, yy, sSockSep.cx, cy, GetParent(psai->hSockAddr), (HMENU)-1, THIS_HINST, 0); psai->idE2 = 1 + psai->idE1; psai->hE2 = CreateWindow ( TEXT("EDIT"), TEXT(""), WS_CHILD | WS_TABSTOP | ES_RIGHT | ES_NUMBER | ES_MULTILINE, ptSockAddr.x + cxE1 + sSockSep.cx, yy, cxE2, cy, GetParent(psai->hSockAddr), (HMENU)psai->idE2, THIS_HINST, 0); psai->hSep2 = CreateWindow ( TEXT("STATIC"), cszSOCKSEP, WS_CHILD | SS_CENTER, ptSockAddr.x + cxE1 + sSockSep.cx + cxE2, yy, sSockSep.cx, cy, GetParent(psai->hSockAddr), (HMENU)-1, THIS_HINST, 0); psai->idE3 = 1 + psai->idE2; psai->hE3 = CreateWindow ( TEXT("EDIT"), TEXT(""), WS_CHILD | WS_TABSTOP | ES_RIGHT | ES_NUMBER | ES_MULTILINE, ptSockAddr.x + cxE1 + sSockSep.cx*2 + cxE2, yy, cxE2, cy, GetParent(psai->hSockAddr), (HMENU)psai->idE3, THIS_HINST, 0); psai->hSep3 = CreateWindow ( TEXT("STATIC"), cszSOCKSEP, WS_CHILD | SS_CENTER, ptSockAddr.x + cxE1 + sSockSep.cx*2 + cxE2*2, yy, sSockSep.cx, cy, GetParent(psai->hSockAddr), (HMENU)-1, THIS_HINST, 0); psai->idE4 = 1 + psai->idE3; psai->hE4 = CreateWindow ( TEXT("EDIT"), TEXT(""), WS_CHILD | WS_TABSTOP | ES_RIGHT | ES_NUMBER | ES_MULTILINE, ptSockAddr.x + cxE1 + sSockSep.cx*3 + cxE2*2, yy, cxE2, cy, GetParent(psai->hSockAddr), (HMENU)psai->idE4, THIS_HINST, 0); Subclass_AddHook (psai->hE1, SockAddrEditProc); Subclass_AddHook (psai->hE2, SockAddrEditProc); Subclass_AddHook (psai->hE3, SockAddrEditProc); Subclass_AddHook (psai->hE4, SockAddrEditProc); HFONT hf = (HFONT)SendMessage (GetParent (psai->hSockAddr), WM_GETFONT, 0, 0); SendMessage (psai->hE1, WM_SETFONT, (WPARAM)hf, MAKELPARAM(TRUE,0)); SendMessage (psai->hSep1, WM_SETFONT, (WPARAM)hf, MAKELPARAM(TRUE,0)); SendMessage (psai->hE2, WM_SETFONT, (WPARAM)hf, MAKELPARAM(TRUE,0)); SendMessage (psai->hSep2, WM_SETFONT, (WPARAM)hf, MAKELPARAM(TRUE,0)); SendMessage (psai->hE3, WM_SETFONT, (WPARAM)hf, MAKELPARAM(TRUE,0)); SendMessage (psai->hSep3, WM_SETFONT, (WPARAM)hf, MAKELPARAM(TRUE,0)); SendMessage (psai->hE4, WM_SETFONT, (WPARAM)hf, MAKELPARAM(TRUE,0)); EnableWindow (psai->hE1, IsWindowEnabled (psai->hSockAddr)); EnableWindow (psai->hSep1, IsWindowEnabled (psai->hSockAddr)); EnableWindow (psai->hE2, IsWindowEnabled (psai->hSockAddr)); EnableWindow (psai->hSep2, IsWindowEnabled (psai->hSockAddr)); EnableWindow (psai->hE3, IsWindowEnabled (psai->hSockAddr)); EnableWindow (psai->hSep3, IsWindowEnabled (psai->hSockAddr)); EnableWindow (psai->hE4, IsWindowEnabled (psai->hSockAddr)); ShowWindow (psai->hE1, TRUE); ShowWindow (psai->hSep1, TRUE); ShowWindow (psai->hE2, TRUE); ShowWindow (psai->hSep2, TRUE); ShowWindow (psai->hE3, TRUE); ShowWindow (psai->hSep3, TRUE); ShowWindow (psai->hE4, TRUE); RECT rWindow; GetWindowRect (psai->hSockAddr, &rWindow); rWindow.right += (cxE1 + cxE2*3 + sSockSep.cx*3) - cxRECT(rSockAddr); SetWindowPos (psai->hSockAddr, NULL, 0, 0, cxRECT(rWindow), cyRECT(rWindow), SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER); SOCKADDR_IN addrNew; memset (&addrNew, 0x00, sizeof(addrNew)); SockAddr_OnSetAddr (psai, 0, (LPARAM)&addrNew); }