BOOL CMissedCallsDlg::OnInitDialog() { CDialog::OnInitDialog(); // TODO: Add extra initialization here m_list.Init(); m_cboShow.AddString(_("Missed Calls")); m_cboShow.AddString(_("Received Calls")); m_cboShow.AddString(_("Placed Calls")); m_cboShow.SetCurSel(0); m_cboPhone.AddString(_("Show all")); LoadExtensions(); m_cboPhone.SetCurSel(0); m_cboDate.AddString(_("Show all")); m_cboDate.AddString(_("Today")); m_cboDate.SetCurSel(1); SetWindowPos(&this->wndNoTopMost,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE); UpdateList(); InitLocaleGUI(); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
int CAboutDlg::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CDialog::OnCreate(lpCreateStruct) == -1) return -1; LOGFONT lf; LOGFONT lf1; GetObject(GetStockObject(SYSTEM_FONT),sizeof(lf),&lf); cf.DeleteObject(); cf.CreatePointFont(10 * 10, _T("Tahoma")); cf.GetLogFont(&lf1); lf.lfHeight=lf1.lfHeight; lf.lfWidth=lf1.lfWidth; lf.lfWeight = FW_NORMAL; _tcscpy(lf.lfFaceName, _T("Tahoma")); cf.DeleteObject(); cf.CreateFontIndirect(&lf); this->SetFont(&cf); // TODO: Add your specialized creation code here RECT rect; this->SetIcon(LoadIcon(NULL, MAKEINTRESOURCE(IDR_MAINFRAME)), false); HBITMAP hBmp =(HBITMAP)::LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDB_BITMAP_OUTCALL), IMAGE_BITMAP, 0, 0, LR_LOADMAP3DCOLORS | LR_LOADTRANSPARENT); m_picture.Create(_T("text"), WS_VISIBLE | WS_CHILD | SS_BITMAP | SS_CENTERIMAGE, CRect(0,13,50,35), this); // IDC_STATIC_PICTURE); m_picture.SetBitmap(hBmp); //m_picture.SetWindowPos(&this->wndBottom, 10, 10, 40, 40,SWP_NOZORDER); m_picture.ShowWindow(1); m_version.Create(_T(""), WS_CHILD, rect, this, IDC_STATIC_VERSION); m_version.SetFont(lf); m_version.SetWindowPos(&this->wndBottom, 45, 10, 320, 20, SWP_NOZORDER); m_version.ShowWindow(1); m_version.Invalidate(); m_bsLink.Create(BRAND_COPYRIGHT, WS_CHILD, rect, this, IDC_STATIC_BS_LINK); m_bsLink.ModifyStyle(0, SS_NOTIFY); m_bsLink.SetFont(lf); m_bsLink.SetWindowPos(&this->wndBottom, 45, 35, 320, 20, SWP_NOZORDER); m_bsLink.ShowWindow(1); m_bsLink.UpdateWindow(); m_bsLink.SetTextColor(RGB(0,0,255)); m_bsLink.SetCursor(LoadCursor(NULL, IDC_HAND)); m_btnOK.Create(_("&OK"), WS_CHILD, rect, this, IDOK); m_btnOK.SetWindowPos(&this->wndBottom, 220, 74, 100, 23, SWP_NOZORDER); m_btnOK.ShowWindow(1); m_btnOK.SetFont(&cf); m_version.ShowWindow(1); this->Invalidate(); this->UpdateWindow(); InitLocaleGUI(); return 0; }