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 |
|
|