int CPropertiesWnd::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CDockablePane::OnCreate(lpCreateStruct) == -1) return -1; CRect rectDummy; rectDummy.SetRectEmpty(); // Create combo: const DWORD dwViewStyle = WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | WS_BORDER | CBS_SORT | WS_CLIPSIBLINGS | WS_CLIPCHILDREN; if (!m_wndObjectCombo.Create(dwViewStyle, rectDummy, this, 1)) { TRACE0("Failed to create Properties Combo \n"); return -1; // fail to create } m_wndObjectCombo.AddString(_T("Application")); m_wndObjectCombo.AddString(_T("Properties Window")); m_wndObjectCombo.SetCurSel(0); if (!m_wndPropList.Create(WS_VISIBLE | WS_CHILD, rectDummy, this, 2)) { TRACE0("Failed to create Properties Grid \n"); return -1; // fail to create } InitPropList(); m_wndToolBar.Create(this, AFX_DEFAULT_TOOLBAR_STYLE, IDR_PROPERTIES); m_wndToolBar.LoadToolBar(IDR_PROPERTIES, 0, 0, TRUE /* Is locked */); m_wndToolBar.CleanUpLockedImages(); m_wndToolBar.LoadBitmap(theApp.m_bHiColorIcons ? IDB_PROPERTIES_HC : IDR_PROPERTIES, 0, 0, TRUE /* Locked */); m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() | CBRS_TOOLTIPS | CBRS_FLYBY); m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() & ~(CBRS_GRIPPER | CBRS_SIZE_DYNAMIC | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT)); m_wndToolBar.SetOwner(this); // All commands will be routed via this control , not via the parent frame: m_wndToolBar.SetRouteCommandsViaFrame(FALSE); AdjustLayout(); return 0; }
int CPropertiesWnd::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CDockablePane::OnCreate(lpCreateStruct) == -1) return -1; CRect rectDummy; rectDummy.SetRectEmpty(); // 创建组合: const DWORD dwViewStyle = WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | WS_BORDER | CBS_SORT | WS_CLIPSIBLINGS | WS_CLIPCHILDREN; if (!m_wndObjectCombo.Create(dwViewStyle, rectDummy, this, 1)) { TRACE0("未能创建属性组合 \n"); return -1; // 未能创建 } m_wndObjectCombo.AddString(_T("应用程序")); m_wndObjectCombo.AddString(_T("属性窗口")); m_wndObjectCombo.SetCurSel(0); if (!m_wndPropList.Create(WS_VISIBLE | WS_CHILD, rectDummy, this, 2)) { TRACE0("未能创建属性网格\n"); return -1; // 未能创建 } InitPropList(); m_wndToolBar.Create(this, AFX_DEFAULT_TOOLBAR_STYLE, IDR_PROPERTIES); m_wndToolBar.LoadToolBar(IDR_PROPERTIES, 0, 0, TRUE /* 已锁定*/); m_wndToolBar.CleanUpLockedImages(); m_wndToolBar.LoadBitmap(theApp.m_bHiColorIcons ? IDB_PROPERTIES_HC : IDR_PROPERTIES, 0, 0, TRUE /* 锁定*/); m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() | CBRS_TOOLTIPS | CBRS_FLYBY); m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() & ~(CBRS_GRIPPER | CBRS_SIZE_DYNAMIC | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT)); m_wndToolBar.SetOwner(this); // 所有命令将通过此控件路由,而不是通过主框架路由: m_wndToolBar.SetRouteCommandsViaFrame(FALSE); AdjustLayout(); return 0; }
int COptimizeWallWnd::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CDockablePane::OnCreate(lpCreateStruct) == -1) return -1; CRect rectDummy; rectDummy.SetRectEmpty(); if (!m_wndPropList.Create(WS_VISIBLE | WS_CHILD, rectDummy, this, IDC_OPTIMIZE_PROPERTY_CTRL)) { TRACE0("Failed to create Properties Grid \n"); return -1; // fail to create } InitPropList(); AdjustLayout(); return 0; }
int Git05_CBCGPPropBar::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CBCGPDockingControlBar::OnCreate(lpCreateStruct) == -1) return -1; CRect rectDummy; rectDummy.SetRectEmpty (); if (!m_wndPropList.Create (WS_VISIBLE | WS_CHILD, rectDummy, this, 1)) { TRACE0("Failed to create Properies Grid \n"); return -1; // fail to create } InitPropList (); AdjustLayout (); return 0; }
int CLeftViewBarSensorBottom::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CBCGPDockingControlBar::OnCreate(lpCreateStruct) == -1) return -1; RemoveCaptionButtons(); // µÃµ½ÏÖ³¡Êý¾ÝºÍ²âÏßÉèÖÃÊý¾Ý //CMainFrame* pMainFrame = NULL; //pMainFrame = (CMainFrame*)AfxGetMainWnd(); //m_pSiteData = &pMainFrame->m_oSiteData; CRect oRect; oRect.SetRectEmpty(); // Éú³ÉÊôÐÔ±í m_wndPropList.Create (WS_CHILD, oRect, this, 1); SetPropListFont(); InitPropList(); return 0; }
int CPropertyGridPane::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CDockablePane::OnCreate(lpCreateStruct) == -1) return -1; CRect rectDummy; rectDummy.SetRectEmpty(); HWND hPropertyGrid = New_PropertyGrid(this->GetSafeHwnd(), (DWORD)2/*?*/); if (!m_wndPropGrid.Attach(hPropertyGrid)) { TRACE0("Failed to create Properties Grid \n"); return -1; // fail to create } AdjustLayout(); InitPropList(); m_wndPropGrid.ShowWindow(TRUE); return 0; }
int CLeftViewBarInstrumentBottom::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CMyBCGPDockingControlBar::OnCreate(lpCreateStruct) == -1) return -1; RemoveCaptionButtons(); CRect oRect; oRect.SetRectEmpty(); // 生成属性表 m_wndPropList.Create (WS_CHILD, oRect, this, 1); SetPropListFont(); InitPropList(); // 生成迂回道图形视图 BOOL bData = m_wndDetourGraphView.Create("DetourGraphView", WS_CHILD, oRect, this, 2); // 生成迂回道图形视图滚动条*/ m_wndDetourScrollBar.Create (WS_CHILD | SBS_HORZ, oRect, this, 3); return 0; }
BOOL CSetPageBase::OnInitDialog() { CBCGPPropertyPage::OnInitDialog(); CString strTemp; BOOL bNameVaild = strTemp.LoadString(IDS_STR_VIEWFORMATTER); ASSERT(bNameVaild); SetDlgItemText(IDC_STATIC_VIEWFORMATTER, strTemp); bNameVaild = strTemp.LoadString(IDS_STR_OPTIONFORMATTER); ASSERT(bNameVaild); SetDlgItemText(IDC_STATIC_OPTIONFORMATTER, strTemp); GetDlgItem(IDC_EDIT_VIEWFORMATTER)->SetFont(&g_GlobalUtils.m_fontWidth); CRect rectPropList; GetDlgItem(IDC_PROPLIST_LOCATION)->GetClientRect(&rectPropList); GetDlgItem(IDC_PROPLIST_LOCATION)->MapWindowPoints(this, &rectPropList); GetDlgItem(IDC_PROPLIST_LOCATION)->ShowWindow(SW_HIDE); m_wndPropList.Create(WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER, rectPropList, this, (UINT)-1); m_wndPropList.SetPreviewWnd(GetDlgItem(IDC_EDIT_VIEWFORMATTER)); m_wndPropList.EnableHeaderCtrl(FALSE); m_wndPropList.EnableDesciptionArea(FALSE); m_wndPropList.SetVSDotNetLook(TRUE); m_wndPropList.MarkModifiedProperties(TRUE); m_wndPropList.SetNameAlign(DT_LEFT); m_wndPropList.SetAlphabeticMode(FALSE); m_wndPropList.SetShowDragContext(FALSE); m_wndPropList.EnableToolBar(TRUE); m_wndPropList.EnableSearchBox(TRUE); InitPropList(); InitTidyConfig(); return TRUE; // return TRUE unless you set the focus to a control // 异常: OCX 属性页应返回 FALSE }
void COptionWnd::ResetAllOption() { m_wndPropList.RemoveAll(); InitPropList(); }
int CLegoBrickPropertiesWnd::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CDockablePane::OnCreate(lpCreateStruct) == -1) return -1; // TODO: 在此加入特別建立的程式碼 CRect rectDummy; rectDummy.SetRectEmpty(); pGroup = NULL; pPropType = NULL; pPropColor = NULL; pPropNum = NULL; // StringMapping Init strmap[0].bt = NOTYPE; strmap[0].str = _T("no type"); strmap[1].bt = ONE_BY_ONE; strmap[1].str = _T("1x1"); strmap[2].bt = ONE_BY_TWO; strmap[2].str = _T("1x2"); strmap[3].bt = ONE_BY_THREE; strmap[3].str = _T("1x3"); strmap[4].bt = ONE_BY_FOUR; strmap[4].str = _T("1x4"); strmap[5].bt = ONE_BY_FIVE; strmap[5].str = _T("1x5"); strmap[6].bt = ONE_BY_SIX; strmap[6].str = _T("1x6"); strmap[7].bt = ONE_BY_SEVEN; strmap[7].str = _T("1x7"); strmap[8].bt = ONE_BY_EIGHT; strmap[8].str = _T("1x8"); strmap[9].bt = ONE_BY_NINE; strmap[9].str = _T("1x9"); strmap[10].bt = ONE_BY_TEN; strmap[10].str = _T("1x10"); strmap[11].bt = ONE_BY_ELEVEN; strmap[11].str = _T("1x11"); strmap[12].bt = ONE_BY_TWELVE; strmap[12].str = _T("1x12"); strmap[13].bt = TWO_BY_TWO; strmap[13].str = _T("2x2"); strmap[14].bt = TWO_BY_THREE; strmap[14].str = _T("2x3"); strmap[15].bt = TWO_BY_FOUR; strmap[15].str = _T("2x4"); strmap[16].bt = TWO_BY_FIVE; strmap[16].str = _T("2x5"); strmap[17].bt = TWO_BY_SIX; strmap[17].str = _T("2x6"); strmap[18].bt = TWO_BY_SEVEN; strmap[18].str = _T("2x7"); strmap[19].bt = TWO_BY_EIGHT; strmap[19].str = _T("2x8"); strmap[20].bt = TWO_BY_NINE; strmap[20].str = _T("2x9"); strmap[21].bt = TWO_BY_TEN; strmap[21].str = _T("2x10"); strmap[22].bt = TWO_BY_ELEVEN; strmap[22].str = _T("2x11"); strmap[23].bt = TWO_BY_TWELVE; strmap[23].str = _T("2x12"); if (!m_wndPropList.Create(WS_VISIBLE | WS_CHILD, rectDummy, this, 4 /*The ID of the child window 我遀便給的*/)) { TRACE0("無法建立 [LegoBrickPropertiesWnd] 方格\n"); return -1; // 無法建立 } InitPropList(); m_wndToolBar.Create(this, AFX_DEFAULT_TOOLBAR_STYLE, IDR_LEGOPROPERTIES); // m_wndToolBar.LoadToolBar(IDR_LEGOPROPERTIES, 0, 0, TRUE /* 已鎖定 */); // m_wndToolBar.CleanUpLockedImages(); // m_wndToolBar.LoadBitmap(/*theApp.m_bHiColorIcons ? IDB_PROPERTIES_HC : */IDR_LEGOPROPERTIES, 0, 0, TRUE /* 鎖定 */); // m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() | CBRS_TOOLTIPS | CBRS_FLYBY); // m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() & ~(CBRS_GRIPPER | CBRS_SIZE_DYNAMIC | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT)); // m_wndToolBar.SetOwner(this); // 所有命令都將經由此控制項傳送,而不是經由父框架: // m_wndToolBar.SetRouteCommandsViaFrame(FALSE); AdjustLayout(); return 0; }