05 2013 档案
摘要:添加一行后,设为选中高亮m_nindex = m_list.GetItemCount() -1 ; m_list.SetItemState(m_nindex , LVIS_SELECTED, LVIS_SELECTED );删除某行后,把某行的下一行选中高亮void CDlgSysManager::OnBnClickedButtonDelete(){ if ( m_list.GetItemCount() <2) { MessageBox( "can't delete last user", MB_OK ); return ; } DLGDeleteEnter
阅读全文
摘要:void CVCTestDlg::OnLButtonDown(UINT nFlags, CPoint point){CRect rect;GetDlgItem( IDC_STATIC_FIXSDAY)->GetClientRect( &rect );//设置点击区域;if (rect.PtInRect(point )){SendMessage(WM_SYSCOMMAND,0xF012,0);//0xF012 = SC_MOVE | HTCAPTION 这样的话按下去这个区域就可以移动对话框;}}
阅读全文
摘要:((CInfoStationDlg *)GetParent())->UpdateCurFrameWord();
阅读全文
摘要:BOOL CWndWtrite::PreTranslateMessage(MSG* pMsg){ if(pMsg->message==WM_KEYDOWN) //判断是否有按键按下 { switch(pMsg->wParam) { case VK_DOWN: //表示是方向键中的向下的键 { int i=m_pProgData->GetCurRow(); i++; if(i >= m_pProgData->GetRowCnt() ) m_pProgData->SetCurRow(0); else...
阅读全文
摘要:CComboBox m_loginclass;1.添加内容m_loginclass.ResetContent(); m_loginclass.AddString( "Operator" ); m_loginclass.AddString( "Administrator" );2.显示想要的内容m_loginclass.SetCurSel(pUser->GetType());//3.获取内容m_loginclass.GetWindowText(strlgclass);
阅读全文
摘要:CList <CUser*,CUser*&> m_Usermap;CListCtrl m_list;//m_list 是控件CList Control 变量名;CUser 是一个类,里面的变量名对应m_list 的变量名;m_list.SetExtendedStyle( m_list.GetExtendedStyle() | LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES); //3. 插入数据 m_list.InsertColumn( 0, "USER NAME", LVCFMT_CENTER, 80 );// 插入列
阅读全文
摘要:CButtonSTm_ButAddFirstm_ButAddFirst.SetIcon( IDI_ICON2 ); m_ButAddFirst.SetFlat( FALSE );
阅读全文
摘要:1、添加按钮,在资源编辑的时候选中按钮的Ownerdraw即可,不需要选择Bitmap属性!2、在程序中定义一个CBitmapButton成员变量。不能使用ClassWizard为按钮映射一个CButton变量,然后改为CBitmapButton,这么做并不能将按钮直接映射为CBitmapButton类的对象,反而会出现初始化错误。要在OnInitDialog()外部定义,不要再函数内部定义;3-1、使用CBitmapButton::LoadBitmaps装载各种状态的图片,使用SubclassDlgItem关联到想要的按钮,使用CBitmapButton::SizeToContent函数使按
阅读全文
摘要://==========================================// API for Program//==========================================/*------------------------------------------Step 1: Create a program objectStep 2: Add play windowStep 3: Add item(text, clock, etc.) to the programStep 4: Save the program to fileStep 5: Destro
阅读全文
摘要:CString strFileName =m_ strFilePath;//m_ strFilePath是获取到的文件路径; TCHAR chFileName[ _MAX_FNAME ]; TCHAR chFileExt[ _MAX_EXT ]; _tsplitpath( strFileName.GetBuffer(), NULL, NULL, chFileName, chFileExt ); strFileName.Format( _T("%s%s"), chFileName, chFileExt ); return strFileName;
阅读全文

浙公网安备 33010602011771号