Please enable JavaScript to view this site.

Vensim Help

C/C++int VEFCC vensim_set_parent_window(HWND window,long r1,long r2) ;

int VEFCC VensimCSetParentWindow(int context,HWND window,long r1,long r2) ;

Javapublic static native int set_parent_window(int window,int r1,int r2) ;//generally references to windows just won't work

public static native int CSetParentWindow(int context,int window,int r1,int r2) ;//generally references to windows just won't work

VBPrivate Declare Function vensim_set_parent_window Lib "vendll32.dll" (ByVal vwidnow As Long, ByVal r1 As Long, ByVal r2 As Long) As Long
Pascalfunction vensim_set_parent_window(pwindow : HWND;r1:Longint;r2:Longint) : Integer ;  stdcall ; external 'vendll32.dll' ;

This is used to set a window that will be the owner of any dialogs or message boxes that Vensim presents.  This can help to prevent the uncoupling of message boxes and the application.

Arguments

window        Window that will act as parent

rl        For encrypted DLL only.  Use the first key supplied with your redistribution package.  For the regular DLL use 0.

r2        Fore encrypted DLL only.  Use the second key supplied with your redistribution package.  For the regular DLL use 0.

Returns

1

Notes

Set the parent window to 0 (or NULL) to get the default behavior.

If you are using the encrypted DLL you must call this function before trying to open any model or graph set.  If you do not the open will fail and Vensim may crash.  If you pass the wrong keys no models will open and Vensim may crash.