LOADVIEW.C

Go to the documentation of this file.
00001 /* --
00002 OpenFX version 2.0 - Modelling, Animation and Rendering Package
00003 Copyright (C) 2000 - 2007 OpenFX Development Team
00004 -- */
00005 
00006 /* LOADVIEW.C   (included in designer and animatorr.c) */
00007 
00008 void LoadViewer(int type){
00009  int result;
00010  char modulename[255];
00011  HWND hWnd;
00012  if((hWnd=FindWindow("OFX:ViewClass",NULL)) == NULL){
00013    strcpy(modulename,gszHomeDir);strcat(modulename,"winview.exe");
00014    result=WinExec(modulename,SW_SHOW);
00015    if(result < 32){
00016      if(result == ERROR_FILE_NOT_FOUND ||
00017         result == ERROR_PATH_NOT_FOUND)SendPrgmQuery(IDQ_NOSTART,3);
00018      return;
00019    }
00020    hWnd=FindWindow("OFX:ViewClass",NULL);
00021  }
00022  if(!IsWindow(hWnd)){
00023    SendPrgmQuery(IDQ_NOSTART,3);
00024  }
00025  else{
00026    SetForegroundWindow(hWnd);
00027    BringWindowToTop(hWnd);
00028    ShowWindow(hWnd,SW_SHOW);
00029    if     (type == 2)PostMessage(hWnd,WM_COMMAND,109,0);   /* map image  */
00030    else if(type == 1)PostMessage(hWnd,WM_COMMAND,107,0);   /* last image */
00031    else              PostMessage(hWnd,WM_COMMAND,105,0);   /* view       */
00032  }
00033 }

Generated on Sun Apr 27 14:20:11 2014 for OpenFX by  doxygen 1.5.6