Print Page | Close Window

Add Menu in Applicaton Based on Dialog

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=7078
Printed Date: 05 July 2024 at 4:21am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Add Menu in Applicaton Based on Dialog
Posted By: suntimes
Subject: Add Menu in Applicaton Based on Dialog
Date Posted: 08 May 2007 at 9:19am

I use Xtreme ToolkitPro v10.3.1 to beautify the application based on dialog. After I loaded a skin, the menu disappeared. Then I write the code as follow:

    // Initialize the command bars
 if (!m_wndStatusBar.Create(this) ||
        !m_wndStatusBar.SetIndicators(indicators,
        sizeof(indicators)/sizeof(UINT)))
    {
        TRACE0("Failed to create status bar\n");
        return -1;      // fail to create
    }

 if (!InitCommandBars())
        return -1;

 CXTPCommandBars* pCommandBars = GetCommandBars();
 // Add the menu bar
 CXTPCommandBar* pMenuBar = pCommandBars->SetMenu(
  _T("Menu Bar"), IDR_MAINFRAME);
 if(pMenuBar == NULL)
 {
  TRACE0("Failed to create menu bar.\n");
  return -1;      // fail to create
 }

And I change the dialog derive from CDialogSampleDlgBase. But  I still can't get the menu in the dialog. What should I do more?



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net