Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Mobile Development
  3. Mobile
  4. CCeCommandBar isn't shown

CCeCommandBar isn't shown

Scheduled Pinned Locked Moved Mobile
c++helptutorial
2 Posts 2 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Niko Tanghe
    wrote on last edited by
    #1

    PocketPC MFC application: when I create a child dialog, my Commandbar is not shown anymore. See example code. Thanks in advance for any help on this. I realy need a solution for this. BOOL CHAS_PocketClientDlg::OnInitDialog() { CDialog::OnInitDialog(); SetIcon(m_hIcon, TRUE); // Set big icon SetIcon(m_hIcon, FALSE); // Set small icon CenterWindow(GetDesktopWindow()); // center to the hpc screen CCeCommandBar *pCommandBar = (CCeCommandBar*)m_pWndEmptyCB; pCommandBar->LoadToolBar(IDR_TOOLBAR); pCommandBar->SetSizes(CSize(23,21), CSize(16,15)); //comment following 2 lines and everything works fine ASSERT(m_Dlg.Create(IDD_DLG)); //Child dialog, no border m_Dlg.ShowWindow(SW_SHOW); //dialog is shown correctly return TRUE; // return TRUE unless you set the focus to a control }

    J 1 Reply Last reply
    0
    • N Niko Tanghe

      PocketPC MFC application: when I create a child dialog, my Commandbar is not shown anymore. See example code. Thanks in advance for any help on this. I realy need a solution for this. BOOL CHAS_PocketClientDlg::OnInitDialog() { CDialog::OnInitDialog(); SetIcon(m_hIcon, TRUE); // Set big icon SetIcon(m_hIcon, FALSE); // Set small icon CenterWindow(GetDesktopWindow()); // center to the hpc screen CCeCommandBar *pCommandBar = (CCeCommandBar*)m_pWndEmptyCB; pCommandBar->LoadToolBar(IDR_TOOLBAR); pCommandBar->SetSizes(CSize(23,21), CSize(16,15)); //comment following 2 lines and everything works fine ASSERT(m_Dlg.Create(IDD_DLG)); //Child dialog, no border m_Dlg.ShowWindow(SW_SHOW); //dialog is shown correctly return TRUE; // return TRUE unless you set the focus to a control }

      J Offline
      J Offline
      Joao Paulo Figueira
      wrote on last edited by
      #2

      Your child dialog is a CDialog-derived class? If it is, it should have its onw empty m_pWndEmptyCB that overlaps the one you want to show (created in CHAS_PocketClientDlg::OnInitDialog). So, if you want to show it, you must create it (using the same procedure) in the child as well.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups