Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Add Feature LoadPlacement
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Add Feature LoadPlacement

 Post Reply Post Reply
Author
Message
jimmy View Drop Down
Senior Member
Senior Member


Joined: 11 November 2003
Location: Austria
Status: Offline
Points: 516
Post Options Post Options   Thanks (0) Thanks(0)   Quote jimmy Quote  Post ReplyReply Direct Link To This Post Topic: Add Feature LoadPlacement
    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

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.063 seconds.