Print Page | Close Window

EnableFrameTheme() Access Violation

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=18115
Printed Date: 28 April 2024 at 8:00pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: EnableFrameTheme() Access Violation
Posted By: ganeshbabu.cv
Subject: EnableFrameTheme() Access Violation
Date Posted: 24 March 2011 at 7:31am
Hi,
I am using VS2005 and Codejock 11.02 version. When I create a ribbonbar I get an access violation when call is made to pRibbonBar->EnableFrameTheme(); function.

Any help would be appreciated.

Further I get ASSERT violations in XTPRibbonBar.cpp at line 273.

CXTPRibbonTheme* CXTPRibbonBar::GetRibbonPaintManager() const
{
    CXTPPaintManager* pPaintManager = GetPaintManager();
    ASSERT(pPaintManager->BaseTheme() == xtpThemeRibbon);

    return (CXTPRibbonTheme*)pPaintManager;
}

Please help me in fixing this issue.

Thanks in advance.





Replies:
Posted By: Oleg
Date Posted: 25 March 2011 at 6:09am
Hi,

As this assert suggest, you need set xtpThemeRibbon before you call this method.




-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: ganeshbabu.cv
Date Posted: 25 March 2011 at 6:10am
Hi Many thanks for the reply . . .I had set the style here is snapshot from OnCreate ()

int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
    if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
        return -1;
   
    XTPPaintManager()->SetTheme(xtpThemeRibbon);

    if (!CreateStatusBar())
        return -1;

    if (!InitCommandBars())
        return -1;

//Create ribbon bars
}



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