Print Page | Close Window

Border not painted correctly

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=4739
Printed Date: 24 November 2024 at 10:07pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Border not painted correctly
Posted By: znakeeye
Subject: Border not painted correctly
Date Posted: 04 August 2006 at 12:59pm
I've been playing a bit with the report control and it worked just fine until I put it inside a tab control. Not sure if it's important, but I have a quite advanced window hierarchy:
I have a view with a splitter. In this splitter one of the panes is another view with a tab control (CXTPTabControl). This tab control has a number of views. Now, finally, in one of these views I have a report control.
 
Please note that ALL (all views, frames and tabs) my windows have the WS_CLIPCHILDREN | WS_CLIPSIBLINGS style enabled. Also, my report control has the WS_EX_STATICEDGE style. My report controls look OK in other windows, but not inside my tab control!
 
PROBLEM:
The border of the report control is not painted correctly. I tried disabling the skinning engine, but with no success. What am I doing wrong?
 
Screenshot of the borderless report control:
http://www.bostream.nu/krisse/missing_border.gif - http://www.bostream.nu/krisse/missing_border.gif
 



Replies:
Posted By: Oleg
Date Posted: 04 August 2006 at 1:49pm
Hi,
Show some code - how you create report, what styles, etc.


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


Posted By: znakeeye
Date Posted: 04 August 2006 at 2:21pm

void CMyView::OnInitialUpdate()
{
    CXTResizeFormView::OnInitialUpdate();

    if (m_bInitDone)
        return;

    SetResize(IDC_REPORT_SHORTQUESTIONS, SZ_TOP_LEFT, SZ_TOP_RIGHT);
   
    // SetScaleToFitSize(CSize(1, 1));
   
    m_reportShortQuestions.ModifyStyle(0, WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_TABSTOP);
    m_reportShortQuestions.ModifyStyleEx(0, WS_EX_STATICEDGE);
    m_reportShortQuestions.GetReportHeader()->AllowColumnReorder(FALSE);
    m_reportShortQuestions.GetReportHeader()->AllowColumnSort(FALSE);
    m_reportShortQuestions.GetReportHeader()->AllowColumnResize(FALSE);
    m_reportShortQuestions.GetReportHeader()->AllowColumnRemove(FALSE);
    m_reportShortQuestions.FocusSubItems(TRUE);
   
    m_reportShortQuestions.AddColumn(new CXTPReportColumn(0, _T("Fråga"), 200));

    CXTPReportColumn *pColumnYes = new CXTPReportColumn(1, _T("Ja"), 28);
    CXTPReportColumn *pColumnNo = new CXTPReportColumn(2, _T("Nej"), 28);
    CXTPReportColumn *pColumnUnknown = new CXTPReportColumn(3, _T("Okänt"), 28);

    pColumnYes->SetAlignment(xtpColumnIconCenter);
    pColumnYes->SetHeaderAlignment(DT_CENTER);
    pColumnNo->SetAlignment(xtpColumnIconCenter);
    pColumnNo->SetHeaderAlignment(DT_CENTER);
    pColumnUnknown->SetAlignment(xtpColumnIconCenter);
    pColumnUnknown->SetHeaderAlignment(DT_CENTER);
   
    m_reportShortQuestions.AddColumn(pColumnYes);
    m_reportShortQuestions.AddColumn(pColumnNo);
    m_reportShortQuestions.AddColumn(pColumnUnknown);

    const int NUM_SHORT = 16;
    for (int i = 0; i < NUM_SHORT; i++)
        m_reportShortQuestions.AddRecord(new CShortQuestionRecord(i + 1, szShortQuestions));
   
    m_reportShortQuestions.SetMultipleSelection(FALSE);
    m_reportShortQuestions.Populate();

    m_bInitDone = TRUE;
}

 
Should I strip my project and send you a sample where the error is present, or can you find the error by looking at the code above?


Posted By: znakeeye
Date Posted: 04 August 2006 at 2:45pm
I made a test project which demonstrates the problem.
 
Please take a look.
http://www.bostream.nu/krisse/report_missing_border.zip - http://www.bostream.nu/krisse/report_missing_border.zip
 


Posted By: Oleg
Date Posted: 04 August 2006 at 4:14pm
Hi,
 
m_reportShortQuestions.ModifyStyleEx(0, WS_EX_STATICEDGE, SWP_FRAMECHANGED);
 


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


Posted By: znakeeye
Date Posted: 04 August 2006 at 4:23pm
Hah! You're da man!
 
Thank you for your fast response!



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