Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Zooming layout in Windows
Re: Zooming layout in Windows [message #36053 is a reply to message #36052] Sun, 22 April 2012 02:52 Go to previous messageGo to previous message
jerson is currently offline  jerson
Messages: 202
Registered: June 2010
Location: Bombay, India
Experienced Member

Dear Lance

Thank you very much. I reeally appreciate your help. I am considering something on the lines of this (I'm using pseudo code here).

Size Designsz = OriginalLayoutSizePos (const)
Size wsz = GetSizePos(MainWindow);  // current sizepos
int ratiox = wsz.x / Designsz.x;    // amount of X change
int ratioy = wsz.y / Designsz.y;    // amount of Y change

// for each widget on the layout, (helps to add/remove widgets later on as the project grows)
for (Widget=0; Widget < LastWidget; Widget++)
{
   // scale each widget.  Maybe I need to adjust the LeftPos and TopPos too for each widget
   Widgets[Widget].Size.x *= ratiox
   Widgets[Widget].Size.y *= ratioy
}

// update all widgets on the layout
Refresh();

[Updated on: Sun, 22 April 2012 03:02]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: UDP connection
Next Topic: How to get pixels per millimeter for current screen?
Goto Forum:
  


Current Time: Mon Apr 28 14:18:47 CEST 2025

Total time taken to generate the page: 0.05056 seconds