亚洲春色中文字幕久久久-三上亚,一吻二脱三床四吻胸,国产真实伦对白视频全集,在线毛片观看,精品成品入口黄网,国产毛aⅴ片久久久,亚洲AV色香蕉一区二区三区老师,萧皇后A级艳片,色情日本视频更新,99久久亚洲精品日本无码

標(biāo)題: Spin控件的使用(簡(jiǎn)要說(shuō)明) [打印本頁(yè)]

作者: bibi    時(shí)間: 2015-4-18 21:34
標(biāo)題: Spin控件的使用(簡(jiǎn)要說(shuō)明)
Demo
一 利用MFC AppWiard[exe]向?qū)?chuàng)建一個(gè)基于對(duì)話(huà)框的應(yīng)用程序MySpin
二 添加控件和變量


編輯框 ID為ID_EDIT,成員變量 CEdit m_ctlEdit;
旋轉(zhuǎn)按鈕 ID為ID_SPIN,成員變量 CSpinButtonCtrl m_ctlSpin;
三 設(shè)置旋轉(zhuǎn)按鈕屬性


三 在BOOL CSpinnDlg::OnInitDialog()添加代碼,紅色部分
BOOL CSpinnDlg::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
SetDlgItemText(IDC_EDIT, _T("0"));
//設(shè)置旋轉(zhuǎn)按鈕的位置范圍
m_ctlSpin.SetRange(-100, 100);
//設(shè)置旋轉(zhuǎn)按鈕的當(dāng)前位置
m_ctlSpin.SetPos(0);
//設(shè)置旋轉(zhuǎn)按鈕的當(dāng)前基數(shù)
m_ctlSpin.SetBase(1);
//設(shè)置旋轉(zhuǎn)按鈕的伙伴窗口   
m_ctlSpin.SetBuddy(GetDlgItem(IDC_EDIT));


return TRUE;  // return TRUE  unless you set the focus to a control
}

最后按Ctrl+F5編譯運(yùn)行








歡迎光臨 (http://www.denmoz.com/bbs/) Powered by Discuz! X3.1