Print Page | Close Window

Add Feature LoadPlacement

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=1675
Printed Date: 18 September 2025 at 9:35pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Add Feature LoadPlacement
Posted By: jimmy
Subject: Add Feature LoadPlacement
Date Posted: 17 January 2005 at 8:43am
Please add a bVisible flag to the LoadPlacment function.
Because on a Dialog SetWindowPlacement make the dialog visible.
And if a add after this functioncalling some other resize function.
Button 'Show Detail' the window is flickering.
After OnInitDialog the Window also get SW_SHOW

void CExDialog::LoadPlacement(LPCTSTR pszSection, bool bVisible)
    {
    UINT nBytes = 0;
    BYTE* pBytes = 0;
    AfxGetApp()->GetProfileBinary(pszSection, ENTRY_WINDOWPLACEMENT, &pBytes, &nBytes);
    if (nBytes == sizeof(WINDOWPLACEMENT))
        {
        WINDOWPLACEMENT *pWP = (WINDOWPLACEMENT*)pBytes;
        if (!bVisible)
            pWP->showCmd = SW_HIDE;

        m_pWnd->SetWindowPlacement(pWP);
        }
    if (pBytes && nBytes)
        delete[] pBytes;
    }

  Jimmy




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