ChldFrm and SkineFramework |
Post Reply |
Author | |
gwoin
Groupie Joined: 09 September 2004 Location: France Status: Offline Points: 52 |
Post Options
Thanks(0)
Posted: 15 June 2006 at 11:52am |
Hi,
I encounter a problem since the version 10.2 ot the framework.
My application is using a custom theme (based on the SkinSDISample sample).
It is a MDI application, so with CChildFrame.
The problem is that the title bar of the child window does not appear with the version 10.2.
Plus, the child frame has its own skin (in order to put some images and customs informations in the title bar).
My code is simple:
//customize the theme of the child window
class CMatrisChildFrame : public CMDIChildWnd
{
[...]
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnNcPaint();
afx_msg void OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR* lpncsp);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnWindowPosChanging(WINDOWPOS* lpwndpos);
afx_msg void OnCaptureChanged(CWnd *pWnd);
[...]
} and then:
class CChildFrame : public CMatrisChildFrame All ran well, and I would like to keep this skin for the child, but with the version 10.2 of the framework I dont see the title bar of the child window anymore.
Is there any informations to put in the .INI file of my skin, or in the MainFrm.cpp or any where else to see my titlebar again (and the complete skin of the child window too) ?
Thank you.
|
|
gwoin
Groupie Joined: 09 September 2004 Location: France Status: Offline Points: 52 |
Post Options
Thanks(0)
|
I up a new post because the problem is still there. with XTPro 10.1 and earlier, I got this: And now, since XTPro 10.2, I get this:
The title bar of my child window is gone, whereas my source code has not been changed.
Any idea on how I could see the title bar again?
Thank you.
PS: Oleg, your avatar is the hedgehog from Youri Norstein?
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello, difficult to say without information of code you use. May be you can attach some sample to show what you do?
ps. Yeap, it is hedgehog in mist :)
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
gwoin
Groupie Joined: 09 September 2004 Location: France Status: Offline Points: 52 |
Post Options
Thanks(0)
|
My MDI application has an only one childframe. I have customized the caption bar of this child in order to add some user informations and menus.
My code is very simple :
The CChildFrame class is inherited from CXTPFrameWndBase<CMDIChildWnd> and overload some functions:
class CChildFrame : public CXTPFrameWndBase<CMDIChildWnd>
{
DECLARE_DYNCREATE(CChildFrame)
public:
CChildFrame();
public:
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CChildFrame)
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
//}}AFX_VIRTUAL
[...]
//my variables and functions
[...]
// Implementation
public:
virtual ~CChildFrame(); int GetSysButtonsh*tTest(CPoint point);
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnNcPaint();
afx_msg void OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR* lpncsp);
afx_msg LRESULT OnNcHitTest(CPoint point);
afx_msg void OnNcLButtonDown(UINT nHitTest, CPoint point);
afx_msg void OnNcLButtonUp(UINT nHitTest, CPoint point);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnWindowPosChanging(WINDOWPOS* lpwndpos);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnCaptureChanged(CWnd *pWnd);
};
Then, in the ChildFrm.cpp:
BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
{
cs.style = WS_CHILDWINDOW;
cs.cy = WINDOW_HEIGHT; //set a fixed window size
cs.cx = WINDOW_WIDTH;
cs.y = 0;
cs.x = 0;
return (CXTPFrameWndBase<CMDIChildWnd>::PreCreateWindow(cs) );
}
[...]
The child frame has the size that I set, so the function below is traversed by the application, but the others functions like OnNcPaint, OnNcCalcSize, OnNcHitTest, ... are never traversed anymore.
In the myApp.cpp file, i just declar the doc Template as this:
CMultiDocTemplate * pDocTemplate;pDocTemplate = new CMultiDocTemplate(
IDR_GUI_WHTYPE,
RUNTIME_CLASS(CMatrisDoc),
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
RUNTIME_CLASS(CMatrisView));
Any idea why the On NCpaint, ..., are not traversed anymore since XTP 10.2 ?
Thank you. |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
Yes, SkinFramework draw Non Client area and don't allow base methods to be called. As Workaround remove WS_CAPTION style.
For next release we added ability to create custom CXTPSkinManager, catch events, create custom skin classes etc.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
gwoin
Groupie Joined: 09 September 2004 Location: France Status: Offline Points: 52 |
Post Options
Thanks(0)
|
Thank you Oleg.
Too bad for the Childframe...
Could you tell when the next version should be released?
I hope that the transfer between my actual code and the next release will be easy :)
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
I guess in beginning of August....
You can play now with source code. in
CXTPSkinObjectFrame::IsDefWindowProcAvail
comment "if (HasCaption()) return FALSE;"
and non client messages will be send.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
gwoin
Groupie Joined: 09 September 2004 Location: France Status: Offline Points: 52 |
Post Options
Thanks(0)
|
Hi Oleg, Thank you.
I will try by commenting this line.
[Edit: ] It works, thank you Oleg
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |