Print Page | Close Window

Restoring Frame Window placement

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Skin Framework
Forum Description: Topics Related to Codejock Skin Framework
URL: http://forum.codejock.com/forum_posts.asp?TID=12063
Printed Date: 12 November 2024 at 1:07pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Restoring Frame Window placement
Posted By: ddlittle
Subject: Restoring Frame Window placement
Date 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!



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