Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - CHM Help display problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CHM Help display problem

 Post Reply Post Reply
Author
Message
kelvincannon View Drop Down
Groupie
Groupie
Avatar

Joined: 12 November 2003
Location: United Kingdom
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote kelvincannon Quote  Post ReplyReply Direct Link To This Post Topic: CHM Help display problem
    Posted: 22 October 2010 at 1:11pm
Hi

I have a display problem with a text box in the index and search pages of a CHM help screen. The image shows the problem.


This was fine in version 13.3.1 and now in version 13.4.1 it is as above.
The problem seems to come from XTPSkinManagerApiHook.cpp

int WINAPI CXTPSkinManagerApiHook::OnHookGetSystemMetrics(int nIndex)
{
    typedef int (WINAPI* LPFNGETSYSTEMMETRICS)(int nIndex);

    PROC pfnOrig = GetOriginalProc(xtpSkinApiGetSystemMetrics);
    if (!pfnOrig)
        return GetSystemMetrics(nIndex);

    int nResult = ((LPFNGETSYSTEMMETRICS)pfnOrig)(nIndex);

    CXTPSkinManager* pSkinManager = XTPSkinManager();
    if (!pSkinManager->IsEnabled() || !pSkinManager->GetMetrics() || pSkinManager->GetMetrics()->m_bRefreshMetrics)
        return nResult;

    if (!pSkinManager->HasApplyOptions(xtpSkinApplyMetrics | xtpSkinApplyColors | xtpSkinApplyFrame))
        return nResult;

    switch (nIndex)
    {
        case SM_CYCAPTION: return pSkinManager->GetMetrics()->m_cyCaption;
        case SM_CYSMCAPTION: return pSkinManager->GetMetrics()->m_cySmallCaption;

        case SM_CXBORDER: return pSkinManager->GetMetrics()->m_cxBorder;
        case SM_CYBORDER: return pSkinManager->GetMetrics()->m_cyBorder;

        case SM_CXHSCROLL: return pSkinManager->GetMetrics()->m_cxHScroll;
        case SM_CYHSCROLL: return pSkinManager->GetMetrics()->m_cyHScroll;
        case SM_CXVSCROLL: return pSkinManager->GetMetrics()->m_cxVScroll;
        case SM_CYVSCROLL: return pSkinManager->GetMetrics()->m_cyVScroll;

        case SM_CXFRAME: return pSkinManager->GetMetrics()->m_cxBorder;
        //case SM_CYFRAME: return pSkinManager->GetMetrics()->m_cyBorder;
           
        case SM_CXEDGE: return pSkinManager->GetMetrics()->m_cxEdge;
        case SM_CYEDGE: return pSkinManager->GetMetrics()->m_cyEdge;
    }

    return nResult;
}

If I stop SM_CYFRAME case statement from running it works ok.

Regards
Kelvin

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 22 October 2010 at 2:32pm
Thanks, we will remove  SM_CYFRAME/SM_CXFRAME also.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
kelvincannon View Drop Down
Groupie
Groupie
Avatar

Joined: 12 November 2003
Location: United Kingdom
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote kelvincannon Quote  Post ReplyReply Direct Link To This Post Posted: 22 October 2010 at 2:50pm
Thanks for the quick reply.
I just need to ask will it effect anything else?

Thanks
Kelvin

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 25 October 2010 at 3:15am
Hi,

I don't see problems. Our customer suggested add SM_CXEDGE/SM_CYEDGE that was good idea, but changing also SM_CXFRAME/SM_CYFRAME was not that good.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
sirhaden View Drop Down
Groupie
Groupie


Joined: 19 February 2010
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote sirhaden Quote  Post ReplyReply Direct Link To This Post Posted: 03 November 2010 at 10:47am
There is also a problem with a disabled vertical scrollbar appearing on the Index panel when no scrollbar is needed.
 
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.