本文整理汇总了C++中CUser::CanWrite方法的典型用法代码示例。如果您正苦于以下问题:C++ CUser::CanWrite方法的具体用法?C++ CUser::CanWrite怎么用?C++ CUser::CanWrite使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CUser
的用法示例。
在下文中一共展示了CUser::CanWrite方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DoDataExchange
void CStudentChooserDlg::DoDataExchange( CDataExchange* pDX ) {
CDialog::DoDataExchange( pDX );
DDX_Control( pDX, IDC_SEARCHFIRSTNAME, searchFirstName );
DDX_Control( pDX, IDC_SEARCHLASTNAME, searchLastName );
DDX_Control( pDX, IDC_SEARCHSSN, searchSSN );
DDX_Control( pDX, IDC_SEARCHCHECK, searchCheck );
DDX_Control( pDX, IDC_STUDENTLIST, studentList );
DDX_Control( pDX, IDC_NEWSTUDENT, newButton );
DDX_Control( pDX, IDC_OPENSTUDENT, openButton );
DDX_Control( pDX, IDC_SEARCHBUTTON, searchButton );
DDX_Control( pDX, IDC_SEARCHSCHOOLYEAR, schoolYearList );
searchCheck.SetCheck( 1 );
schoolYearList.DisableNull();
schoolYearList.SetList( storage.GetSchoolYearList() );
RefreshStudentList();
searchLastName.SetFocus();
if ( !user.CanWrite() ) {
newButton.EnableWindow( FALSE );
}
try {
schoolYearList.Select( preferences.GetInt( "CurrentSchoolYear" ) );
RefreshStudentList();
}
catch (...) {}
}
示例2: OnUpdateFileDelete
void CMainWindow::OnUpdateFileDelete( CCmdUI* pCmdUI ) {
pCmdUI->Enable(
user.CanWrite() &&
MDIGetActive() &&
MDIGetActive()->IsKindOf( RUNTIME_CLASS( CStudentChooserWnd ) ) &&
chooser->IsWindowVisible()
);
}
示例3: OnUpdateFileSave
void CMainWindow::OnUpdateFileSave( CCmdUI* pCmdUI ) {
pCmdUI->Enable(
user.CanWrite() &&
MDIGetActive() &&
MDIGetActive()->IsKindOf( RUNTIME_CLASS( CStudentEditWnd ) ) &&
((CStudentEditWnd*)MDIGetActive())->IsModified()
);
}
示例4: OnUpdateFileShowOptionsOnNew
void CMainWindow::OnUpdateFileShowOptionsOnNew( CCmdUI* pCmdUI ) {
pCmdUI->Enable( user.CanWrite() );
pCmdUI->SetCheck( ( preferences.GetBool("ShowNewStudentOptions") ? 1 : 0 ) );
}
示例5: OnUpdateFileNew
void CMainWindow::OnUpdateFileNew( CCmdUI* pCmdUI ) {
pCmdUI->Enable( user.CanWrite() );
}