Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - theming (child) dialog in MDI application
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

theming (child) dialog in MDI application

 Post Reply Post Reply
jw_statica View Drop Down

Joined: 23 May 2018
Status: Offline
Points: 8
Post Options Post Options   Thanks (1) Thanks(1)   Quote jw_statica Quote  Post ReplyReply Direct Link To This Post Topic: theming (child) dialog in MDI application
    Posted: 06 June 2018 at 3:53am
I have problem connecting with skinning dialog in MDI application.
In order to explain it, I modified the CodeJock RibbonMDISample:
- added to project Dialog1 (style popup) and Dialog2 (style child).
- added members do class CMainFrame:  std::unique_ptr  dlg1; std::unique_ptr  dlg2;
- modified function void CMainFrame::OnViewFullscreen() 

void CMainFrame::OnViewFullscreen() 
  dlg1 = std::make_unique();
  if (dlg1->Create(IDD_DIALOG1, &m_wndClient))

  dlg2 = std::make_unique();
  if (dlg2->Create(IDD_DIALOG2, &m_wndClient))

After calling this function there will show 2 dialogs one (child) without skin and second (popup) skined.

We called function XTPSkinManager()->LoadSkin() and dialogs were skinned 
but after closing dialogs and opening them again they weren't skinned.uploads/9273/
Back to Top
olebed View Drop Down
Admin Group
Admin Group

Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 23 June 2018 at 11:12am
Originally posted by astoyan astoyan wrote:


Yes, you can apply the same theme to your dialogs, it's not skinning though, it's just re-using CommandBars theme.
All you need is to derive your dialog class from CXTPDialog and enable frame theme as shown below:

BOOL CTestDialog::OnInitDialog() 
    ASSERT(NULL != GetCommandBars());


I hope it will be helpful.
Thank you.
 Alexander Stoyan
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

This page was generated in 0.094 seconds.