The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 screen resolution

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
tinkusch Posted - 08/01/2005 : 10:35:04 AM
Origin Version (Select Help-->About Origin): 7.5 G
Operating System:XP Professional

Hi,
how do I get the pixel values for the actual screen width and height in ORIGIN?
How do I get the pixel coordinates, width and heigth of the ORIGIN desktop, i.e. the "grey and empty" Origin Window minus Menue bar, status bar and icon list?

My aim is to find out automatically the screen resolution dependent maximum available height and the respective coordinates for a worksheet window (in pixel). I like to fit automatically the window of my application to different screen resolutions such, that the whole window is always visible

Thanks for any hint

bye Stefan

2   L A T E S T    R E P L I E S    (Newest First)
tinkusch Posted - 08/02/2005 : 03:10:46 AM
Thanks, Mike
that helps a lot!

bye

Stefan



Edited by - tinkusch on 08/02/2005 03:36:24 AM
Mike Buess Posted - 08/01/2005 : 1:43:22 PM
Hi Stefan,
quote:
How do I get the pixel coordinates, width and heigth of the ORIGIN desktop, i.e. the "grey and empty" Origin Window minus Menue bar, status bar and icon list?
Sounds like you want the coordinates of a maximized graph or worksheet window. The following OC function will get the screen coordinates of the Origin program window and a maximized window inside. (Project must contain at least one child window.)
void get_screen_coordinates()
{
HWND hwnd = GetWindow();
Window org(hwnd);
RECT rect;
org.GetWindowRect(&rect);
printf("Program window:\n");
printf("upper-left position, x:%d, y:%d\n", rect.left, rect.top);
printf("lower-right position: x:%d, y:%d\n", rect.right, rect.bottom);
Page pg = Project.Pages(-1);
Window win = pg.GetWindow();
win.ShowWindow(SW_MAXIMIZE);
win.GetWindowRect(&rect);
printf("Maximized window:\n");
printf("upper-left position, x:%d, y:%d\n", rect.left, rect.top);
printf("lower-right position: x:%d, y:%d\n", rect.right, rect.bottom);
}
Use Window::MoveWindow to resize a window.

Mike Buess
Origin WebRing Member

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000