Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - Restoring Frame Window placement
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Restoring Frame Window placement

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


Joined: 19 February 2004
Location: United States
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote ddlittle Quote  Post ReplyReply Direct Link To This Post Topic: Restoring Frame Window placement
    Posted: 03 September 2008 at 3:06pm
I have some code to restore my frame's window placement using GetWindowPlacement, but it doesn't work with the Vista skin - the window shrinks a pixel or two everytime I open it.  I probably need to add the size of the Vista status bar or something; I'm just not sure how.  Does XTP have this built-in?  I call it in PreCreateWindow(), and I call this in the frame's OnDestroy():
 

WINDOWPLACEMENT wp;

BOOL b = GetWindowPlacement(&wp);

int height = wp.rcNormalPosition.bottom - wp.rcNormalPosition.top;

int width = wp.rcNormalPosition.right - wp.rcNormalPosition.left;

s.Format("%d,%d,%d,%d,%d",

height,

width,

wp.rcNormalPosition.top,

wp.rcNormalPosition.left,

wp.showCmd);

 
Any ideas?
 
Thanks!
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.109 seconds.