Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Ribbon / Dialogbased App
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Ribbon / Dialogbased App

 Post Reply Post Reply
Author
Message
Pixbyte View Drop Down
Groupie
Groupie


Joined: 11 April 2007
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote Pixbyte Quote  Post ReplyReply Direct Link To This Post Topic: Ribbon / Dialogbased App
    Posted: 11 April 2007 at 10:04pm
Hello,

is it possible to use the Ribbon in a DialogBased Applictaion? Commandbar and so forth work, but if I try to use the Ribbon I get only a crazy dialog.

Ingo
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 12 April 2007 at 12:31am
Hi,
 
Yes, you can. Check CommandBars\DialogSample  sample and add Ribbon same way.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Pixbyte View Drop Down
Groupie
Groupie


Joined: 11 April 2007
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote Pixbyte Quote  Post ReplyReply Direct Link To This Post Posted: 12 April 2007 at 6:23am
ok, but the DialogSample is allways crashing on my computer. All other samples are working.

Ingo
Back to Top
Pixbyte View Drop Down
Groupie
Groupie


Joined: 11 April 2007
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote Pixbyte Quote  Post ReplyReply Direct Link To This Post Posted: 12 April 2007 at 7:09am
The function: OnKickIdle always crash and if i comment out, the bars are not working.

Ingo
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 12 April 2007 at 9:08am
Hi,
 
Problem in GetCommandBars()->UpdateCommandBars(); ?
 
If you comment this line do you see crash? Please try to press Retry in ASSRT dialog and show full stack.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Pixbyte View Drop Down
Groupie
Groupie


Joined: 11 April 2007
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote Pixbyte Quote  Post ReplyReply Direct Link To This Post Posted: 12 April 2007 at 12:43pm
>    DialogSampled.exe!CArray<CXTPToolBar *,CXTPToolBar *>::GetSize()  Zeile 272 + 0x26    C++
     DialogSampled.exe!CXTPCommandBars::GetCount()  Zeile 1409    C++
     DialogSampled.exe!CXTPCommandBars::UpdateCommandBars()  Zeile 1214 + 0x1a    C++
     DialogSampled.exe!CDialogSampleDlg::OnKickIdle(unsigned int __formal=0, unsigned int __formal=0)  Zeile 276    C++
     DialogSampled.exe!CWnd::OnWndMsg(unsigned int message=874, unsigned int wParam=0, long lParam=0, long * pResult=0x0012f904)  Zeile 2013 + 0x11    C++
     DialogSampled.exe!CXTPDialogBase<CXTResizeDialog>::OnWndMsg(unsigned int message=874, unsigned int wParam=0, long lParam=0, long * pResult=0x0012f904)  Zeile 193    C++
     DialogSampled.exe!CWnd::WindowProc(unsigned int message=874, unsigned int wParam=0, long lParam=0)  Zeile 1745 + 0x1e    C++
     DialogSampled.exe!AfxCallWndProc(CWnd * pWnd=0x0012fc30, HWND__ * hWnd=0x004805c2, unsigned int nMsg=874, unsigned int wParam=0, long lParam=0)  Zeile 241 + 0x1a    C++
     DialogSampled.exe!AfxWndProc(HWND__ * hWnd=0x004805c2, unsigned int nMsg=874, unsigned int wParam=0, long lParam=0)  Zeile 389    C++

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 12 April 2007 at 3:40pm
Hi,
 
Guess WM_KICKIDLE in your computer sent before commandbars was created. Strange, I can't reproduce it.
 
Please just modify sample:
 if (GetCommandBars()) GetCommandBars()->UpdateCommandBars();
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Pixbyte View Drop Down
Groupie
Groupie


Joined: 11 April 2007
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote Pixbyte Quote  Post ReplyReply Direct Link To This Post Posted: 12 April 2007 at 7:03pm
Ima woondering about the DilogSample. I get much trouble. The statusbar will not created, too. The function:

    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
    }
always return -1.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 13 April 2007 at 12:37am
Hi,
 
What line - Create or SetIndicators returns false?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.111 seconds.