触摸屏租赁
Touch screen rental
广告机租赁
Advertising rental
机器人租赁
Robot leasing
 当前位置:首页 > > 设置对话框编辑框内字体大小

建立一对话框

BOOL CMy000000000Dlg::OnInitDialog()
{
 CDialog::OnInitDialog();

 // Add "About..." menu item to system menu.

 // IDM_ABOUTBOX must be in the system command range.
 ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
 ASSERT(IDM_ABOUTBOX < 0xF000);

 CMenu* pSysMenu = GetSystemMenu(FALSE);
 if (pSysMenu != NULL)
 {
  CString strAboutMenu;
  strAboutMenu.LoadString(IDS_ABOUTBOX);
  if (!strAboutMenu.IsEmpty())
  {
   pSysMenu->AppendMenu(MF_SEPARATOR);
   pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
  }
 }

 // Set the icon for this dialog.  The framework does this automatically
 //  when the application's main window is not a dialog
 SetIcon(m_hIcon, TRUE);   // Set big icon
 SetIcon(m_hIcon, FALSE);  // Set small icon
 
 // TODO: Add extra initialization here

 CFont * f;   
 f = new CFont;   
 f->CreateFont(   
        36,                         // nHeight    
         0,                         // nWidth    
         0,                         // nEscapement    
         0,                         // nOrientation    
         FW_BOLD,                   // nWeight    
         FALSE,                     // bItalic    
         FALSE,                     // bUnderline    
         0,                         // cStrikeOut    
         ANSI_CHARSET,              // nCharSet    
         OUT_DEFAULT_PRECIS,        // nOutPrecision    
         CLIP_DEFAULT_PRECIS,       // nClipPrecision    
         DEFAULT_QUALITY,           // nQuality    
         DEFAULT_PITCH | FF_SWISS,  // nPitchAndFamily    
         _T("Arial")                // lpszFac   
             );
    GetDlgItem(IDC_EDIT1)->SetFont(f); 
    CString x; 
 x = "3333333333333333333";
 SetDlgItemText(IDC_EDIT1,x);
 return TRUE;  // return TRUE  unless you set the focus to a control
}


工作室地址:重庆石桥铺电脑城B座 | 微信:z35544216 | 网址:www.35544216.com