这篇教程C++ EnableControl函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中EnableControl函数的典型用法代码示例。如果您正苦于以下问题:C++ EnableControl函数的具体用法?C++ EnableControl怎么用?C++ EnableControl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了EnableControl函数的22个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: LocalTopic_OnInitDialog/* This function handles the WM_INITDIALOG message. */BOOL FASTCALL LocalTopic_OnInitDialog( HWND hwnd, HWND hwndFocus, LPARAM lParam ){ HWND hwndList; HWND hwndEdit; CURMSG curmsg; int index; /* Fill the listbox with the list of folders. */ hwndList = GetDlgItem( hwnd, IDD_LIST ); FillListWithFolders( hwnd, IDD_LIST ); /* Highlight the current folder or topic. */ Ameol2_GetCurrentTopic( &curmsg ); if( NULL != curmsg.pFolder ) { ASSERT( NULL != curmsg.pcat ); if( NULL == curmsg.pcl ) curmsg.pcl = Amdb_GetFirstFolder( curmsg.pcat ); if( CB_ERR != ( index = ComboBox_FindStringExact( hwndList, -1, curmsg.pcl ) ) ) ComboBox_SetCurSel( hwndList, index ); } /* Limit the input field. */ VERIFY( hwndEdit = GetDlgItem( hwnd, IDD_EDIT ) ); Edit_LimitText( hwndEdit, LEN_TOPICNAME ); EnableControl( hwnd, IDOK, FALSE ); SetFocus( hwndEdit ); return( FALSE );}
开发者ID:cixonline,项目名称:ameol,代码行数:34,
示例2: NewBlinkEntryDlg_OnInitDialog/* This function handles the WM_INITDIALOG message. */BOOL FASTCALL NewBlinkEntryDlg_OnInitDialog( HWND hwnd, HWND hwndFocus, LPARAM lParam ){ Edit_LimitText( GetDlgItem( hwnd, IDD_EDIT ), 39 ); EnableControl( hwnd, IDOK, FALSE ); SetWindowLong( hwnd, DWL_USER, lParam ); return( TRUE );}
开发者ID:cixonline,项目名称:ameol,代码行数:9,
示例3: EnableControl//---------------------------------------------------------------------------void __fastcall TRightsFrame::UpdateControls(){ Color = (FPopup ? clWindow : clBtnFace); DirectoriesXCheck->Visible = AllowAddXToDirectories; EnableControl(DirectoriesXCheck, Enabled && DirectoriesXEffective()); FInitialized = true; DoChange();}
开发者ID:mpmartin8080,项目名称:winscp,代码行数:10,
示例4: BufferDC//确定函数VOID CDlgCustomFace::OnOK(){ //连接判断 bool bConnect=false; //系统模式 if (m_cbMode==MM_SYSTEM) { CGlobalUserInfo * pGlobalUserInfo=CGlobalUserInfo::GetInstance(); bConnect=(pGlobalUserInfo->GetGlobalUserData()->wFaceID!=m_wFaceID); } //自定模式 if (m_cbMode==MM_CUSTOM) { //创建缓冲 CImage ImageCustomFace; ImageCustomFace.Create(FACE_CX,FACE_CY,32); //创建 DC CImageDC BufferDC(ImageCustomFace); m_FaceItemCustomWnd.DrawEditImage(CDC::FromHandle(BufferDC),0,0,FACE_CX,FACE_CY); //获取数据 INT nImagePitch=ImageCustomFace.GetPitch(); LPBYTE cbBitCustomFace=(LPBYTE)ImageCustomFace.GetBits(); //创建区域 for (INT nYImagePos=0;nYImagePos<FACE_CY;nYImagePos++) { for (INT nXImagePos=0;nXImagePos<FACE_CX;nXImagePos++) { //设置颜色 DWORD dwImageTarget=nYImagePos*nImagePitch+nXImagePos*4L; m_CustomFaceInfo.dwCustomFace[nYImagePos*FACE_CX+nXImagePos]=*(COLORREF *)(cbBitCustomFace+dwImageTarget); } } //设置变量 bConnect=true; m_CustomFaceInfo.dwDataSize=sizeof(m_CustomFaceInfo); } //激活任务 if (bConnect==true) { //控件控制 EnableControl(false); //激活任务 m_MissionManager.AvtiveMissionItem(this,false); return; } __super::OnOK();}
开发者ID:cyrillic7,项目名称:CPFrom,代码行数:58,
示例5: switchINT_PTR HintBox::HandleMessage(MessageType message, WPARAM wParam) { INT_PTR result = FALSE; switch (message) { case WM_INITDIALOG: { Dialog::HandleMessage(message, wParam); if (mGameStyle == GAME_STYLE_CHALLENGE) { // disable the stronger hints EnableControl(IDC_RADIO_CONNECTED, false); EnableControl(IDC_RADIO_USABLE_ANY, false); EnableControl(IDC_RADIO_USABLE_SELECTED, false); } SetHintStrength(); result = TRUE; break; } case WM_COMMAND: { IdType const id = LOWORD(wParam); int const notification_code = HIWORD(wParam); switch (id) { case IDC_RADIO_NONE: case IDC_RADIO_EMPTY: case IDC_RADIO_CONNECTED: case IDC_RADIO_USABLE_ANY: case IDC_RADIO_USABLE_SELECTED: if (notification_code == BN_CLICKED) { SetHintStrength(id); } break; default: break; } break; } } if (result == FALSE) { result = Dialog::HandleMessage(message, wParam); } return result;}
开发者ID:stephengold,项目名称:gold-tiles,代码行数:44,
示例6: EnableControl/** * Set the output set-point value. * * The scale and the units depend on the mode the Jaguar is in. * In PercentVbus Mode, the outputValue is from -1.0 to 1.0 (same as PWM Jaguar). * In Voltage Mode, the outputValue is in Volts. * In Current Mode, the outputValue is in Amps. * In Speed Mode, the outputValue is in Rotations/Minute. * In Position Mode, the outputValue is in Rotations. * * @param outputValue The set-point to sent to the motor controller. * @param syncGroup The update group to add this Set() to, pending UpdateSyncGroup(). If 0, update immediately. */void CANJaguar::Set(float outputValue, uint8_t syncGroup){ uint32_t messageID; uint8_t dataBuffer[8]; uint8_t dataSize; if (m_safetyHelper && !m_safetyHelper->IsAlive()) { EnableControl(); } switch(m_controlMode) { case kPercentVbus: { messageID = LM_API_VOLT_T_SET; if (outputValue > 1.0) outputValue = 1.0; if (outputValue < -1.0) outputValue = -1.0; dataSize = packPercentage(dataBuffer, outputValue); } break; case kSpeed: { messageID = LM_API_SPD_T_SET; dataSize = packFXP16_16(dataBuffer, outputValue); } break; case kPosition: { messageID = LM_API_POS_T_SET; dataSize = packFXP16_16(dataBuffer, outputValue); } break; case kCurrent: { messageID = LM_API_ICTRL_T_SET; dataSize = packFXP8_8(dataBuffer, outputValue); } break; case kVoltage: { messageID = LM_API_VCOMP_T_SET; dataSize = packFXP8_8(dataBuffer, outputValue); } break; default: return; } if (syncGroup != 0) { dataBuffer[dataSize] = syncGroup; dataSize++; } setTransaction(messageID, dataBuffer, dataSize); if (m_safetyHelper) m_safetyHelper->Feed();}
开发者ID:errorcodexero,项目名称:porting,代码行数:69,
示例7: CONTROL_DISABLEvoid CGUIWindowSettingsScreenCalibration::ResetControls(){ // disable the video control, so that our other controls take mouse clicks etc. CONTROL_DISABLE(CONTROL_VIDEO); // disable the UI calibration for our controls // and set their limits // also, set them to invisible if they don't have focus CGUIMoverControl *pControl = dynamic_cast<CGUIMoverControl*>(GetControl(CONTROL_TOP_LEFT)); RESOLUTION_INFO info = g_graphicsContext.GetResInfo(m_Res[m_iCurRes]); if (pControl) { pControl->SetLimits( -info.iWidth / 4, -info.iHeight / 4, info.iWidth / 4, info.iHeight / 4); pControl->SetPosition((float)info.Overscan.left, (float)info.Overscan.top); pControl->SetLocation(info.Overscan.left, info.Overscan.top, false); } pControl = dynamic_cast<CGUIMoverControl*>(GetControl(CONTROL_BOTTOM_RIGHT)); if (pControl) { pControl->SetLimits(info.iWidth*3 / 4, info.iHeight*3 / 4, info.iWidth*5 / 4, info.iHeight*5 / 4); pControl->SetPosition((float)info.Overscan.right - (int)pControl->GetWidth(), (float)info.Overscan.bottom - (int)pControl->GetHeight()); pControl->SetLocation(info.Overscan.right, info.Overscan.bottom, false); } // Subtitles and OSD controls can only move up and down pControl = dynamic_cast<CGUIMoverControl*>(GetControl(CONTROL_SUBTITLES)); if (pControl) { pControl->SetLimits(0, info.iHeight*3 / 4, 0, info.iHeight*5 / 4); pControl->SetPosition((info.iWidth - pControl->GetWidth()) * 0.5f, info.iSubtitles - pControl->GetHeight()); pControl->SetLocation(0, info.iSubtitles, false); } // lastly the pixel ratio control... CGUIResizeControl *pResize = dynamic_cast<CGUIResizeControl*>(GetControl(CONTROL_PIXEL_RATIO)); if (pResize) { pResize->SetLimits(info.iWidth*0.25f, info.iHeight*0.5f, info.iWidth*0.75f, info.iHeight*0.5f); pResize->SetHeight(info.iHeight * 0.5f); pResize->SetWidth(pResize->GetHeight() / info.fPixelRatio); pResize->SetPosition((info.iWidth - pResize->GetWidth()) / 2, (info.iHeight - pResize->GetHeight()) / 2); } // Enable the default control EnableControl(m_iControl);}
开发者ID:evilhamster,项目名称:xbmc,代码行数:56,
示例8: SetControlModeSRXSpeed::SRXSpeed(int id, double Pvalue, double Ivalue, double Dvalue, int a):CANTalon(id){ SetControlMode(CANTalon::kSpeed); SetFeedbackDevice(CANTalon::QuadEncoder); SetP(Pvalue); SetI(Ivalue); SetD(Dvalue); EnableControl(); maxTicks=a;}
开发者ID:FRCTeam159,项目名称:2016-Robot-Code,代码行数:10,
示例9: ChangeControlModevoid SmartSpeedCANJaguar::Initialize(){ ChangeControlMode(kSpeed); // Set for speed mode SetSpeedReference(CANJaguar::kSpeedRef_Encoder); // Define the encoder type ConfigEncoderCodesPerRev(encoderPulsesPerRevolution); // Define the lines per revolution CANJaguar::SetPID(pid_P, pid_I, pid_D); // Set our passed in PID constants EnableControl(); // Must enable the control paramaters CANJaguar::Set(lastSetSpeed); // Restore the last target speed...}
开发者ID:FRCTeam1073-TheForceTeam,项目名称:robot11Elot,代码行数:10,
示例10: EnableControl//---------------------------------------------------------------------------void __fastcall TSynchronizeDialog::UpdateControls(){ EnableControl(StartButton, !LocalDirectoryEdit->Text.IsEmpty() && !RemoteDirectoryEdit->Text.IsEmpty()); TButton * OldButton = FSynchronizing ? StartButton : StopButton; TButton * NewButton = FSynchronizing ? StopButton : StartButton; if (!NewButton->Visible || OldButton->Visible) { NewButton->Visible = true; if (OldButton->Focused()) { NewButton->SetFocus(); } OldButton->Default = false; NewButton->Default = true; OldButton->Visible = false; // some of the above steps hides accelerators when start button is pressed with mouse ResetSystemSettings(this); } Caption = FormatFormCaption(this, LoadStr(FSynchronizing ? SYNCHRONIZE_SYCHRONIZING : SYNCHRONIZE_TITLE)); EnableControl(TransferSettingsButton, !FSynchronizing); CancelButton->Visible = !FSynchronizing || FLAGSET(FOptions, soNoMinimize); EnableControl(CancelButton, !FSynchronizing); EnableControl(DirectoriesGroup, !FSynchronizing); EnableControl(OptionsGroup, !FSynchronizing); EnableControl(CopyParamGroup, !FSynchronizing); MinimizeButton->Visible = FSynchronizing && FLAGCLEAR(FOptions, soNoMinimize); EnableControl(SynchronizeSelectedOnlyCheck, OptionsGroup->Enabled && FLAGSET(FOptions, soAllowSelectedOnly)); UnicodeString InfoStr = CopyParams.GetInfoStr(L"; ", ActualCopyParamAttrs()); CopyParamLabel->Caption = InfoStr; CopyParamLabel->Hint = InfoStr; CopyParamLabel->ShowHint = (CopyParamLabel->Canvas->TextWidth(InfoStr) > (CopyParamLabel->Width * 3 / 2)); TransferSettingsButton->Style = FLAGCLEAR(Options, soDoNotUsePresets) ? TCustomButton::bsSplitButton : TCustomButton::bsPushButton; if (LogPanel->Visible != FSynchronizing) { if (FSynchronizing) { LogPanel->Visible = true; ClientHeight = ClientHeight + LogPanel->Height; } else { ClientHeight = ClientHeight - LogPanel->Height; LogPanel->Visible = false; } } // When minimizing to tray globally, no point showing special "minimize to tray" command MinimizeButton->Style = !WinConfiguration->MinimizeToTray ? TCustomButton::bsSplitButton : TCustomButton::bsPushButton;}
开发者ID:anyue100,项目名称:winscp,代码行数:59,
示例11: SetComboBoxIndex//----------------------------------------------------------------------------------------------// ApplySetting//----------------------------------------------------------------------------------------------VOID CStickPage::ApplySetting(){ // 「スティックの C++ EnableDlgItem函数代码示例 C++ EnableApply函数代码示例
|