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
 Forum for Origin C
 Message box and window locations

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
kmcelroy Posted - 03/07/2006 : 11:25:48 PM
Origin Version (Select Help-->About Origin): 7SR4
Operating System: XP

Is there any way to control where the message box pops up? What about controlling where a graph window is located?

I am plotting data, asking the user a question, then re-plotting based on the user's answer. Right now, everytime the message box pops up, it is covering part of the plot, so the user must move the message box in order to answer the question.

-kathryn

1   L A T E S T    R E P L I E S    (Newest First)
Deanna Posted - 04/02/2006 : 10:13:39 PM
Dear Kathryn,

It seems that it is not easy to control where the message box pops up. However, the location and the size of an existing graph window can be set through simple Origin C codes, using the MoveWindow function in Window class.

The prototype is as follows:
void MoveWindow(const RECT * lpRect, BOOL bRepaint = TRUE);

Suppose the graph window is currently activated. Executing the following function will change the upper-left position to (200, 100) without resizing the window.


void ChangeGraphPos()
{
// Create and attach a graph layer from current Graph:
GraphLayer gl = Project.ActiveLayer();
GraphPage gp = gl.GetPage();

Window testWin = gp.GetWindow();
testWin.ShowWindow(SW_NORMAL);

RECT rect;
testWin.GetWindowRect(&rect);

int iWidth = rect.right - rect.left;
int iHeight = rect.bottom - rect.top;

rect.left = 200;
rect.top = 100;
rect.right = rect.left + iWidth;
rect.bottom = rect.top + iHeight;

testWin.MoveWindow(&rect);

}


I hope this will help.

Deanna
OriginLab GZ Office

Edited by - Deanna on 04/09/2006 10:37:58 PM

Edited by - Deanna on 04/09/2006 10:38:20 PM

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