BOOL CEditListEditor::Create(CWnd* pParentWnd, UINT defDockBarID) { if (!__super::Create(ResStr(IDS_EDIT_LIST_EDITOR), pParentWnd, ID_VIEW_EDITLISTEDITOR, defDockBarID, _T("Edit List Editor"))) { return FALSE; } m_stUsers.Create(_T("User :"******"Users.txt"), m_cbUsers, false); m_stHotFolders.Create(_T("Hot folder :"), WS_VISIBLE | WS_CHILD, CRect(5, 35, 100, 51), this, 0); m_cbHotFolders.Create(WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST, CRect(90, 30, 260, 21), this, 0); FillCombo(_T("HotFolders.txt"), m_cbHotFolders, true); m_list.CreateEx( WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_TABSTOP | LVS_OWNERDRAWFIXED | LVS_REPORT | LVS_SINGLESEL | LVS_AUTOARRANGE | LVS_NOSORTHEADER, CRect(0, 0, 100, 100), this, IDC_EDITLIST); m_list.SetExtendedStyle(m_list.GetExtendedStyle() | LVS_EX_FULLROWSELECT | LVS_EX_DOUBLEBUFFER); m_list.InsertColumn(COL_IN, _T("Nb."), LVCFMT_LEFT, 35); m_list.InsertColumn(COL_IN, _T("In"), LVCFMT_LEFT, 100); m_list.InsertColumn(COL_OUT, _T("Out"), LVCFMT_LEFT, 100); m_list.InsertColumn(COL_NAME, _T("Name"), LVCFMT_LEFT, 150); m_fakeImageList.Create(1, 16, ILC_COLOR4, 10, 10); m_list.SetImageList(&m_fakeImageList, LVSIL_SMALL); return TRUE; }
LRESULT CElementPropPage::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { m_btnLineColPicker.SubclassWindow(GetDlgItem(IDC_LINE_COLOR)); m_btnPointColPicker.SubclassWindow(GetDlgItem(IDC_POINT_COLOR)); FillCombo(GetDlgItem(IDC_COMBO_TYPE), IDS_ELEM_LINE_TYPE, -1); FillCombo(GetDlgItem(IDC_COMBO_SYMBOL), IDS_ELEM_POINT_TYPE, -1); SendDlgItemMessage(IDC_SPIN_LINE_WIDTH, UDM_SETRANGE, 0, MAKELONG(5, 0)); SendDlgItemMessage(IDC_SPIN_POINT_WIDTH, UDM_SETRANGE, 0, MAKELONG(5, 0)); CComPtr<IDMGraphCtrl> spGraph; if(FAILED(GetGraphCtrl(&spGraph))) { return 0; } HRESULT hr; CComPtr<IDMGraphCollection> spGraphCollection; hr = spGraph->get_Elements(&spGraphCollection); if(FAILED(hr)) { return hr; } InitCollectionList(spGraphCollection); //Update controls UpdateControls(spGraph); m_bInited = TRUE; return 1; }
void CContentTypeComboBox::PreSubclassWindow() { if (!CComboBox::GetCount() && m_pContentMgr) FillCombo(); CComboBox::PreSubclassWindow(); }
LRESULT CFormatPropPage::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { FillCombo(GetDlgItem(IDC_COMBO_AXIS), IDS_FORMAT_AXIS, 0); FillCombo(GetDlgItem(IDC_COMBO_TYPE), IDS_FORMAT_TYPE, -1); m_bInited = TRUE; CComPtr<IDMGraphCtrl> spGraph; if(FAILED(GetGraphCtrl(&spGraph))) { return 0; } //Update controls UpdateControls(spGraph); return 0; }
// Function name : CDisplaySettingsDlg::OnInitDialog // Description : initialization of the dialog // Return type : BOOL BOOL CDisplaySettingsDlg::OnInitDialog() { CDialog::OnInitDialog(); m_strIniFile = __argv[0]; // get application name if( m_strIniFile.ReverseFind('.') >= 0 ) // strip the extenstion { m_strIniFile = m_strIniFile.Left( m_strIniFile.ReverseFind('.') ); } m_strIniFile += ".ini"; // and paste '.ini' EnumDisplays(); // enumerate the display modes FillCombo(); // fill the combo with the fetched modes LoadSettings(); // load the settings UpdateData(FALSE); // update vars with the loaded settings if( m_bDontAskAgain ) // did the user pressed 'don't ask again' the last time ? { OnOK(); // yup.. bail } return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
LRESULT CDlgPublishHtml::OnRefresh(WPARAM wParam, LPARAM lParam) { // Get the target path CWinFile::GetPathFromFileName( m_sMain, m_szPath ); // Get filename char fname[ CWF_STRSIZE ]; CWinFile::GetFileNameFromPath( m_sMain, fname ); // Get filename m_sFilename = CFG().GetSz( "Settings", "HtmlPubFilename" ); if ( m_sFilename.IsEmpty() ) m_sFilename = fname; // m_sFilename = fname; // Add a few choice filenames m_comboFilename.AddString( "Index.htm" ); m_comboFilename.AddString( fname ); if ( strcmpi( m_sFilename, fname ) && strcmpi( m_sFilename, "Index.htm" ) ) m_comboFilename.AddString( m_sFilename ); // Initialize folder m_sDir = CFG().GetSz( "Settings", "HtmlPubDir" ); UpdateData( FALSE ); FillCombo(); DoEnable(); return 1; }
void KSceneSceneEditorDialogAIGroup::SinkFunc2(INT nSinkID,INT nsubSinkID,DWORD dwValue,PVOID pPoint) { if(nSinkID==EVENTDOCLOGIGAL_UPDATEUI) { FillTree(); FillCombo(); } }
//##ModelId=474D306600BD void CGroupCombo::FillCombo() { ResetContent(); int nIndex = AddString(_T("--NONE--")); SetItemData(nIndex, 0); FillCombo(-1, 1); }
int CTDLFilterDateComboBox::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CTabbedComboBox::OnCreate(lpCreateStruct) == -1) return -1; FillCombo(); return 0; }
BOOL CPrintOptionsDlg::OnInitDialog() { CDialog::OnInitDialog(); FillCombo(); m_tModuleCombo.SetCurSel(0); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
BOOL CWzEmailPg2::OnInitDialog() { CDialog::OnInitDialog(); FillCombo(); OnRefresh( 0, 0L ); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
int CContentTypeComboBox::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CComboBox::OnCreate(lpCreateStruct) == -1) return -1; if (!m_pContentMgr) return -1; if (!GetCount()) FillCombo(); return 0; }
BOOL CDlgStackTrace::Refresh() {_STT(); InitColumns(); int sel = m_tabSource.GetCurSel(); CReg reg; switch( sel ) { #ifdef ENABLE_STACK_HISTORY case 1 : FillCombo( &m_regHistory ); FillList( &m_regHistory ); break; #endif #ifdef ENABLE_STACK_PROFILE case 2 : FillCombo( &m_regProfile ); FillList( &m_regProfile ); Sort( 1, FALSE ); break; #endif default : FillCombo( &m_regCallstack ); FillList( &m_regCallstack ); break; } // end switch return TRUE; }
LRESULT CWzEmailPg2::OnRefresh(WPARAM wParam, LPARAM lParam) { CRKey *pRk = (CRKey*)CWzFrame::GetData( GetSafeHwnd() ); if ( pRk == NULL ) return -1; m_bAuthDetect = pRk->GetDword( "AuthDetect", 1 ) != 0; m_bLogin = pRk->GetDword( "Login", 1 ) != 0; m_dwAuthType = pRk->GetDword( "AuthType" ); m_sUsername = pRk->GetSz( "Username" ); m_sPassword = pRk->GetSz( "Password" ); UpdateData( FALSE ); FillCombo(); DoEnable(); return 1; }
//##ModelId=474D306600CC void CGroupCombo::FillCombo(long lParentID, long lSpaces) { try { int nIndex; CString csSpaces; for(int i = 0; i < lSpaces; i++) { csSpaces += "---"; } //First time through if(lSpaces > 0) { csSpaces += " "; //ResetContent(); } lSpaces++; CppSQLite3Query q = theApp.m_db.execQueryEx(_T("SELECT lID, mText FROM Main WHERE bIsGroup = 1 AND lParentID = %d"), lParentID); if(q.eof() == false) { while(!q.eof()) { if(q.getIntField(_T("lID")) != m_lSkipGroupID) { nIndex = AddString(csSpaces + q.getStringField(_T("mText"))); SetItemData(nIndex, q.getIntField(_T("lID"))); FillCombo(q.getIntField(_T("lID")), lSpaces); } q.nextRow(); } } } CATCH_SQLITE_EXCEPTION }
void CProjEdit::RefreshDialog() { CComboBox *cb; int i; SetWindowText("Edit projectile: "+itemname); cb=(CComboBox *) GetDlgItem(IDC_SPARKCOLOUR); cb->ResetContent(); for(i=0;i<NUM_SPKCOL;i++) { cb->AddString(get_spark_colour(i) ); } cb=(CComboBox *) GetDlgItem(IDC_AIM); cb->ResetContent(); for(i=0;i<NUM_FVALUE;i++) { cb->AddString(proj_facing_desc[i]); } cb=(CComboBox *) GetDlgItem(IDC_SMOKETYPE); FillCombo("ANIMATE",cb,4); UpdateData(UD_DISPLAY); }
void CTDLFilterDateComboBox::PreSubclassWindow() { CTabbedComboBox::PreSubclassWindow(); FillCombo(); }
BOOL CProjExt::OnInitDialog() { CComboBox *cb1, *cb2; POSITION pos, pos2; CString tmpstr, tmp2; CString tmpstr1, tmpstr2; int i; CDialog::OnInitDialog(); cb1=(CComboBox *) GetDlgItem(IDC_CONESIZE); for(i=0;i<360;i+=30) { tmpstr=convert_degree(i); cb1->AddString(tmpstr); } cb1=(CComboBox *) GetDlgItem(IDC_TRIGGER); cb2=(CComboBox *) GetDlgItem(IDC_AREA); cb1->ResetContent(); cb2->ResetContent(); for(i=5;i<30;i+=5) { tmpstr=convert_radius(i,1); cb1->AddString(tmpstr); cb2->AddString(tmpstr); } for(i=30;i<100;i+=10) { tmpstr=convert_radius(i,1); cb1->AddString(tmpstr); cb2->AddString(tmpstr); } for(i=100;i<301;i+=50) { tmpstr=convert_radius(i,1); cb1->AddString(tmpstr); cb2->AddString(tmpstr); } cb1=(CComboBox *) GetDlgItem(IDC_FRAGMENT); FillCombo("ANIMATE",cb1,4); pos=pro_references.GetHeadPosition(); pos2=pro_titles.GetHeadPosition(); i=0; cb1=(CComboBox *) GetDlgItem(IDC_UNKNOWN14); //some projectile reference cb2=(CComboBox *) GetDlgItem(IDC_PROJECTILE); cb1->ResetContent(); cb2->ResetContent(); while(pos) { if(pos2) tmp2=pro_titles.GetNext(pos2); else tmp2.Format("???"); tmpstr1.Format("%s (%s)",tmp2,pro_references.GetNext(pos)); tmpstr.Format("%d-%s",i, tmpstr1); cb2->AddString(tmpstr); if(i) { tmpstr.Format("%d-%s",i-1, tmpstr1); cb1->AddString(tmpstr); } i++; } cb1=(CComboBox *) GetDlgItem(IDC_EXPLOSION); FillCombo("FIREBALL",cb1,2); //tooltips { m_tooltip.Create(this,TTS_NOPREFIX); m_tooltip.SetMaxTipWidth(200); m_tooltip.SetTipBkColor(RGB(240,224,160)); m_tooltip.AddTool(GetDlgItem(IDOK), IDS_CANCEL); } UpdateData(UD_DISPLAY); return TRUE; }
OptionsDialog::OptionsDialog(wxWindow *parent) : m_observationLogFolder(NULL) { // wxXmlResource::Get()->LoadDialog(this, parent, "Options"); wxXmlResource::Get()->LoadDialog(this, parent, "OptionsNew"); m_DeviceText = XRCCTRL(*this, "DEVICE_TEXT", wxStaticText); wxButton* m_buttonOk = XRCCTRL(*this, "ID_OK", wxButton); wxButton* m_buttonCancel = XRCCTRL(*this, "ID_CANCEL", wxButton); m_debugLogWindow = XRCCTRL(*this, "ID_DEBUG_LOG_WINDOW", wxCheckBox); m_observationLogFolder = XRCCTRL(*this, "ID_LOG_FOLDER", wxTextCtrl); m_cameraLockup = XRCCTRL(*this, "ID_LOCKUP", wxCheckBox); m_cameraPort = XRCCTRL(*this, "ID_COMPORT", wxChoice); m_cameraType = XRCCTRL(*this, "ID_CAMERA_TYPE", wxChoice); m_lockupDelay = XRCCTRL(*this, "ID_LOCKUPDELAY", wxSpinCtrl); m_frameDelay = XRCCTRL(*this, "ID_FRAMEDELAY", wxSpinCtrl); m_titleLockupDelay = XRCCTRL(*this, "IDT_LOCKUPDELAY", wxStaticText); m_isoSpeed = XRCCTRL(*this, "ID_ISOSPEED", wxChoice); m_batteryMinLevel = XRCCTRL(*this, "ID_BATTERY_MIN_LEVEL", wxSlider); m_telescopePort = XRCCTRL(*this, "ID_COMPORT_EQ6", wxChoice); m_telescopeType = XRCCTRL(*this, "ID_MOUNT_TYPE", wxChoice); m_stationLongitude = XRCCTRL(*this, "ID_LONGITUDE", wxTextCtrl); m_stationLatitude = XRCCTRL(*this, "ID_LATITUDE", wxTextCtrl); m_ComPorts = SerialPortEnumerator::Enumerate (); bool lockup = Properties::Instance().GetBool (CAMERA_LOCKUP); m_Telescopes = TelescopeFactory::Instance().EnumerateDrivers(); wxString defTelescope = Properties::Instance().Get(MOUNT_TYPE); wxArrayString telescopeNames; int defTelescopeIndex = 0; for (unsigned int j = 0; j < m_Telescopes.GetCount(); j++) { telescopeNames.Add (TelescopeFactory::Instance().GetDriverDisplayName(m_Telescopes[j])); if (defTelescope == m_Telescopes[j]) defTelescopeIndex = j; } m_Cameras = CameraFactory::Instance().EnumerateDrivers(); wxString defCamera = Properties::Instance().Get(CAMERA_TYPE); wxArrayString cameraNames; int defCameraIndex = 0; for (unsigned int j = 0; j < m_Cameras.GetCount(); j++) { cameraNames.Add (CameraFactory::Instance().GetDriverDisplayName(m_Cameras[j])); if (defCamera == m_Cameras[j]) defCameraIndex = j; } FillCombo (m_cameraType, cameraNames, defCameraIndex); DetermineCameraCapabilities (); FillPortCombo (m_cameraPort, m_ComPorts, Properties::Instance().Get(CAMERA_PORT), true); m_cameraLockup->SetValue (lockup); m_lockupDelay->SetValue (Properties::Instance().GetInt(CAMERA_LOCKUP_DELAY)); m_titleLockupDelay->Enable (lockup); m_lockupDelay->Enable (lockup); m_frameDelay->SetValue (Properties::Instance().GetInt (CAMERA_FRAME_DELAY)); FillCombo (m_telescopeType, telescopeNames, defTelescopeIndex); FillPortCombo (m_telescopePort, m_ComPorts, Properties::Instance().Get(MOUNT_PORT), false); m_isoSpeed->SetStringSelection (Properties::Instance().Get(CAMERA_ISO_SPEED)); m_isoSpeed->Enable (m_CameraCanSetIsoSpeed); m_stationLongitude->SetValue (Properties::Instance().Get(STATION_LONGITUDE)); m_stationLatitude->SetValue (Properties::Instance().Get(STATION_LATITUDE)); m_debugLogWindow->SetValue (Properties::Instance().GetBool(DEBUG_LOG_WINDOW)); m_observationLogFolder->SetValue (Properties::Instance().Get (OBSERVATION_LOG_FOLDER)); m_batteryMinLevel->SetValue (Properties::Instance().GetInt(CAMERA_BATTERY_MIN_LEVEL)); SetDeviceText (); }
LRESULT CALLBACK DlgProcPageLay(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { if (CommonDlgPageProcess(hwnd, msg, wParam, lParam)) { return TRUE; } if (msg == WM_INITDIALOG) { KeyToDlg(HotKey_ChangeLayoutCycle, IDC_EDIT_K1, hwnd); KeyToDlg(HotKey_ChangeSetLayout_1, IDC_EDIT_K2, hwnd); KeyToDlg(HotKey_ChangeSetLayout_2, IDC_EDIT_K3, hwnd); KeyToDlg(HotKey_ChangeSetLayout_3, IDC_EDIT_K4, hwnd); FillLayList(); FillCombo(hwnd, IDC_COMBO_K2, SettingsGui::SW_HKL_1); FillCombo(hwnd, IDC_COMBO_K3, SettingsGui::SW_HKL_2); FillCombo(hwnd, IDC_COMBO_K4, SettingsGui::SW_HKL_3); return FALSE; } else if (msg == WM_CTLCOLORSTATIC) { int id = GetDlgCtrlID((HWND)lParam); if (id == IDC_EDIT_K1 || id == IDC_EDIT_K2 || id == IDC_EDIT_K3 || id == IDC_EDIT_K4) return HandleCtlColor(hwnd, lParam, wParam); return TRUE; } else if (msg == WM_COMMAND) { if (HIWORD(wParam) == CBN_SELCHANGE) { int id = LOWORD(wParam); ComboChanged(hwnd, id); } else if (LOWORD(wParam) == IDC_BUTTON_K1) { ChangeHotKey(HotKey_ChangeLayoutCycle, IDC_EDIT_K1, hwnd); return TRUE; } else if (LOWORD(wParam) == IDC_BUTTON_K2) { if(ChangeHotKey(HotKey_ChangeSetLayout_1, IDC_EDIT_K2, hwnd)) { ComboChanged(hwnd, IDC_COMBO_K2); } return TRUE; } else if (LOWORD(wParam) == IDC_BUTTON_K3) { if(ChangeHotKey(HotKey_ChangeSetLayout_2, IDC_EDIT_K3, hwnd)) { ComboChanged(hwnd, IDC_COMBO_K3); } return TRUE; } else if (LOWORD(wParam) == IDC_BUTTON_K4) { if(ChangeHotKey(HotKey_ChangeSetLayout_3, IDC_EDIT_K4, hwnd)) { ComboChanged(hwnd, IDC_COMBO_K4); } return TRUE; } } return FALSE; }
void KSceneSceneEditorDialogAIGroup::OnTvnSelchangedTreeNpc(NMHDR *pNMHDR, LRESULT *pResult) { LPNMTREEVIEW pNMTreeView = reinterpret_cast<LPNMTREEVIEW>(pNMHDR); // TODO: Add your control notification handler code here *pResult = 0; HTREEITEM hItem = m_Tree.GetSelectedItem(); if(!hItem) return; int nImage = 0; m_Tree.GetItemImage(hItem,nImage,nImage); switch(nImage) { case 0: { m_Edit_GroupName.EnableWindow(TRUE); m_Edit_ArrayFile.EnableWindow(TRUE); m_Check_King.EnableWindow(FALSE); m_Combo_Way.EnableWindow(TRUE); m_Button_ArrayBrown.EnableWindow(TRUE); m_Button_ArrayClear.EnableWindow(TRUE); KSceneEditorDocLogical::AIGroup* pGroup = (KSceneEditorDocLogical::AIGroup*)(m_Tree.GetItemData(hItem)); m_Edit_GroupName.SetWindowText(pGroup->szName.c_str()); m_Edit_ArrayFile.SetWindowText(pGroup->szFileName.c_str()); FillCombo(); if(!pGroup->pWayPointSet) { m_Combo_Way.SetCurSel(-1); } else { int nCount = m_Combo_Way.GetCount(); for (int i=0;i<=nCount;i++) { KSceneEditorDocLogical::WayPointSet* pSet = (KSceneEditorDocLogical::WayPointSet*) m_Combo_Way.GetItemData(i); if(pSet==pGroup->pWayPointSet) { m_Combo_Way.SetCurSel(i); break; } } } } break; case 1: { m_Edit_GroupName.EnableWindow(FALSE); m_Edit_ArrayFile.EnableWindow(FALSE); m_Check_King.EnableWindow(TRUE); m_Combo_Way.EnableWindow(FALSE); m_Button_ArrayBrown.EnableWindow(FALSE); m_Button_ArrayClear.EnableWindow(FALSE); HTREEITEM hGroup = m_Tree.GetParentItem(hItem); KSceneEditorDocLogical::AIGroup* pGroup = (KSceneEditorDocLogical::AIGroup*)(m_Tree.GetItemData(hGroup)); KSceneEditorDocLogical::NPCInfo* pNpc = (KSceneEditorDocLogical::NPCInfo*)(m_Tree.GetItemData(hItem)); for (size_t i=0;i<pGroup->vecNpcInfo.size();i++) { if((pGroup->nKing==(int)i)&&(pNpc==pGroup->vecNpcInfo[i])) { m_Check_King.SetCheck(TRUE); } else { m_Check_King.SetCheck(FALSE); } } } break; default: break; } }