/* Window 生成時の CallBack */ BOOL TSetupDlg::EvCreate(LPARAM lParam) { setup_list.AttachWnd(GetDlgItem(SETUP_LIST)); for (int i=0; i < MAX_SETUP_SHEET; i++) { sheet[i].Create(SETUP_SHEET1 + i, cfg, this); setup_list.SendMessage(LB_ADDSTRING, 0, (LPARAM)GetLoadStr(IDS_SETUP_SHEET1 + i)); } SetSheet(); if (rect.left == CW_USEDEFAULT) { GetWindowRect(&rect); int xsize = rect.right - rect.left, ysize = rect.bottom - rect.top; int cx = ::GetSystemMetrics(SM_CXFULLSCREEN), cy = ::GetSystemMetrics(SM_CYFULLSCREEN); int x = (cx - xsize)/2; int y = (cy - ysize)/2; MoveWindow((x < 0) ? 0 : x % (cx - xsize), (y < 0) ? 0 : y % (cy - ysize), xsize, ysize, FALSE); } else MoveWindow(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, FALSE); return TRUE; }
BOOL TSetupDlg::EvCommand(WORD wNotifyCode, WORD wID, LPARAM hWndCtl) { switch (wID) { case IDOK: case IDAPPLY: { if (!sheet[curIdx].CheckData()) { return TRUE; } for (int i=0; i < MAX_SETUP_SHEET; i++) { sheet[i].GetData(); } cfg->WriteIni(); if (wID == IDOK) { EndDialog(wID); } } return TRUE; case IDCANCEL: EndDialog(wID); return TRUE; case SETUP_LIST: if (wNotifyCode == LBN_SELCHANGE) SetSheet(); return TRUE; } return FALSE; }
CSSImportRuleImpl::CSSImportRuleImpl(const CSSImportRuleImpl& aCopy) : nsCSSRule(aCopy), mURLSpec(aCopy.mURLSpec) { nsCOMPtr<nsICSSStyleSheet> sheet; if (aCopy.mChildSheet) { aCopy.mChildSheet->Clone(nsnull, this, nsnull, nsnull, getter_AddRefs(sheet)); } SetSheet(sheet); // SetSheet sets mMedia appropriately }