Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Problem With CMainFrame::OnThemeChanged Collapse All
Subject Author Date
Burak Petekkaya Apr 12, 2007 - 2:24 AM

Hi,

in my mainframe class I add following code

in h. file

afx_msg LRESULT OnThemeChanged( WPARAM wParam, LPARAM lParam );

in cpp.file ,

BEGIN_MESSAGE_MAP(CMainFrame, CExtNCW < CMDIFrameWnd >)
.............
ON_MESSAGE(__ExtMfc_WM_THEMECHANGED, OnThemeChanged)
..........
END_MESSAGE_MAP()

and

LRESULT CMainFrame::OnThemeChanged( WPARAM wParam, LPARAM lParam )
{
LRESULT lResult = Default();
// CExtPaintManager * pPM = g_CmdManager->PPmBridge_GetPM();
g_PaintManager.OnThemeChanged( this, wParam, lParam );
// g_CmdManager.OnThemeChanged( pPM, this, wParam, lParam );

return lResult;
}

but when I was debugging application,there was no jumping to CMainFrame::OnThemeChanged(...) method above

I must access this code place .How can I do?

Burak Petekkaya Apr 12, 2007 - 5:56 AM

Hi,
I manage my application as sample, TabbedBars.But while compile project ,a compile errors occured.

error occured in code place (it is another class) where I create my MainFrameClass

CMainFrame* pMainFrame = new CMainFrame;

The error is :error C2259: aˆ™CMainFrameaˆ™ : cannot instantiate abstract class due to following members
see declaration of aˆ™CMainFrameaˆ™

my mainframeclass h. file
class CMainFrame
: public CExtNCW < CMDIFrameWnd >
, CExtPmBridge
{....
this error occured after I derived CMainFrame from CExtPmBridge,

before I change declaration of aˆ™CMainFrameaˆ™ it was like below

class CMainFrame
: public CExtNCW < CMDIFrameWnd >
{
....


what can I do? I must do this.AA°taˆ™s very important for me

please help me!

Suhai Gyorgy Apr 12, 2007 - 6:55 AM

I think you missed one important line from your class file:
IMPLEMENT_CExtPmBridge_MEMBERS( CMainFrame );
Check this FAQ and TabbedBars sample.

Burak Petekkaya Apr 12, 2007 - 5:49 AM

Hi,

I manage my application as sample, TabbedBars.But while compile project ,a compile errors occured.

error occured in code place (it is another class) where I create my MainFrameClass

CMainFrame* pMainFrame = new CMainFrame;

The error is :error C2259: ’CMainFrame’ : cannot instantiate abstract class due to following members
see declaration of ’CMainFrame’

my mainframeclass h. file
class CMainFrame
    : public CExtNCW < CMDIFrameWnd >
    , CExtPmBridge
{....
this error occured after I derived CMainFrame from CExtPmBridge,

before I change declaration of ’CMainFrame’ it was like below

class CMainFrame
    : public CExtNCW < CMDIFrameWnd >
{
....


what can I do? I must do this.A°t’s very important for me

please help me!

Suhai Gyorgy Apr 12, 2007 - 3:44 AM

You are trying to catch the wrong message. I found this message handling in TabbedBars sample of ProfUIS. If you set a breakpoint in OnThemeChanged method of that sample’s MainFrame, you can see that changing ProfUIS theme on Theme Switcher toolbar won’t make that message fired. It is only fired when you change the theme of your Windows through Control Panel -> Display properties.
What’s wrong with Support’s solution?

Suhai Gyorgy Apr 12, 2007 - 3:51 AM

Check out same sample, TabbedBars. Set a breakpoint in CMainFrame::PmBridge_OnPaintManagerChanged and run application. Click on any button on ThemeSwitcher toolbar and you will see the code in CMainFrame::PmBridge_OnPaintManagerChanged accessed.