LOADVIEW.C
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
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);
00030 else if(type == 1)PostMessage(hWnd,WM_COMMAND,107,0);
00031 else PostMessage(hWnd,WM_COMMAND,105,0);
00032 }
00033 }