Ejemplo n.º 1
0
void CMainFrame::OnCategorie(UINT nID)
{
	if (m_nCategorie != -1)
	{
		ShowPane (&m_wndLinksBars[m_nCategorie], FALSE, TRUE, FALSE);
	}

	m_nCategorie = nID - ID_CATEGORIE_1;

	ShowPane (&m_wndLinksBars[m_nCategorie], TRUE, FALSE, FALSE);
}
Ejemplo n.º 2
0
void CMainFrame::OnViewCaptionBar() 
{
	ShowPane (&m_wndCaptionBar,
					!(m_wndCaptionBar.IsVisible ()),
					FALSE, TRUE);
	RecalcLayout ();
}
Ejemplo n.º 3
0
void CMainFrame::OnViewOutlookBar() 
{
	ShowPane (&m_wndShortcutsBar,
					!(m_wndShortcutsBar.IsVisible ()),
					FALSE, TRUE);
	RecalcLayout ();
}
Ejemplo n.º 4
0
void CMainFrame::OnViewThemeToolbar() 
{
	ShowPane (&m_wndToolBarTheme,
					!(m_wndToolBarTheme.IsVisible ()),
					FALSE, TRUE);
	RecalcLayout ();
}
Ejemplo n.º 5
0
void CMainFrame::OnViewFolders() 
{
	ShowPane (&m_wndFoldersBar,
					!(m_wndFoldersBar.GetStyle () & WS_VISIBLE),
					FALSE,TRUE);
	RecalcLayout ();
}
Ejemplo n.º 6
0
void CMainFrame::OnMeasHT()
{
	m_ShowGPS_HTMEAS = !m_ShowGPS_HTMEAS;
	ShowPane(&m_wndGPS_HTMEAS, m_ShowGPS_HTMEAS, FALSE, TRUE); 
	if (!m_ShowGPS_HTMEAS) RecalcLayout();
	m_wndClientArea.Invalidate();
}
Ejemplo n.º 7
0
void CMainFrame::OnViewWorkspace2() 
{
	ShowPane (&m_wndWorkSpace2,
					!(m_wndWorkSpace2.IsVisible ()),
					FALSE, TRUE);
	RecalcLayout ();
}
Ejemplo n.º 8
0
void CMainFrame::OnMeasProtons()
{
	m_ShowISOLDE_PROTONS = !m_ShowISOLDE_PROTONS;
	ShowPane(&m_wndISOLDE_PROTONS, m_ShowISOLDE_PROTONS, FALSE, TRUE); 
	if (!m_ShowISOLDE_PROTONS) RecalcLayout();
	m_wndClientArea.Invalidate();
}
Ejemplo n.º 9
0
void CEGPaneBar::ToggleVisible() {
	if ( IsVisible() ) {
		HidePane();
	} else {
		ShowPane();
	}
}
Ejemplo n.º 10
0
void CMainFrame::OnViewOutput() 
{
	ShowPane (&m_wndOutput,
					!(m_wndOutput.IsVisible ()),
					FALSE, TRUE);
	RecalcLayout ();
}
Ejemplo n.º 11
0
void CMainFrame::OnViewMyWorkspace() 
{
	TRACE("CMainFrame::OnViewMyWorkspace");

	ShowPane (&m_wndWorkSpace2,
					!(m_wndWorkSpace2.IsVisible ()),
					FALSE, TRUE);
	RecalcLayout ();
}
Ejemplo n.º 12
0
void CGenDockablePane::ShowAndUnroll()
{
	if (!IsWindowVisible())
		ShowPane(TRUE, FALSE, TRUE);

	CPaneFrameWnd * pFrm;
	if ((pFrm = DYNAMIC_DOWNCAST(CPaneFrameWnd, GetParentMiniFrame())) != NULL)
	{
		((CGenPaneFrameWnd *)pFrm)->Unroll();
	}

	SetFocus();
}
Ejemplo n.º 13
0
void xRenderSettingPane::_Create(Event * sender)
{
	CFrameWndEx * frame = (CFrameWndEx *)sender->GetParam(0);

	if (!Create("Render Setting", frame, CRect(0, 0, 200, 200), TRUE, IDD_RenderSetting, 
		WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_RIGHT | CBRS_FLOAT_MULTI))
	{
		TRACE0("Can't create \"Render Setting Pane\"\n");
		return ;
	}

	EnableDocking(CBRS_ALIGN_ANY);
	frame->DockPane(this);

	ShowPane(FALSE, FALSE, TRUE);
}
Ejemplo n.º 14
0
wxExSTC* Frame::OpenFile(
  const wxExFileName& filename,
  int line_number,
  const std::string& match,
  int col_number,
  wxExSTCWindowFlags flags,
  const std::string& command)
{
  if (m_Query->Open(
    filename, line_number, match, col_number, flags, command))
  {
    ShowPane("QUERY");
  }
  
  return m_Query;
}
Ejemplo n.º 15
0
void wxGISApplicationEx::ShowApplicationWindow(wxWindow* pWnd, bool bShow)
{
	ShowPane(pWnd, bShow);
}
Ejemplo n.º 16
0
Frame::Frame()
  : wxExFrameWithHistory(nullptr, wxID_ANY, wxTheApp->GetAppDisplayName())
  , m_Results(new wxExGrid(this))
  , m_Query(new wxExSTC(this))
  , m_Shell(new wxExShell(this, "", ";", true, 50))
{
  SetIcon(wxICON(app));

  wxExMenu* menuFile = new wxExMenu;
  menuFile->Append(wxID_NEW);
  menuFile->Append(wxID_OPEN);
  GetFileHistory().UseMenu(ID_RECENTFILE_MENU, menuFile);
  menuFile->AppendSeparator();
  menuFile->Append(wxID_SAVE);
  menuFile->Append(wxID_SAVEAS);
  menuFile->AppendSeparator();
  menuFile->Append(wxID_EXIT);

  wxExMenu* menuDatabase = new wxExMenu;
  menuDatabase->Append(ID_DATABASE_OPEN, wxExEllipsed(_("&Open")));
  menuDatabase->Append(ID_DATABASE_CLOSE, _("&Close"));

  wxExMenu* menuQuery = new wxExMenu;
  menuQuery->Append(wxID_EXECUTE);
  menuQuery->Append(wxID_STOP);

  wxMenu* menuOptions = new wxMenu();
  menuOptions->Append(wxID_PREFERENCES);

  wxExMenu* menuView = new wxExMenu();
  AppendPanes(menuView);
  menuView->AppendSeparator();
  menuView->AppendCheckItem(ID_VIEW_QUERY, _("Query"));
  menuView->AppendCheckItem(ID_VIEW_RESULTS, _("Results"));
  menuView->AppendCheckItem(ID_VIEW_STATISTICS, _("Statistics"));

  wxMenu* menuHelp = new wxMenu();
  menuHelp->Append(wxID_ABOUT);

  wxMenuBar *menubar = new wxMenuBar;
  menubar->Append(menuFile, wxGetStockLabel(wxID_FILE));
  menubar->Append(menuView, _("&View"));
  menubar->Append(menuDatabase, _("&Connection"));
  menubar->Append(menuQuery, _("&Query"));
  menubar->Append(menuOptions, _("&Options"));
  menubar->Append(menuHelp, wxGetStockLabel(wxID_HELP));
  SetMenuBar(menubar);

  m_Results->CreateGrid(0, 0);
  m_Results->EnableEditing(false); // this is a read-only grid

  m_Shell->SetFocus();

#if wxUSE_STATUSBAR
  SetupStatusBar(std::vector<wxExStatusBarPane>{
    wxExStatusBarPane(),
    wxExStatusBarPane("PaneInfo", 100, _("Lines"))});
#endif

  GetToolBar()->AddControls(false); // no realize yet
  GetToolBar()->AddTool(wxID_EXECUTE, 
    wxEmptyString,
    wxArtProvider::GetBitmap(
      wxART_GO_FORWARD, wxART_TOOLBAR, GetToolBar()->GetToolBitmapSize()),
    wxGetStockLabel(wxID_EXECUTE, wxSTOCK_NOFLAGS));
  GetToolBar()->Realize();

  GetManager().AddPane(m_Shell,
    wxAuiPaneInfo().
      Name("CONSOLE").
      CenterPane());

  GetManager().AddPane(m_Results,
    wxAuiPaneInfo().
      Name("RESULTS").
      Caption(_("Results")).
      CloseButton(true).
      Bottom().
      MaximizeButton(true));

  GetManager().AddPane(m_Query,
    wxAuiPaneInfo().
      Name("QUERY").
      Caption(_("Query")).
      CloseButton(true).
      MaximizeButton(true));

  GetManager().AddPane(m_Statistics.Show(this),
    wxAuiPaneInfo().Left().
      Hide().
      MaximizeButton(true).
      Caption(_("Statistics")).
      Name("STATISTICS"));

  GetManager().LoadPerspective(wxConfigBase::Get()->Read("Perspective"));
  GetManager().GetPane("QUERY").Show(false);

  GetManager().Update();
  
  Bind(wxEVT_CLOSE_WINDOW, [=](wxCloseEvent& event) {
    if (wxExFileDialog(this,
      &m_Query->GetFile()).ShowModalIfChanged()  != wxID_CANCEL)
    {
      wxConfigBase::Get()->Write("Perspective", GetManager().SavePerspective());
      event.Skip();
    }});
    
  Bind(wxEVT_MENU, [=](wxCommandEvent& event) {
    wxAboutDialogInfo info;
    info.SetIcon(GetIcon());
    info.SetDescription(_("This program offers a general ODBC query."));
    info.SetVersion(wxExGetVersionInfo().GetVersionOnlyString());
    info.SetCopyright(wxExGetVersionInfo().GetCopyright());
    info.AddDeveloper(wxExOTL::VersionInfo().GetVersionString());
    wxAboutBox(info);
    }, wxID_ABOUT);

  Bind(wxEVT_MENU, [=](wxCommandEvent& event) {
    m_Stopped = false;
    if (m_Query->GetText().empty()) return;
    if (m_Results->IsShown())
    {
      m_Results->ClearGrid();
    }
    // Skip sql comments.
    std::regex re("--.*$");
    wxString output = std::regex_replace(m_Query->GetText().ToStdString(), re, "", std::regex_constants::format_sed);
    // Queries are seperated by ; character.
    wxStringTokenizer tkz(output, ";");
    int no_queries = 0;
    m_Running = true;
    const auto start = std::chrono::system_clock::now();
    // Run all queries.
    while (tkz.HasMoreTokens() && !m_Stopped)
    {
      wxString query = tkz.GetNextToken();
      query.Trim(true);
      query.Trim(false);
      if (!query.empty())
      {
        try
        {
          RunQuery(query, no_queries == 0);
          no_queries++;
        }
        catch (otl_exception& p)
        {
          m_Statistics.Inc(_("Number of query errors"));
          m_Shell->AppendText(
            _("\nerror: ") +  wxString(wxExQuoted(p.msg)) + 
            _(" in: ") + wxString(wxExQuoted(query)));
        }
      }
    }
    const auto end = std::chrono::system_clock::now();
    const auto elapsed = end - start;
    const auto milli = std::chrono::duration_cast<std::chrono::milliseconds>(elapsed);
    m_Shell->Prompt(wxString::Format(_("\n%d queries (%.3f seconds)"),
      no_queries,
      (float)milli.count() / (float)1000).ToStdString());
    m_Running = false;}, wxID_EXECUTE);

  Bind(wxEVT_MENU, [=](wxCommandEvent& event) {
    Close(true);}, wxID_EXIT);

  Bind(wxEVT_MENU, [=](wxCommandEvent& event) {
    m_Query->GetFile().FileNew(wxExFileName());
    m_Query->SetFocus();
    ShowPane("QUERY");}, wxID_NEW);

  Bind(wxEVT_MENU, [=](wxCommandEvent& event) {
    wxExOpenFilesDialog(
      this, 
      wxFD_OPEN | wxFD_CHANGE_DIR, 
      "sql files (*.sql)|*.sql|" + 
      _("All Files") + wxString::Format(" (%s)|%s",
        wxFileSelectorDefaultWildcardStr,
        wxFileSelectorDefaultWildcardStr),
      true);}, wxID_OPEN);

  Bind(wxEVT_MENU, [=](wxCommandEvent& event) {
    m_Query->GetFile().FileSave();}, wxID_SAVE);

  Bind(wxEVT_MENU, [=](wxCommandEvent& event) {
    wxExFileDialog dlg(
      this, 
      &m_Query->GetFile(), 
      wxGetStockLabel(wxID_SAVEAS), 
      wxFileSelectorDefaultWildcardStr, 
      wxFD_SAVE);
    if (dlg.ShowModal() == wxID_OK)
    {
       m_Query->GetFile().FileSave(dlg.GetPath().ToStdString());
    }}, wxID_SAVEAS);

  Bind(wxEVT_MENU, [=](wxCommandEvent& event) {
    m_Running = false;
    m_Stopped = true;}, wxID_STOP);

  Bind(wxEVT_MENU, [=](wxCommandEvent& event) {
    if (m_otl.Logoff())
    {
      m_Shell->SetPrompt(">");
    }}, ID_DATABASE_CLOSE);

  Bind(wxEVT_MENU, [=](wxCommandEvent& event) {
    if (m_otl.Logon(this))
    {
      m_Shell->SetPrompt(m_otl.Datasource().ToStdString() + ">");
    }}, ID_DATABASE_OPEN);

  Bind(wxEVT_MENU, [=](wxCommandEvent& event) {
    if (m_otl.IsConnected())
    {
      try
      {
        const wxString input(event.GetString());
        if (!input.empty())
        {
          const wxString query = input.substr(
            0,
            input.length() - 1);

          m_Stopped = false;
          RunQuery(query, true);
        }
      }
      catch (otl_exception& p)
      {
        if (m_Results->IsShown())
        {
          m_Results->EndBatch();
        }
        m_Shell->AppendText(_("\nerror: ") + wxString(wxExQuoted(p.msg)));
      }
    }
    else
    {
      m_Shell->AppendText(_("\nnot connected"));
    }
    m_Shell->Prompt();}, ID_SHELL_COMMAND);

  Bind(wxEVT_MENU, [=](wxCommandEvent& event) {
    m_Stopped = true;
    m_Shell->Prompt("cancelled");}, ID_SHELL_COMMAND_STOP);

  Bind(wxEVT_MENU, [=](wxCommandEvent& event) {
    TogglePane("QUERY");}, ID_VIEW_QUERY);
  Bind(wxEVT_MENU, [=](wxCommandEvent& event) {
    TogglePane("RESULTS");}, ID_VIEW_RESULTS);
  Bind(wxEVT_MENU, [=](wxCommandEvent& event) {
    TogglePane("STATISTICS");}, ID_VIEW_STATISTICS);
  
  Bind(wxEVT_UPDATE_UI, [=](wxUpdateUIEvent& event) {
    event.Enable(m_Query->GetModify());}, wxID_SAVE);
  Bind(wxEVT_UPDATE_UI, [=](wxUpdateUIEvent& event) {
    event.Enable(m_Query->GetLength() > 0);}, wxID_SAVEAS);
  Bind(wxEVT_UPDATE_UI, [=](wxUpdateUIEvent& event) {
    event.Enable(m_Running);}, wxID_STOP);
  Bind(wxEVT_UPDATE_UI, [=](wxUpdateUIEvent& event) {
    event.Enable(m_otl.IsConnected());}, ID_DATABASE_CLOSE);
  Bind(wxEVT_UPDATE_UI, [=](wxUpdateUIEvent& event) {
    event.Enable(!m_otl.IsConnected());}, ID_DATABASE_OPEN);
  Bind(wxEVT_UPDATE_UI, [=](wxUpdateUIEvent& event) {
    // If we have a query, you can hide it, but still run it.
    event.Enable(m_Query->GetLength() > 0 && m_otl.IsConnected());}, wxID_EXECUTE);
  Bind(wxEVT_UPDATE_UI, [=](wxUpdateUIEvent& event) {
    event.Enable(!GetFileHistory().GetHistoryFile().empty());}, ID_RECENTFILE_MENU);
  Bind(wxEVT_UPDATE_UI, [=](wxUpdateUIEvent& event) {
    event.Check(GetManager().GetPane("QUERY").IsShown());}, ID_VIEW_QUERY);
  Bind(wxEVT_UPDATE_UI, [=](wxUpdateUIEvent& event) {
    event.Check(GetManager().GetPane("RESULTS").IsShown());}, ID_VIEW_RESULTS);
  Bind(wxEVT_UPDATE_UI, [=](wxUpdateUIEvent& event) {
    event.Check(GetManager().GetPane("STATISTICS").IsShown());}, ID_VIEW_STATISTICS);
  
  // Do automatic connect.
  if (!m_otl.Datasource().empty() && m_otl.Logon())
  {
    m_Shell->SetPrompt(m_otl.Datasource().ToStdString() + ">");
  }
  else
  {
    m_Shell->SetPrompt(">");
  }
}
Ejemplo n.º 17
0
void CMainFrame::OnViewControls()
{
	ShowPane(&m_wndClassView,TRUE,TRUE,TRUE);
}
Ejemplo n.º 18
0
void CMainFrame::OnViewToolsBox()
{
	ShowPane(&m_wndToolBox, TRUE, TRUE, TRUE);
}
Ejemplo n.º 19
0
void CMainFrame::OnViewResource()
{
	ShowPane(&m_wndResourceView, TRUE, TRUE, TRUE);
}
Ejemplo n.º 20
0
void CMainFrame::OnViewProject()
{
	ShowPane(&m_wndFileView, TRUE, TRUE, TRUE);
}
Ejemplo n.º 21
0
void CMainFrame::OnViewProperty()
{
	ShowPane(&m_wndProperties, TRUE, TRUE, TRUE);
}
Ejemplo n.º 22
0
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
		return -1;

	ModifyStyle (WS_CAPTION | FWS_ADDTOTITLE, 0);
	ModifyStyleEx (WS_EX_CLIENTEDGE, 0);

	CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMSMVisualManager));

	//---------------------------------
	// Set toolbar and menu image size:
	//---------------------------------
	CMFCToolBarButton::m_bWrapText = FALSE;
	CMFCToolBar::SetMenuSizes (CSize (22, 22), CSize (16, 16));

	CMFCToolBarComboBoxButton::SetFlatMode ();
	CMFCToolBarComboBoxButton::SetCenterVert ();

	if (!m_wndCaptionBar.Create(this, IDR_MAINFRAME))
	{
		TRACE0("Failed to create captionbar\n");
		return -1;
	}

	if (afxGlobalData.fontRegular.GetSafeHandle () != NULL)
	{
		LOGFONT lf;
		ZeroMemory (&lf, sizeof (LOGFONT));
		afxGlobalData.fontRegular.GetLogFont (&lf);

		m_wndCaptionBar.SetCaptionFont (lf);
	}

	if (!m_wndMenuBar.Create (this, AFX_DEFAULT_TOOLBAR_STYLE))
	{
		TRACE0("Failed to create menubar\n");
		return -1;      // fail to create
	}

	EnableDocking(CBRS_ALIGN_ANY);

	DockPane(&m_wndMenuBar);

	CClientDC dc (this);
	m_bIsHighColor = dc.GetDeviceCaps (BITSPIXEL) > 16;

	UINT uiToolbarHotID  = m_bIsHighColor ? IDB_HOTTOOLBAR : 0;
	UINT uiToolbarColdID = m_bIsHighColor ? IDB_COLDTOOLBAR : 0;
	UINT uiToolbarDisID  = m_bIsHighColor ? IDB_DISABLEDTOOLBAR : 0;
	UINT uiToolbarPresID = m_bIsHighColor ? IDB_PRESSEDTOOLBAR : 0;
	UINT uiMenuID        = m_bIsHighColor ? IDB_MENU_IMAGES : IDB_MENU_IMAGES_16;

	if (!m_wndToolBar.CreateEx (this, TBSTYLE_FLAT,
		                        CBRS_SIZE_FIXED | AFX_DEFAULT_TOOLBAR_STYLE) ||
		!m_wndToolBar.LoadToolBar (IDR_MAINFRAME, uiToolbarColdID, uiMenuID, 
			FALSE /* Not locked */, uiToolbarDisID, 0, uiToolbarHotID, uiToolbarPresID))
	{
		TRACE0("Failed to create toolbar\n");
		return -1;      // fail to create
	}

	m_wndToolBar.InsertButton 
		(CMFCToolBarComboBoxButton (ID_GO_ADDRESS_EDIT, 0), 3);

	DockPane (&m_wndToolBar);

	if (!m_wndCategoryBar.CreateEx (this, TBSTYLE_FLAT, 
		                      CBRS_SIZE_FIXED | AFX_DEFAULT_TOOLBAR_STYLE, 
							  CRect (1, 1, 1, 1), AFX_IDW_TOOLBAR + 3))
	{
		TRACE0("Failed to create categoriebar\n");
		return -1;      // fail to create
	}

	DockPane (&m_wndCategoryBar);

	for (long i = 0; i < 8; i++)
	{
		if (!m_wndLinksBars[i].CreateEx (this, TBSTYLE_FLAT, 
								  CBRS_SIZE_FIXED | AFX_DEFAULT_TOOLBAR_STYLE, 
								  CRect (1, 1, 1, 1), AFX_IDW_TOOLBAR + 4 + i))
		{
			TRACE0("Failed to create linksbar\n");
			return -1;      // fail to create
		}

		DockPane (&m_wndLinksBars[i]);
		ShowPane (&m_wndLinksBars[i], FALSE, FALSE, FALSE);
	}

	m_wndLinksBars[0].InsertButton (CMSMLinksBarButton (_T("My Money"), ID_LINKS_HOME_1));
	m_wndLinksBars[0].InsertButton (CMSMLinksBarButton (_T("MSN Money News"), ID_LINKS_HOME_2));
	m_wndLinksBars[0].SetCurrentCommand (ID_LINKS_HOME_1);

	m_wndLinksBars[1].InsertButton (CMSMLinksBarButton (_T("Account List"), ID_LINKS_BANKING_1));
	m_wndLinksBars[1].InsertButton (CMSMLinksBarButton (_T("Account Tools"), ID_LINKS_BANKING_2));
	m_wndLinksBars[1].InsertButton (CMSMLinksBarButton (_T("Mortgages && Loans"), ID_LINKS_BANKING_3));
	m_wndLinksBars[1].InsertButton (CMSMLinksBarButton (_T("Bank Services"), ID_LINKS_BANKING_4));
	m_wndLinksBars[1].InsertButton (CMSMLinksBarButton (_T("Credit Center"), ID_LINKS_BANKING_5));
	m_wndLinksBars[1].SetCurrentCommand (ID_LINKS_BANKING_1);

	m_wndLinksBars[2].InsertButton (CMSMLinksBarButton (_T("Bills Summary"), ID_LINKS_BILLS_1));
	m_wndLinksBars[2].InsertButton (CMSMLinksBarButton (_T("Bill Calendar"), ID_LINKS_BILLS_2));
	m_wndLinksBars[2].InsertButton (CMSMLinksBarButton (_T("Transfer Money"), ID_LINKS_BILLS_3));
	m_wndLinksBars[2].InsertButton (CMSMLinksBarButton (_T("MSN Bill Pay Online"), ID_LINKS_BILLS_4));
	m_wndLinksBars[2].InsertButton (CMSMLinksBarButton (_T("History"), ID_LINKS_BILLS_5));
	m_wndLinksBars[2].SetCurrentCommand (ID_LINKS_BILLS_1);

	m_wndLinksBars[3].InsertButton (CMSMLinksBarButton (_T("Reports Home"), ID_LINKS_REPORTS_1));
	m_wndLinksBars[3].InsertButton (CMSMLinksBarButton (_T("Favorite Reports"), ID_LINKS_REPORTS_2));
	m_wndLinksBars[3].InsertButton (CMSMLinksBarButton (_T("Monthly Reports"), ID_LINKS_REPORTS_3));
	m_wndLinksBars[3].SetCurrentCommand (ID_LINKS_REPORTS_1);

	m_wndLinksBars[4].InsertButton (CMSMLinksBarButton (_T("Budget Summary"), ID_LINKS_BUDGET_1));
	m_wndLinksBars[4].InsertButton (CMSMLinksBarButton (_T("Budget vs. Spending"), ID_LINKS_BUDGET_2));
	m_wndLinksBars[4].SetCurrentCommand (ID_LINKS_BUDGET_1);

	m_wndLinksBars[5].InsertButton (CMSMLinksBarButton (_T("Investing Home"), ID_LINKS_INVESTING_1));
	m_wndLinksBars[5].InsertButton (CMSMLinksBarButton (_T("Investing Tools"), ID_LINKS_INVESTING_2));
	m_wndLinksBars[5].InsertButton (CMSMLinksBarButton (_T("Market News"), ID_LINKS_INVESTING_3));
	m_wndLinksBars[5].InsertButton (CMSMLinksBarButton (_T("Stocks"), ID_LINKS_INVESTING_4));
	m_wndLinksBars[5].InsertButton (CMSMLinksBarButton (_T("Funds"), ID_LINKS_INVESTING_5));
	m_wndLinksBars[5].InsertButton (CMSMLinksBarButton (_T("Insight"), ID_LINKS_INVESTING_6));
	m_wndLinksBars[5].InsertButton (CMSMLinksBarButton (_T("Brokers"), ID_LINKS_INVESTING_7));
	m_wndLinksBars[5].SetCurrentCommand (ID_LINKS_INVESTING_1);

	m_wndLinksBars[6].InsertButton (CMSMLinksBarButton (_T("Planning Home"), ID_LINKS_PLANNING_1));
	m_wndLinksBars[6].InsertButton (CMSMLinksBarButton (_T("Planning Tools"), ID_LINKS_PLANNING_2));
	m_wndLinksBars[6].InsertButton (CMSMLinksBarButton (_T("Retirement"), ID_LINKS_PLANNING_3));
	m_wndLinksBars[6].InsertButton (CMSMLinksBarButton (_T("Savings"), ID_LINKS_PLANNING_4));
	m_wndLinksBars[6].InsertButton (CMSMLinksBarButton (_T("Insurance"), ID_LINKS_PLANNING_5));
	m_wndLinksBars[6].InsertButton (CMSMLinksBarButton (_T("Family && College"), ID_LINKS_PLANNING_6));
	m_wndLinksBars[6].SetCurrentCommand (ID_LINKS_PLANNING_1);

	m_wndLinksBars[7].InsertButton (CMSMLinksBarButton (_T("Taxes Home"), ID_LINKS_TAXES_1));
	m_wndLinksBars[7].InsertButton (CMSMLinksBarButton (_T("Tax Tools"), ID_LINKS_TAXES_2));
	m_wndLinksBars[7].InsertButton (CMSMLinksBarButton (_T("Prepare Online"), ID_LINKS_TAXES_3));
	m_wndLinksBars[7].InsertButton (CMSMLinksBarButton (_T("Planning"), ID_LINKS_TAXES_4));
	m_wndLinksBars[7].InsertButton (CMSMLinksBarButton (_T("Products && Services"), ID_LINKS_TAXES_5));
	m_wndLinksBars[7].SetCurrentCommand (ID_LINKS_TAXES_1);

	//-----------------------
	// Set up Favorites menu:
	//-----------------------

	int nCategorie = theApp.GetProfileInt (_T(""), _T("Categorie"), 0);

	OnCategorie (ID_CATEGORIE_1 + nCategorie);

	m_wndTaskPane.Create (_T(""), this, CRect (0, 0, 140, 200), 
		FALSE, IDR_MAINFRAME + 1, 
		WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_LEFT, 0, 0);

	DockPane(&m_wndTaskPane);

	return 0;
}
Ejemplo n.º 23
0
void CContainer::OnNcLButtonUp(UINT nHitTest, CPoint point)
{
	// TODO: Add your message handler code here and/or call default

	if (nHitTest == HTCAPTION) 
	{
		
		if(nHitTest == HTCAPTION)
		{
				if (m_NCDragWindow) 
				{
					ReleaseCapture();
					m_NCDragWindow=FALSE;	
					return;
				}

		}

	}

	CRect rc;
	//------------------ para el boton
	CRect rcT=m_rcCloseBtn;
	ClientToScreen(rcT);
	point.y+=20;
	point.x+=1;
	if (rcT.PtInRect(point))
	{
		if (m_stateBtn ==PRESS)
		{
			if (IsWindowVisible())
			{
				//if (m_Numtabs==1)
					ShowPane(FALSE);
				//else
				//	DeleteTab(m_iSelectTab);
			}
			else
				ShowPane(TRUE);
			if (m_DOCKSITE == BS_ALIGN_BOTTOM)
				((DockManager*)theApp->m_WinMain->m_DockBottom)->EveryWindowsInsert();
			if (m_DOCKSITE == BS_ALIGN_LEFT)
				((DockManager*)theApp->m_WinMain->m_DockLeft)->EveryWindowsInsert();
			if (m_DOCKSITE == BS_ALIGN_RIGHT)
				((DockManager*)theApp->m_WinMain->m_DockRight)->EveryWindowsInsert();
			theApp->m_WinMain->UpdateFrame();
			//::SendMessage(GetParent(),WM_SIZE,0,0);
		}

	}

	if (m_stateBtn ==PRESS)
	{
		m_stateBtn=NORMAL;
		KillTimer(1);
		SendMessage(WM_NCPAINT,0,0);
		return;

	}

	rcT=m_rcAutoHideBtn;
	ClientToScreen(rcT);
	if (rcT.PtInRect(point))
	{
	
	}

	if (m_stateAHBtn ==PRESS)
	{
		m_stateAHBtn=NORMAL;
		KillTimer(1);
		SendMessage(WM_NCPAINT,0,0);
		return;
	}
	

	Default();
}