FilesAssociationBox.c File Reference

#include <ShlObj.h>
#include "FilesAssociationBox.h"

Include dependency graph for FilesAssociationBox.c:

Go to the source code of this file.

Defines

#define stricmp   _stricmp
#define PATH_MAX   512

Typedefs

typedef int(*) fptr (void)

Functions

BOOL CALLBACK FilesAssociationDlgProc (HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam)
BOOL ON_FILESASSOCIATIONBOX_WM_INITDIALOG (HWND hDlg, HWND hwndFocus, LPARAM lParam)
BOOL ON_FILESASSOCIATIONBOX_WM_COMMAND (HWND hwnd, int id, HWND hwndCtl, UINT codeNotify)
void ON_FILESASSOCIATIONBOX_WM_CLOSE (HWND hwnd)
BOOL TestRegistryKey (char *Key, char *ValueToCompare)
void InitCheckSCI (HWND hDlgParent)
void InitCheckSCE (HWND hDlgParent)
void InitCheckTST (HWND hDlgParent)
void InitCheckDEM (HWND hDlgParent)
void InitCheckCOS (HWND hDlgParent)
void InitCheckCOSF (HWND hDlgParent)
void InitCheckSAV (HWND hDlgParent)
void InitCheckBIN (HWND hDlgParent)
void InitCheckGRAPH (HWND hDlgParent)
void InitCheckGRAPHB (HWND hDlgParent)
BOOL InitCheckBox (HWND hDlgParent, char *extension)
void UpdateFromCheckBox (HWND hDlgParent, fptr Update, fptr Delete)
BOOL UpdateSCE (void)
BOOL UpdateSCI (void)
BOOL UpdateTST (void)
BOOL UpdateDEM (void)
BOOL UpdateCOS (void)
BOOL UpdateCOSF (void)
BOOL UpdateSAV (void)
BOOL UpdateBIN (void)
BOOL UpdateGRAPH (void)
BOOL UpdateGRAPHB (void)
BOOL UpdateAKey (char *Clef, char *line)
BOOL DeleteSCE (void)
BOOL DeleteSCI (void)
BOOL DeleteTST (void)
BOOL DeleteDEM (void)
BOOL DeleteCOS (void)
BOOL DeleteCOSF (void)
BOOL DeleteSAV (void)
BOOL DeleteBIN (void)
BOOL DeleteGRAPH (void)
BOOL DeleteGRAPHB (void)
BOOL DeleteAKey (char *Clef)
char * GetWhereIsThisExe (void)
BOOL IsWindowInterface (void)
LPTW GetTextWinScilab (void)
int GetCurrentLanguage (void)
EXPORT void WINAPI FilesAssociationBox (HWND hwnd)


Define Documentation

#define PATH_MAX   512

Definition at line 63 of file FilesAssociationBox.c.

#define stricmp   _stricmp

Definition at line 9 of file FilesAssociationBox.c.


Typedef Documentation

typedef int(*) fptr(void)

Definition at line 11 of file FilesAssociationBox.c.


Function Documentation

BOOL DeleteAKey ( char *  Clef  ) 

Definition at line 697 of file FilesAssociationBox.c.

References FALSE, and TRUE.

Referenced by DeleteBIN(), DeleteCOS(), DeleteCOSF(), DeleteDEM(), DeleteGRAPH(), DeleteGRAPHB(), DeleteSAV(), DeleteSCE(), DeleteSCI(), and DeleteTST().

00698 {
00699         BOOL bOK=TRUE;
00700 
00701         if ( SHDeleteKey(HKEY_CLASSES_ROOT,Clef) != ERROR_SUCCESS ) bOK=FALSE;
00702 
00703         return bOK;
00704 }

Here is the caller graph for this function:

BOOL DeleteBIN ( void   ) 

Definition at line 661 of file FilesAssociationBox.c.

References DeleteAKey().

Referenced by ON_FILESASSOCIATIONBOX_WM_COMMAND(), and UpdateBIN().

00662 {
00663         BOOL bOK[2];
00664 
00665         bOK[0]=DeleteAKey(".bin");
00666         bOK[1]=DeleteAKey("BIN_scilab_file");
00667         return (bOK[0] || bOK[1]);
00668 }

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL DeleteCOS ( void   ) 

Definition at line 643 of file FilesAssociationBox.c.

References DeleteAKey().

Referenced by ON_FILESASSOCIATIONBOX_WM_COMMAND(), and UpdateCOS().

00644 {
00645         BOOL bOK[2];
00646 
00647         bOK[0]=DeleteAKey(".cos");
00648         bOK[1]=DeleteAKey("COS_scilab_file");
00649         return (bOK[0] || bOK[1]);
00650 }

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL DeleteCOSF ( void   ) 

Definition at line 652 of file FilesAssociationBox.c.

References DeleteAKey().

Referenced by ON_FILESASSOCIATIONBOX_WM_COMMAND(), and UpdateCOSF().

00653 {
00654         BOOL bOK[2];
00655 
00656         bOK[0]=DeleteAKey(".cosf");
00657         bOK[1]=DeleteAKey("COSF_scilab_file");
00658         return (bOK[0] || bOK[1]);
00659 }

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL DeleteDEM ( void   ) 

Definition at line 634 of file FilesAssociationBox.c.

References DeleteAKey().

Referenced by ON_FILESASSOCIATIONBOX_WM_COMMAND(), and UpdateDEM().

00635 {
00636         BOOL bOK[2];
00637 
00638         bOK[0]=DeleteAKey(".dem");
00639         bOK[1]=DeleteAKey("DEM_scilab_file");
00640         return (bOK[0] || bOK[1]);
00641 }

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL DeleteGRAPH ( void   ) 

Definition at line 679 of file FilesAssociationBox.c.

References DeleteAKey().

Referenced by ON_FILESASSOCIATIONBOX_WM_COMMAND(), and UpdateGRAPH().

00680 {
00681         BOOL bOK[2];
00682 
00683         bOK[0]=DeleteAKey(".graph");
00684         bOK[1]=DeleteAKey("GRAPH_scilab_file");
00685         return (bOK[0] || bOK[1]);
00686 }

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL DeleteGRAPHB ( void   ) 

Definition at line 688 of file FilesAssociationBox.c.

References DeleteAKey().

Referenced by ON_FILESASSOCIATIONBOX_WM_COMMAND(), and UpdateGRAPHB().

00689 {
00690         BOOL bOK[2];
00691 
00692         bOK[0]=DeleteAKey(".graphb");
00693         bOK[1]=DeleteAKey("GRAPHB_scilab_file");
00694         return (bOK[0] || bOK[1]);
00695 }

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL DeleteSAV ( void   ) 

Definition at line 670 of file FilesAssociationBox.c.

References DeleteAKey().

Referenced by ON_FILESASSOCIATIONBOX_WM_COMMAND(), and UpdateSAV().

00671 {
00672         BOOL bOK[2];
00673 
00674         bOK[0]=DeleteAKey(".sav");
00675         bOK[1]=DeleteAKey("SAV_scilab_file");
00676         return (bOK[0] || bOK[1]);
00677 }

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL DeleteSCE ( void   ) 

Definition at line 607 of file FilesAssociationBox.c.

References DeleteAKey().

Referenced by ON_FILESASSOCIATIONBOX_WM_COMMAND(), and UpdateSCE().

00608 {
00609         BOOL bOK[2];
00610 
00611         bOK[0]=DeleteAKey(".sce");
00612         bOK[1]=DeleteAKey("SCE_scilab_file");
00613         return (bOK[0] || bOK[1]);
00614 }

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL DeleteSCI ( void   ) 

Definition at line 616 of file FilesAssociationBox.c.

References DeleteAKey().

Referenced by ON_FILESASSOCIATIONBOX_WM_COMMAND(), and UpdateSCI().

00617 {
00618         BOOL bOK[2];
00619 
00620         bOK[0]=DeleteAKey(".sci");
00621         bOK[1]=DeleteAKey("SCI_scilab_file");
00622         return (bOK[0] || bOK[1]);
00623 }

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL DeleteTST ( void   ) 

Definition at line 625 of file FilesAssociationBox.c.

References DeleteAKey().

Referenced by ON_FILESASSOCIATIONBOX_WM_COMMAND(), and UpdateTST().

00626 {
00627         BOOL bOK[2];
00628 
00629         bOK[0]=DeleteAKey(".tst");
00630         bOK[1]=DeleteAKey("TST_scilab_file");
00631         return (bOK[0] || bOK[1]);
00632 }

Here is the call graph for this function:

Here is the caller graph for this function:

EXPORT void WINAPI FilesAssociationBox ( HWND  hwnd  ) 

Definition at line 65 of file FilesAssociationBox.c.

References FilesAssociationDlgProc(), and IDD_FILEASSOCIATION.

Referenced by Callback_FILESASSOCIATIONBOX().

00066 {
00067         DLGPROC FilesAssociationDlgProc ;
00068 
00069         FilesAssociationDlgProc = (DLGPROC) GetProcAddress((HINSTANCE)GetModuleHandle("LibScilab"),"FilesAssociationDlgProc");
00070         DialogBox((HINSTANCE)GetModuleHandle("LibScilab"),(LPCSTR)IDD_FILEASSOCIATION,hwnd,FilesAssociationDlgProc) ;
00071 }

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL CALLBACK FilesAssociationDlgProc ( HWND  hDlg,
UINT  wMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 73 of file FilesAssociationBox.c.

References FALSE, ON_FILESASSOCIATIONBOX_WM_CLOSE(), ON_FILESASSOCIATIONBOX_WM_COMMAND(), ON_FILESASSOCIATIONBOX_WM_INITDIALOG(), and TRUE.

Referenced by FilesAssociationBox().

00074 {
00075         switch (wMsg)
00076         {
00077                 case WM_INITDIALOG:
00078                         return HANDLE_WM_INITDIALOG(hDlg,wParam,lParam,ON_FILESASSOCIATIONBOX_WM_INITDIALOG);
00079 
00080                 case WM_COMMAND:
00081                         return HANDLE_WM_COMMAND(hDlg,wParam,lParam,ON_FILESASSOCIATIONBOX_WM_COMMAND); 
00082 
00083                 case WM_CLOSE:
00084                         HANDLE_WM_DESTROY(hDlg,wParam,lParam,ON_FILESASSOCIATIONBOX_WM_CLOSE);
00085                         return TRUE;
00086         }
00087 
00088         return FALSE;
00089 }

Here is the call graph for this function:

Here is the caller graph for this function:

int GetCurrentLanguage ( void   ) 

Definition at line 2013 of file wtext.c.

Referenced by ON_FILESASSOCIATIONBOX_WM_INITDIALOG(), UpdateCOS(), UpdateCOSF(), UpdateDEM(), UpdateSCE(), UpdateSCI(), and UpdateTST().

02014 {
02015         int ReturnLanguage=0;
02016 
02017         if (IsWindowInterface())
02018         {
02019                 LPTW lptw=GetTextWinScilab();
02020                 int IHMLanguage=lptw->lpmw->CodeLanguage;
02021                 ReturnLanguage=IHMLanguage;
02022         }
02023         else
02024         {
02025                 int SCILanguague=GetLanguageCodeInScilabDotStar();
02026                 ReturnLanguage=SCILanguague;
02027         }
02028         
02029         return ReturnLanguage;
02030 }

Here is the caller graph for this function:

LPTW GetTextWinScilab ( void   ) 

Definition at line 10 of file TextWindows.c.

00011 {
00012         return &textwin;
00013 }

char * GetWhereIsThisExe ( void   ) 

Definition at line 706 of file FilesAssociationBox.c.

References MALLOC, MAX_PATH, and NULL.

Referenced by AppendMessageToLog(), CopyAtlas(), GetDLLFilenameAtlas(), InitCheckBIN(), InitCheckCOS(), InitCheckCOSF(), InitCheckDEM(), InitCheckGRAPH(), InitCheckGRAPHB(), InitCheckSAV(), InitCheckSCE(), InitCheckSCI(), InitCheckTST(), UpdateBIN(), UpdateCOS(), UpdateCOSF(), UpdateDEM(), UpdateGRAPH(), UpdateGRAPHB(), UpdateSAV(), UpdateSCE(), UpdateSCI(), and UpdateTST().

00707 {
00708         LPSTR tail;
00709         char *fullfilename=NULL;
00710         fullfilename=(char*)MALLOC(sizeof(char)*MAX_PATH);
00711 
00712         GetModuleFileName(GetModuleHandle(NULL),fullfilename,MAX_PATH);
00713 
00714         if ((tail = strrchr (fullfilename, '\\')) != (LPSTR) NULL)
00715                 {
00716                 tail++;
00717                 *tail = '\0';
00718                 }
00719 
00720         return (char*)fullfilename;
00721 }

Here is the caller graph for this function:

void InitCheckBIN ( HWND  hDlgParent  ) 

Definition at line 979 of file FilesAssociationBox.c.

References FREE, GetWhereIsThisExe(), IDC_CHECKBIN, path, PATH_MAX, TestRegistryKey(), UINT, and WSCILEX.

Referenced by InitCheckBox().

00980 {
00981         BOOL bOK[3];
00982         char Key[PATH_MAX];
00983         char GoodValue[PATH_MAX];
00984         char *path=GetWhereIsThisExe();
00985         HWND hControlCheckBoxBIN = GetDlgItem(hDlgParent, IDC_CHECKBIN );
00986 
00987         wsprintf(Key,"%s",".bin");
00988         wsprintf(GoodValue,"%s","BIN_scilab_file");
00989         bOK[0]=TestRegistryKey(Key,GoodValue);
00990 
00991         wsprintf(Key,"%s","BIN_scilab_file\\DefaultIcon");
00992         wsprintf(GoodValue,"\"%s%s\",3",path,WSCILEX);
00993         bOK[1]=TestRegistryKey(Key,GoodValue);
00994 
00995         wsprintf(Key,"%s","BIN_scilab_file\\shell\\open\\command");
00996         wsprintf(GoodValue,"\"%s%s\" -X \"%%1\"",path,WSCILEX);
00997         bOK[2]=TestRegistryKey(Key,GoodValue);
00998 
00999         if ( bOK[0] && bOK[1] && bOK[2] )
01000                 SendMessage(hControlCheckBoxBIN,(UINT) BM_SETCHECK,(WPARAM) BST_CHECKED,0);
01001         else
01002                 SendMessage(hControlCheckBoxBIN,(UINT) BM_SETCHECK,(WPARAM) BST_UNCHECKED,0);
01003 
01004         FREE(path);
01005 }

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL InitCheckBox ( HWND  hDlgParent,
char *  extension 
)

Definition at line 169 of file FilesAssociationBox.c.

References FALSE, InitCheckBIN(), InitCheckCOS(), InitCheckCOSF(), InitCheckDEM(), InitCheckGRAPH(), InitCheckGRAPHB(), InitCheckSAV(), InitCheckSCE(), InitCheckSCI(), InitCheckTST(), and TRUE.

Referenced by ON_FILESASSOCIATIONBOX_WM_INITDIALOG().

00170 {
00171         if ( strcmp(extension,".sci")==0 )
00172         {
00173                 InitCheckSCI(hDlgParent);
00174                 return TRUE;
00175         }
00176 
00177         if ( strcmp(extension,".sce")==0 )
00178         {
00179                 InitCheckSCE(hDlgParent);
00180                 return TRUE;
00181         }
00182 
00183         if ( strcmp(extension,".tst")==0 )
00184         {
00185                 InitCheckTST(hDlgParent);
00186                 return TRUE;
00187         }
00188 
00189         if ( strcmp(extension,".dem")==0 )
00190         {
00191                 InitCheckDEM(hDlgParent);
00192                 return TRUE;
00193         }
00194 
00195         if ( strcmp(extension,".cos")==0 )
00196         {
00197                 InitCheckCOS(hDlgParent);
00198                 return TRUE;
00199         }
00200 
00201         if ( strcmp(extension,".cosf")==0 )
00202         {
00203                 InitCheckCOSF(hDlgParent);
00204                 return TRUE;
00205         }
00206 
00207         if ( strcmp(extension,".graph")==0 )
00208         {
00209                 InitCheckGRAPH(hDlgParent);
00210                 return TRUE;
00211         }
00212 
00213         if ( strcmp(extension,".graphb")==0 )
00214         {
00215                 InitCheckGRAPHB(hDlgParent);
00216                 return TRUE;
00217         }
00218 
00219         if ( strcmp(extension,".bin")==0 )
00220         {
00221                 InitCheckBIN(hDlgParent);
00222                 return TRUE;
00223         }
00224 
00225         if ( strcmp(extension,".sav")==0 )
00226         {
00227                 InitCheckSAV(hDlgParent);
00228                 return TRUE;
00229         }
00230 
00231         return FALSE;   
00232 }

Here is the call graph for this function:

Here is the caller graph for this function:

void InitCheckCOS ( HWND  hDlgParent  ) 

Definition at line 883 of file FilesAssociationBox.c.

References FREE, GetWhereIsThisExe(), IDC_CHECKCOS, path, PATH_MAX, SCI_VERSION_STRING, TestRegistryKey(), UINT, and WSCILEX.

Referenced by InitCheckBox().

00884 {
00885         BOOL bOK[3];
00886         char Key[PATH_MAX];
00887         char KeyENG[PATH_MAX];
00888         char KeyFR[PATH_MAX];
00889         char GoodValue[PATH_MAX];
00890         char *path=GetWhereIsThisExe();
00891         HWND hControlCheckBoxCOS = GetDlgItem(hDlgParent, IDC_CHECKCOS );
00892 
00893         wsprintf(Key,"%s",".cos");
00894         wsprintf(GoodValue,"%s","COS_scilab_file");
00895         bOK[0]=TestRegistryKey(Key,GoodValue);
00896 
00897         wsprintf(Key,"%s","COS_scilab_file\\DefaultIcon");
00898         wsprintf(GoodValue,"\"%s%s\",4",path,WSCILEX);
00899         bOK[1]=TestRegistryKey(Key,GoodValue);
00900 
00901         wsprintf(KeyFR,"COS_scilab_file\\shell\\Executer avec %s\\command",SCI_VERSION_STRING);
00902         wsprintf(KeyENG,"COS_scilab_file\\shell\\Run with %s\\command",SCI_VERSION_STRING);
00903         wsprintf(GoodValue,"\"%s%s\" -X \"%%1\"",path,WSCILEX);
00904         bOK[2]=TestRegistryKey(KeyENG,GoodValue);
00905         if (!bOK[2]) bOK[2]=TestRegistryKey(KeyFR,GoodValue);
00906         
00907         if ( bOK[0] && bOK[1] && bOK[2])
00908                 SendMessage(hControlCheckBoxCOS,(UINT) BM_SETCHECK,(WPARAM) BST_CHECKED,0);
00909         else
00910                 SendMessage(hControlCheckBoxCOS,(UINT) BM_SETCHECK,(WPARAM) BST_UNCHECKED,0);
00911 
00912         FREE(path);
00913 }

Here is the call graph for this function:

Here is the caller graph for this function:

void InitCheckCOSF ( HWND  hDlgParent  ) 

Definition at line 915 of file FilesAssociationBox.c.

References FREE, GetWhereIsThisExe(), IDC_CHECKCOSF, path, PATH_MAX, SCI_VERSION_STRING, TestRegistryKey(), UINT, and WSCILEX.

Referenced by InitCheckBox().

00916 {
00917         BOOL bOK[4];
00918         char Key[PATH_MAX];
00919         char KeyENG[PATH_MAX];
00920         char KeyFR[PATH_MAX];
00921         char GoodValue[PATH_MAX];
00922         char *path=GetWhereIsThisExe();
00923         HWND hControlCheckBoxCOSF = GetDlgItem(hDlgParent, IDC_CHECKCOSF );
00924 
00925         wsprintf(Key,"%s",".cosf");
00926         wsprintf(GoodValue,"%s","COSF_scilab_file");
00927         bOK[0]=TestRegistryKey(Key,GoodValue);
00928 
00929         wsprintf(Key,"%s","COSF_scilab_file\\DefaultIcon");
00930         wsprintf(GoodValue,"\"%s%s\",5",path,WSCILEX);
00931         bOK[1]=TestRegistryKey(Key,GoodValue);
00932 
00933         wsprintf(Key,"%s","COSF_scilab_file\\shell\\open\\command");
00934         wsprintf(GoodValue,"\"%s%s\" -O \"%%1\"",path,WSCILEX);
00935         bOK[2]=TestRegistryKey(Key,GoodValue);
00936 
00937         wsprintf(KeyFR,"COSF_scilab_file\\shell\\Executer avec %s\\command",SCI_VERSION_STRING);
00938         wsprintf(KeyENG,"COSF_scilab_file\\shell\\Run with %s\\command",SCI_VERSION_STRING);
00939         wsprintf(GoodValue,"\"%s%s\" -X \"%%1\"",path,WSCILEX);
00940         bOK[3]=TestRegistryKey(KeyENG,GoodValue);
00941         if (!bOK[3]) bOK[3]=TestRegistryKey(KeyFR,GoodValue);
00942         
00943         if ( bOK[0] && bOK[1] && bOK[2] && bOK[3])
00944                 SendMessage(hControlCheckBoxCOSF,(UINT) BM_SETCHECK,(WPARAM) BST_CHECKED,0);
00945         else
00946                 SendMessage(hControlCheckBoxCOSF,(UINT) BM_SETCHECK,(WPARAM) BST_UNCHECKED,0);
00947 
00948         FREE(path);
00949 }

Here is the call graph for this function:

Here is the caller graph for this function:

void InitCheckDEM ( HWND  hDlgParent  ) 

Definition at line 843 of file FilesAssociationBox.c.

References FREE, GetWhereIsThisExe(), IDC_CHECKDEM, path, PATH_MAX, SCI_VERSION_STRING, TestRegistryKey(), UINT, and WSCILEX.

Referenced by InitCheckBox().

00844 {
00845         BOOL bOK[5];
00846         char Key[PATH_MAX];
00847         char KeyENG[PATH_MAX];
00848         char KeyFR[PATH_MAX];
00849         char GoodValue[PATH_MAX];
00850         char *path=GetWhereIsThisExe();
00851         HWND hControlCheckBoxDEM = GetDlgItem(hDlgParent, IDC_CHECKDEM );
00852 
00853         wsprintf(Key,"%s",".dem");
00854         wsprintf(GoodValue,"%s","DEM_scilab_file");
00855         bOK[0]=TestRegistryKey(Key,GoodValue);
00856 
00857         wsprintf(Key,"%s","DEM_scilab_file\\DefaultIcon");
00858         wsprintf(GoodValue,"\"%s%s\",6",path,WSCILEX);
00859         bOK[1]=TestRegistryKey(Key,GoodValue);
00860 
00861         wsprintf(Key,"%s","DEM_scilab_file\\shell\\open\\command");
00862         wsprintf(GoodValue,"\"%s%s\" -O \"%%1\"",path,WSCILEX);
00863         bOK[2]=TestRegistryKey(Key,GoodValue);
00864 
00865         wsprintf(KeyFR,"DEM_scilab_file\\shell\\Executer avec %s\\command",SCI_VERSION_STRING);
00866         wsprintf(KeyENG,"DEM_scilab_file\\shell\\Run with %s\\command",SCI_VERSION_STRING);
00867         wsprintf(GoodValue,"\"%s%s\" -X \"%%1\"",path,WSCILEX);
00868         bOK[3]=TestRegistryKey(KeyENG,GoodValue);
00869         if (!bOK[3]) bOK[3]=TestRegistryKey(KeyFR,GoodValue);
00870 
00871         wsprintf(Key,"%s","DEM_scilab_file\\shell\\print\\command");
00872         wsprintf(GoodValue,"\"%s%s\" -P \"%%1\"",path,WSCILEX);
00873         bOK[4]=TestRegistryKey(Key,GoodValue);
00874 
00875         if ( bOK[0] && bOK[1] && bOK[2] && bOK[3] && bOK[4])
00876                 SendMessage(hControlCheckBoxDEM,(UINT) BM_SETCHECK,(WPARAM) BST_CHECKED,0);
00877         else
00878                 SendMessage(hControlCheckBoxDEM,(UINT) BM_SETCHECK,(WPARAM) BST_UNCHECKED,0);
00879 
00880         FREE(path);
00881 }

Here is the call graph for this function:

Here is the caller graph for this function:

void InitCheckGRAPH ( HWND  hDlgParent  ) 

Definition at line 1007 of file FilesAssociationBox.c.

References FREE, GetWhereIsThisExe(), IDC_CHECKGRAPH, path, PATH_MAX, TestRegistryKey(), UINT, and WSCILEX.

Referenced by InitCheckBox().

01008 {
01009         BOOL bOK[3];
01010         char Key[PATH_MAX];
01011         char GoodValue[PATH_MAX];
01012         char *path=GetWhereIsThisExe();
01013         HWND hControlCheckBoxGRAPH = GetDlgItem(hDlgParent, IDC_CHECKGRAPH );
01014 
01015         wsprintf(Key,"%s",".graph");
01016         wsprintf(GoodValue,"%s","GRAPH_scilab_file");
01017         bOK[0]=TestRegistryKey(Key,GoodValue);
01018 
01019         wsprintf(Key,"%s","GRAPH_scilab_file\\DefaultIcon");
01020         wsprintf(GoodValue,"\"%s%s\",7",path,WSCILEX);
01021         bOK[1]=TestRegistryKey(Key,GoodValue);
01022 
01023         wsprintf(Key,"%s","GRAPH_scilab_file\\shell\\open\\command");
01024         wsprintf(GoodValue,"\"%s%s\" -X \"%%1\"",path,WSCILEX);
01025         bOK[2]=TestRegistryKey(Key,GoodValue);
01026 
01027         if ( bOK[0] && bOK[1] && bOK[2] )
01028                 SendMessage(hControlCheckBoxGRAPH,(UINT) BM_SETCHECK,(WPARAM) BST_CHECKED,0);
01029         else
01030                 SendMessage(hControlCheckBoxGRAPH,(UINT) BM_SETCHECK,(WPARAM) BST_UNCHECKED,0);
01031 
01032         FREE(path);
01033 }

Here is the call graph for this function:

Here is the caller graph for this function:

void InitCheckGRAPHB ( HWND  hDlgParent  ) 

Definition at line 1035 of file FilesAssociationBox.c.

References FREE, GetWhereIsThisExe(), IDC_CHECKGRAPHB, path, PATH_MAX, TestRegistryKey(), UINT, and WSCILEX.

Referenced by InitCheckBox().

01036 {
01037         BOOL bOK[3];
01038         char Key[PATH_MAX];
01039         char GoodValue[PATH_MAX];
01040         char *path=GetWhereIsThisExe();
01041         HWND hControlCheckBoxGRAPHB = GetDlgItem(hDlgParent, IDC_CHECKGRAPHB );
01042 
01043         wsprintf(Key,"%s",".graphb");
01044         wsprintf(GoodValue,"%s","GRAPHB_scilab_file");
01045         bOK[0]=TestRegistryKey(Key,GoodValue);
01046 
01047         wsprintf(Key,"%s","GRAPHB_scilab_file\\DefaultIcon");
01048         wsprintf(GoodValue,"\"%s%s\",7",path,WSCILEX);
01049         bOK[1]=TestRegistryKey(Key,GoodValue);
01050 
01051         wsprintf(Key,"%s","GRAPHB_scilab_file\\shell\\open\\command");
01052         wsprintf(GoodValue,"\"%s%s\" -X \"%%1\"",path,WSCILEX);
01053         bOK[2]=TestRegistryKey(Key,GoodValue);
01054 
01055         if ( bOK[0] && bOK[1] && bOK[2] )
01056                 SendMessage(hControlCheckBoxGRAPHB,(UINT) BM_SETCHECK,(WPARAM) BST_CHECKED,0);
01057         else
01058                 SendMessage(hControlCheckBoxGRAPHB,(UINT) BM_SETCHECK,(WPARAM) BST_UNCHECKED,0);
01059 
01060         FREE(path);
01061 }

Here is the call graph for this function:

Here is the caller graph for this function:

void InitCheckSAV ( HWND  hDlgParent  ) 

Definition at line 951 of file FilesAssociationBox.c.

References FREE, GetWhereIsThisExe(), IDC_CHECKSAV, path, PATH_MAX, TestRegistryKey(), UINT, and WSCILEX.

Referenced by InitCheckBox().

00952 {
00953         BOOL bOK[3];
00954         char Key[PATH_MAX];
00955         char GoodValue[PATH_MAX];
00956         char *path=GetWhereIsThisExe();
00957         HWND hControlCheckBoxSAV = GetDlgItem(hDlgParent, IDC_CHECKSAV );
00958 
00959         wsprintf(Key,"%s",".sav");
00960         wsprintf(GoodValue,"%s","SAV_scilab_file");
00961         bOK[0]=TestRegistryKey(Key,GoodValue);
00962 
00963         wsprintf(Key,"%s","SAV_scilab_file\\DefaultIcon");
00964         wsprintf(GoodValue,"\"%s%s\",8",path,WSCILEX);
00965         bOK[1]=TestRegistryKey(Key,GoodValue);
00966 
00967         wsprintf(Key,"%s","SAV_scilab_file\\shell\\open\\command");
00968         wsprintf(GoodValue,"\"%s%s\" -X \"%%1\"",path,WSCILEX);
00969         bOK[2]=TestRegistryKey(Key,GoodValue);
00970 
00971         if ( bOK[0] && bOK[1] && bOK[2] )
00972                 SendMessage(hControlCheckBoxSAV,(UINT) BM_SETCHECK,(WPARAM) BST_CHECKED,0);
00973         else
00974                 SendMessage(hControlCheckBoxSAV,(UINT) BM_SETCHECK,(WPARAM) BST_UNCHECKED,0);
00975 
00976         FREE(path);
00977 }

Here is the call graph for this function:

Here is the caller graph for this function:

void InitCheckSCE ( HWND  hDlgParent  ) 

Definition at line 763 of file FilesAssociationBox.c.

References FREE, GetWhereIsThisExe(), IDC_CHECKSCE, path, PATH_MAX, SCI_VERSION_STRING, TestRegistryKey(), UINT, and WSCILEX.

Referenced by InitCheckBox().

00764 {
00765         BOOL bOK[5];
00766         char Key[PATH_MAX];
00767         char KeyENG[PATH_MAX];
00768         char KeyFR[PATH_MAX];
00769         char GoodValue[PATH_MAX];
00770         char *path=GetWhereIsThisExe();
00771         HWND hControlCheckBoxSCE = GetDlgItem(hDlgParent, IDC_CHECKSCE );
00772 
00773         wsprintf(Key,"%s",".sce");
00774         wsprintf(GoodValue,"%s","SCE_scilab_file");
00775         bOK[0]=TestRegistryKey(Key,GoodValue);
00776 
00777         wsprintf(Key,"%s","SCE_scilab_file\\DefaultIcon");
00778         wsprintf(GoodValue,"\"%s%s\",9",path,WSCILEX);
00779         bOK[1]=TestRegistryKey(Key,GoodValue);
00780 
00781         wsprintf(Key,"%s","SCE_scilab_file\\shell\\open\\command");
00782         wsprintf(GoodValue,"\"%s%s\" -O \"%%1\"",path,WSCILEX);
00783         bOK[2]=TestRegistryKey(Key,GoodValue);
00784 
00785         wsprintf(KeyFR,"SCE_scilab_file\\shell\\Executer avec %s\\command",SCI_VERSION_STRING);
00786         wsprintf(KeyENG,"SCE_scilab_file\\shell\\Run with %s\\command",SCI_VERSION_STRING);
00787         wsprintf(GoodValue,"\"%s%s\" -X \"%%1\"",path,WSCILEX);
00788         bOK[3]=TestRegistryKey(KeyENG,GoodValue);
00789         if (!bOK[3]) bOK[3]=TestRegistryKey(KeyFR,GoodValue);
00790 
00791         wsprintf(Key,"%s","SCE_scilab_file\\shell\\print\\command");
00792         wsprintf(GoodValue,"\"%s%s\" -P \"%%1\"",path,WSCILEX);
00793         bOK[4]=TestRegistryKey(Key,GoodValue);
00794 
00795         if ( bOK[0] && bOK[1] && bOK[2] && bOK[3] && bOK[4])
00796                 SendMessage(hControlCheckBoxSCE,(UINT) BM_SETCHECK,(WPARAM) BST_CHECKED,0);
00797         else
00798                 SendMessage(hControlCheckBoxSCE,(UINT) BM_SETCHECK,(WPARAM) BST_UNCHECKED,0);
00799 
00800         FREE(path);
00801 }

Here is the call graph for this function:

Here is the caller graph for this function:

void InitCheckSCI ( HWND  hDlgParent  ) 

Definition at line 723 of file FilesAssociationBox.c.

References FREE, GetWhereIsThisExe(), IDC_CHECKSCI, path, PATH_MAX, SCI_VERSION_STRING, TestRegistryKey(), UINT, and WSCILEX.

Referenced by InitCheckBox().

00724 {
00725         BOOL bOK[5];
00726         char Key[PATH_MAX];
00727         char KeyENG[PATH_MAX];
00728         char KeyFR[PATH_MAX];
00729         char GoodValue[PATH_MAX];
00730         char *path=GetWhereIsThisExe();
00731         HWND hControlCheckBoxSCI = GetDlgItem(hDlgParent, IDC_CHECKSCI );
00732 
00733         wsprintf(Key,"%s",".sci");
00734         wsprintf(GoodValue,"%s","SCI_scilab_file");
00735         bOK[0]=TestRegistryKey(Key,GoodValue);
00736 
00737         wsprintf(Key,"%s","SCI_scilab_file\\DefaultIcon");
00738         wsprintf(GoodValue,"\"%s%s\",10",path,WSCILEX);
00739         bOK[1]=TestRegistryKey(Key,GoodValue);
00740 
00741         wsprintf(Key,"%s","SCI_scilab_file\\shell\\open\\command");
00742         wsprintf(GoodValue,"\"%s%s\" -O \"%%1\"",path,WSCILEX);
00743         bOK[2]=TestRegistryKey(Key,GoodValue);
00744 
00745         wsprintf(KeyFR,"SCI_scilab_file\\shell\\Executer avec %s\\command",SCI_VERSION_STRING);
00746         wsprintf(KeyENG,"SCI_scilab_file\\shell\\Run with %s\\command",SCI_VERSION_STRING);
00747         wsprintf(GoodValue,"\"%s%s\" -X \"%%1\"",path,WSCILEX);
00748         bOK[3]=TestRegistryKey(KeyENG,GoodValue);
00749     if (!bOK[3]) bOK[3]=TestRegistryKey(KeyFR,GoodValue);
00750 
00751         wsprintf(Key,"%s","SCI_scilab_file\\shell\\print\\command");
00752         wsprintf(GoodValue,"\"%s%s\" -P \"%%1\"",path,WSCILEX);
00753         bOK[4]=TestRegistryKey(Key,GoodValue);
00754 
00755         if ( bOK[0] && bOK[1] && bOK[2] && bOK[3] && bOK[4])
00756                 SendMessage(hControlCheckBoxSCI,(UINT) BM_SETCHECK,(WPARAM) BST_CHECKED,0);
00757         else
00758                 SendMessage(hControlCheckBoxSCI,(UINT) BM_SETCHECK,(WPARAM) BST_UNCHECKED,0);
00759 
00760         FREE(path);
00761 }

Here is the call graph for this function:

Here is the caller graph for this function:

void InitCheckTST ( HWND  hDlgParent  ) 

Definition at line 803 of file FilesAssociationBox.c.

References FREE, GetWhereIsThisExe(), IDC_CHECKTST, path, PATH_MAX, SCI_VERSION_STRING, TestRegistryKey(), UINT, and WSCILEX.

Referenced by InitCheckBox().

00804 {
00805         BOOL bOK[5];
00806         char Key[PATH_MAX];
00807         char KeyENG[PATH_MAX];
00808         char KeyFR[PATH_MAX];
00809         char GoodValue[PATH_MAX];
00810         char *path=GetWhereIsThisExe();
00811         HWND hControlCheckBoxTST = GetDlgItem(hDlgParent, IDC_CHECKTST );
00812 
00813         wsprintf(Key,"%s",".tst");
00814         wsprintf(GoodValue,"%s","TST_scilab_file");
00815         bOK[0]=TestRegistryKey(Key,GoodValue);
00816 
00817         wsprintf(Key,"%s","TST_scilab_file\\DefaultIcon");
00818         wsprintf(GoodValue,"\"%s%s\",11",path,WSCILEX);
00819         bOK[1]=TestRegistryKey(Key,GoodValue);
00820 
00821         wsprintf(Key,"%s","TST_scilab_file\\shell\\open\\command");
00822         wsprintf(GoodValue,"\"%s%s\" -O \"%%1\"",path,WSCILEX);
00823         bOK[2]=TestRegistryKey(Key,GoodValue);
00824 
00825         wsprintf(KeyFR,"TST_scilab_file\\shell\\Executer avec %s\\command",SCI_VERSION_STRING);
00826         wsprintf(KeyENG,"TST_scilab_file\\shell\\Run with %s\\command",SCI_VERSION_STRING);
00827         wsprintf(GoodValue,"\"%s%s\" -X \"%%1\"",path,WSCILEX);
00828         bOK[3]=TestRegistryKey(KeyENG,GoodValue);
00829         if (!bOK[3]) bOK[3]=TestRegistryKey(KeyFR,GoodValue);
00830 
00831         wsprintf(Key,"%s","TST_scilab_file\\shell\\print\\command");
00832         wsprintf(GoodValue,"\"%s%s\" -P \"%%1\"",path,WSCILEX);
00833         bOK[4]=TestRegistryKey(Key,GoodValue);
00834 
00835         if ( bOK[0] && bOK[1] && bOK[2] && bOK[3] && bOK[4])
00836                 SendMessage(hControlCheckBoxTST,(UINT) BM_SETCHECK,(WPARAM) BST_CHECKED,0);
00837         else
00838                 SendMessage(hControlCheckBoxTST,(UINT) BM_SETCHECK,(WPARAM) BST_UNCHECKED,0);
00839 
00840         FREE(path);
00841 }

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL IsWindowInterface ( void   ) 

Definition at line 127 of file WinConsole.c.

00128 {
00129         return WindowMode;
00130 }

void ON_FILESASSOCIATIONBOX_WM_CLOSE ( HWND  hwnd  ) 

Definition at line 164 of file FilesAssociationBox.c.

References L.

Referenced by FilesAssociationDlgProc().

00165 {
00166         EndDialog (hwnd, 0L);
00167 }

Here is the caller graph for this function:

BOOL ON_FILESASSOCIATIONBOX_WM_COMMAND ( HWND  hwnd,
int  id,
HWND  hwndCtl,
UINT  codeNotify 
)

Definition at line 120 of file FilesAssociationBox.c.

References DeleteBIN(), DeleteCOS(), DeleteCOSF(), DeleteDEM(), DeleteGRAPH(), DeleteGRAPHB(), DeleteSAV(), DeleteSCE(), DeleteSCI(), DeleteTST(), FALSE, IDC_CHECKBIN, IDC_CHECKCOS, IDC_CHECKCOSF, IDC_CHECKDEM, IDC_CHECKGRAPH, IDC_CHECKGRAPHB, IDC_CHECKSAV, IDC_CHECKSCE, IDC_CHECKSCI, IDC_CHECKTST, NULL, TRUE, UpdateBIN(), UpdateCOS(), UpdateCOSF(), UpdateDEM(), UpdateFromCheckBox(), UpdateGRAPH(), UpdateGRAPHB(), UpdateSAV(), UpdateSCE(), UpdateSCI(), and UpdateTST().

Referenced by FilesAssociationDlgProc().

00121 {
00122         switch (id)
00123         {
00124                 case IDOK:
00125                 {
00126                         HWND hControl[10];
00127                         hControl[0] = GetDlgItem(hwnd, IDC_CHECKSCI);
00128                         hControl[1] = GetDlgItem(hwnd, IDC_CHECKSCE);
00129                         hControl[2] = GetDlgItem(hwnd, IDC_CHECKTST);
00130                         hControl[3] = GetDlgItem(hwnd, IDC_CHECKDEM);
00131                         hControl[4] = GetDlgItem(hwnd, IDC_CHECKCOS);
00132                         hControl[5] = GetDlgItem(hwnd, IDC_CHECKCOSF);
00133                         hControl[6] = GetDlgItem(hwnd, IDC_CHECKBIN);
00134                         hControl[7] = GetDlgItem(hwnd, IDC_CHECKSAV);
00135                         hControl[8] = GetDlgItem(hwnd, IDC_CHECKGRAPH);
00136                         hControl[9] = GetDlgItem(hwnd, IDC_CHECKGRAPHB);
00137 
00138                         UpdateFromCheckBox(hControl[0],&UpdateSCI,&DeleteSCI);
00139                         UpdateFromCheckBox(hControl[1],&UpdateSCE,&DeleteSCE);
00140                         UpdateFromCheckBox(hControl[2],&UpdateTST,&DeleteTST);
00141                         UpdateFromCheckBox(hControl[3],&UpdateDEM,&DeleteDEM);
00142                         UpdateFromCheckBox(hControl[4],&UpdateCOS,&DeleteCOS);
00143                         UpdateFromCheckBox(hControl[5],&UpdateCOSF,&DeleteCOSF);
00144                         UpdateFromCheckBox(hControl[6],&UpdateBIN,&DeleteBIN);
00145                         UpdateFromCheckBox(hControl[7],&UpdateSAV,&DeleteSAV);
00146                         UpdateFromCheckBox(hControl[8],&UpdateGRAPH,&DeleteGRAPH);
00147                         UpdateFromCheckBox(hControl[9],&UpdateGRAPHB,&DeleteGRAPHB);
00148 
00149                         SHChangeNotify(SHCNE_ASSOCCHANGED,SHCNF_IDLIST,NULL,NULL);
00150 
00151                         EndDialog(hwnd, IDOK);
00152                         return TRUE;
00153                 }
00154 
00155                 case IDCANCEL:
00156                 {
00157                         EndDialog(hwnd, IDCANCEL);
00158                         return TRUE;
00159                 }
00160         }
00161         return FALSE;
00162 }

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL ON_FILESASSOCIATIONBOX_WM_INITDIALOG ( HWND  hDlg,
HWND  hwndFocus,
LPARAM  lParam 
)

Definition at line 91 of file FilesAssociationBox.c.

References GetCurrentLanguage(), InitCheckBox(), and TRUE.

Referenced by FilesAssociationDlgProc().

00092 {
00093         int CodeLanguage=GetCurrentLanguage();
00094         
00095         switch (CodeLanguage)
00096         {
00097                 case 0:default:
00098                         SetWindowText(hDlg,"File's Association");
00099                 break;
00100 
00101                 case 1:
00102                 SetWindowText(hDlg,"Association des fichiers");
00103                 break;
00104         }
00105 
00106         InitCheckBox(hDlg,".sci");
00107         InitCheckBox(hDlg,".sce");
00108         InitCheckBox(hDlg,".tst");
00109         InitCheckBox(hDlg,".dem");
00110         InitCheckBox(hDlg,".cos");
00111         InitCheckBox(hDlg,".cosf");
00112         InitCheckBox(hDlg,".sav");
00113         InitCheckBox(hDlg,".bin");
00114         InitCheckBox(hDlg,".graph");
00115         InitCheckBox(hDlg,".graphb");
00116 
00117         return TRUE;
00118 }

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL TestRegistryKey ( char *  Key,
char *  ValueToCompare 
)

Definition at line 234 of file FilesAssociationBox.c.

References FALSE, Length(), MAX_PATH, NULL, stricmp, and TRUE.

Referenced by InitCheckBIN(), InitCheckCOS(), InitCheckCOSF(), InitCheckDEM(), InitCheckGRAPH(), InitCheckGRAPHB(), InitCheckSAV(), InitCheckSCE(), InitCheckSCI(), and InitCheckTST().

00235 {
00236         BOOL bOK=TRUE;
00237         HKEY key;
00238         DWORD Length=MAX_PATH;
00239 
00240         if ( RegOpenKeyEx(HKEY_CLASSES_ROOT, Key, 0, KEY_QUERY_VALUE , &key) == ERROR_SUCCESS )
00241         {
00242                 char Line[MAX_PATH];
00243                 if ( RegQueryValueEx(key,"", NULL, NULL, (LPBYTE)&Line, &Length) != ERROR_SUCCESS )
00244                 {
00245                         bOK=FALSE;
00246                 }
00247                 else
00248                 {
00249                         if ( stricmp(Line,ValueToCompare) != 0 ) bOK=FALSE;
00250                 }
00251                 RegCloseKey(key);
00252 
00253         }
00254         else bOK=FALSE;
00255 
00256         return bOK;
00257 }

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL UpdateAKey ( char *  Clef,
char *  line 
)

Definition at line 590 of file FilesAssociationBox.c.

References FALSE, NULL, result, and TRUE.

Referenced by UpdateBIN(), UpdateCOS(), UpdateCOSF(), UpdateDEM(), UpdateGRAPH(), UpdateGRAPHB(), UpdateSAV(), UpdateSCE(), UpdateSCI(), and UpdateTST().

00591 {
00592         HKEY key;
00593         DWORD result=0;
00594         BOOL bOK=TRUE;
00595 
00596         if ( RegCreateKeyEx(HKEY_CLASSES_ROOT, Clef, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &key, &result) == ERROR_SUCCESS ) 
00597                 {
00598                         if ( RegSetValueEx(key, "", 0, REG_SZ, (LPBYTE)line, (DWORD)(strlen(line)+1)) != ERROR_SUCCESS ) bOK=FALSE;
00599                         RegFlushKey(key);
00600                         RegCloseKey(key);
00601                 }
00602         else bOK=FALSE;
00603 
00604         return bOK;
00605 }

Here is the caller graph for this function:

BOOL UpdateBIN ( void   ) 

Definition at line 527 of file FilesAssociationBox.c.

References DeleteBIN(), FREE, GetWhereIsThisExe(), path, TRUE, UpdateAKey(), and WSCILEX.

Referenced by ON_FILESASSOCIATIONBOX_WM_COMMAND().

00528 {
00529         BOOL bOK=TRUE;
00530         char Line[512];
00531         char *path=GetWhereIsThisExe();
00532 
00533         DeleteBIN();
00534 
00535         bOK=UpdateAKey(".bin","BIN_scilab_file");
00536         if (bOK) bOK=UpdateAKey("BIN_scilab_file","BIN_scilab_file");
00537 
00538         wsprintf(Line,"\"%s%s\",3",path,WSCILEX);
00539         if (bOK) bOK=UpdateAKey("BIN_scilab_file\\DefaultIcon",Line);
00540 
00541         wsprintf(Line,"\"%s%s\" -X \"%%1\"",path,WSCILEX);
00542         if (bOK) bOK=UpdateAKey("BIN_scilab_file\\shell\\open\\command",Line);
00543 
00544         FREE(path);
00545         return bOK;
00546 }

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL UpdateCOS ( void   ) 

Definition at line 435 of file FilesAssociationBox.c.

References DeleteCOS(), FREE, GetCurrentLanguage(), GetWhereIsThisExe(), path, SCI_VERSION_STRING, TRUE, UpdateAKey(), and WSCILEX.

Referenced by ON_FILESASSOCIATIONBOX_WM_COMMAND().

00436 {
00437         BOOL bOK=TRUE;
00438         char Line[512];
00439         char *path=GetWhereIsThisExe();
00440         int Language=GetCurrentLanguage();
00441         char KeyRegistryWithLanguage[1024];
00442 
00443         DeleteCOS();
00444 
00445         bOK=UpdateAKey(".cos","COS_scilab_file");
00446         if (bOK) bOK=UpdateAKey("COS_scilab_file","COS_scilab_file");
00447 
00448         wsprintf(Line,"\"%s%s\",4",path,WSCILEX);
00449         if (bOK) bOK=UpdateAKey("COS_scilab_file\\DefaultIcon",Line);
00450 
00451         wsprintf(Line,"\"%s%s\" -X \"%%1\"",path,WSCILEX);
00452         switch (Language)
00453         {
00454         case 1:
00455                 wsprintf(KeyRegistryWithLanguage,"COS_scilab_file\\shell\\Executer avec %s\\command",SCI_VERSION_STRING);
00456                 break;
00457 
00458         default :case 0:
00459                 wsprintf(KeyRegistryWithLanguage,"COS_scilab_file\\shell\\Run with %s\\command",SCI_VERSION_STRING);
00460                 break;
00461         }
00462         if (bOK) bOK=UpdateAKey(KeyRegistryWithLanguage,Line);
00463 
00464 
00465         FREE(path);
00466         return bOK;
00467 }

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL UpdateCOSF ( void   ) 

Definition at line 469 of file FilesAssociationBox.c.

References DeleteCOSF(), FREE, GetCurrentLanguage(), GetWhereIsThisExe(), path, SCI_VERSION_STRING, TRUE, UpdateAKey(), and WSCILEX.

Referenced by ON_FILESASSOCIATIONBOX_WM_COMMAND().

00470 {
00471         BOOL bOK=TRUE;
00472         char Line[512];
00473         char *path=GetWhereIsThisExe();
00474         int Language=GetCurrentLanguage();
00475         char KeyRegistryWithLanguage[1024];
00476 
00477         DeleteCOSF();
00478 
00479         bOK=UpdateAKey(".cosf","COSF_scilab_file");
00480         if (bOK) bOK=UpdateAKey("COSF_scilab_file","COSF_scilab_file");
00481 
00482         wsprintf(Line,"\"%s%s\",5",path,WSCILEX);
00483         if (bOK) bOK=UpdateAKey("COSF_scilab_file\\DefaultIcon",Line);
00484 
00485         wsprintf(Line,"\"%s%s\" -O \"%%1\"",path,WSCILEX);
00486         if (bOK) bOK=UpdateAKey("COSF_scilab_file\\shell\\open\\command",Line);
00487 
00488         wsprintf(Line,"\"%s%s\" -X \"%%1\"",path,WSCILEX);
00489         switch (Language)
00490         {
00491         case 1:
00492                 wsprintf(KeyRegistryWithLanguage,"COSF_scilab_file\\shell\\Executer avec %s\\command",SCI_VERSION_STRING);
00493                 break;
00494 
00495         default :case 0:
00496                 wsprintf(KeyRegistryWithLanguage,"COSF_scilab_file\\shell\\Run with %s\\command",SCI_VERSION_STRING);
00497                 break;
00498         }
00499         if (bOK) bOK=UpdateAKey(KeyRegistryWithLanguage,Line);
00500 
00501 
00502         FREE(path);
00503         return bOK;
00504 }

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL UpdateDEM ( void   ) 

Definition at line 395 of file FilesAssociationBox.c.

References DeleteDEM(), FREE, GetCurrentLanguage(), GetWhereIsThisExe(), path, SCI_VERSION_STRING, TRUE, UpdateAKey(), and WSCILEX.

Referenced by ON_FILESASSOCIATIONBOX_WM_COMMAND().

00396 {
00397         BOOL bOK=TRUE;
00398         char Line[512];
00399         char *path=GetWhereIsThisExe();
00400         int Language=GetCurrentLanguage();
00401         char KeyRegistryWithLanguage[1024];
00402 
00403         DeleteDEM();
00404 
00405         bOK=UpdateAKey(".dem","DEM_scilab_file");
00406         if (bOK) bOK=UpdateAKey("DEM_scilab_file","DEM_scilab_file");
00407 
00408         wsprintf(Line,"\"%s%s\",6",path,WSCILEX);
00409         if (bOK) bOK=UpdateAKey("DEM_scilab_file\\DefaultIcon",Line);
00410 
00411         wsprintf(Line,"\"%s%s\" -O \"%%1\"",path,WSCILEX);
00412         if (bOK) bOK=UpdateAKey("DEM_scilab_file\\shell\\open\\command",Line);
00413 
00414         wsprintf(Line,"\"%s%s\" -X \"%%1\"",path,WSCILEX);
00415         switch (Language)
00416         {
00417         case 1:
00418                 wsprintf(KeyRegistryWithLanguage,"DEM_scilab_file\\shell\\Executer avec %s\\command",SCI_VERSION_STRING);
00419                 break;
00420 
00421         default :case 0:
00422                 wsprintf(KeyRegistryWithLanguage,"DEM_scilab_file\\shell\\Run with %s\\command",SCI_VERSION_STRING);
00423                 break;
00424         }
00425         if (bOK) bOK=UpdateAKey(KeyRegistryWithLanguage,Line);
00426 
00427 
00428         wsprintf(Line,"\"%s%s\" -P \"%%1\"",path,WSCILEX);
00429         if (bOK) bOK=UpdateAKey("DEM_scilab_file\\shell\\print\\command",Line);
00430 
00431         FREE(path);
00432         return bOK;
00433 }

Here is the call graph for this function:

Here is the caller graph for this function:

void UpdateFromCheckBox ( HWND  hDlgParent,
fptr  Update,
fptr  Delete 
)

Definition at line 259 of file FilesAssociationBox.c.

References UINT.

Referenced by ON_FILESASSOCIATIONBOX_WM_COMMAND().

00260 {
00261         LRESULT lResult;
00262 
00263         lResult = SendMessage(  hwnd ,(UINT) BM_GETCHECK, (WPARAM) 0,(LPARAM) 0); 
00264 
00265         if (lResult == BST_CHECKED)
00266         {
00267                 (Update)();
00268         }
00269 
00270         if (lResult == BST_UNCHECKED)
00271         {
00272                 (Delete)();
00273         }
00274 }

Here is the caller graph for this function:

BOOL UpdateGRAPH ( void   ) 

Definition at line 548 of file FilesAssociationBox.c.

References DeleteGRAPH(), FREE, GetWhereIsThisExe(), path, TRUE, UpdateAKey(), and WSCILEX.

Referenced by ON_FILESASSOCIATIONBOX_WM_COMMAND().

00549 {
00550         BOOL bOK=TRUE;
00551         char Line[512];
00552         char *path=GetWhereIsThisExe();
00553 
00554         DeleteGRAPH();
00555 
00556         bOK=UpdateAKey(".graph","GRAPH_scilab_file");
00557         if (bOK) bOK=UpdateAKey("GRAPH_scilab_file","GRAPH_scilab_file");
00558 
00559         wsprintf(Line,"\"%s%s\",7",path,WSCILEX);
00560         if (bOK) bOK=UpdateAKey("GRAPH_scilab_file\\DefaultIcon",Line);
00561 
00562         wsprintf(Line,"\"%s%s\" -X \"%%1\"",path,WSCILEX);
00563         if (bOK) bOK=UpdateAKey("GRAPH_scilab_file\\shell\\open\\command",Line);
00564 
00565         FREE(path);
00566         return bOK;
00567 }

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL UpdateGRAPHB ( void   ) 

Definition at line 569 of file FilesAssociationBox.c.

References DeleteGRAPHB(), FREE, GetWhereIsThisExe(), path, TRUE, UpdateAKey(), and WSCILEX.

Referenced by ON_FILESASSOCIATIONBOX_WM_COMMAND().

00570 {
00571         BOOL bOK=TRUE;
00572         char Line[512];
00573         char *path=GetWhereIsThisExe();
00574 
00575         DeleteGRAPHB();
00576 
00577         bOK=UpdateAKey(".graphb","GRAPHB_scilab_file");
00578         if (bOK) bOK=UpdateAKey("GRAPHB_scilab_file","GRAPHB_scilab_file");
00579 
00580         wsprintf(Line,"\"%s%s\",7",path,WSCILEX);
00581         if (bOK) bOK=UpdateAKey("GRAPHB_scilab_file\\DefaultIcon",Line);
00582 
00583         wsprintf(Line,"\"%s%s\" -X \"%%1\"",path,WSCILEX);
00584         if (bOK) bOK=UpdateAKey("GRAPHB_scilab_file\\shell\\open\\command",Line);
00585 
00586         FREE(path);
00587         return bOK;
00588 }

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL UpdateSAV ( void   ) 

Definition at line 506 of file FilesAssociationBox.c.

References DeleteSAV(), FREE, GetWhereIsThisExe(), path, TRUE, UpdateAKey(), and WSCILEX.

Referenced by ON_FILESASSOCIATIONBOX_WM_COMMAND().

00507 {
00508         BOOL bOK=TRUE;
00509         char Line[512];
00510         char *path=GetWhereIsThisExe();
00511 
00512         DeleteSAV();
00513 
00514         bOK=UpdateAKey(".sav","SAV_scilab_file");
00515         if (bOK) bOK=UpdateAKey("SAV_scilab_file","SAV_scilab_file");
00516 
00517         wsprintf(Line,"\"%s%s\",8",path,WSCILEX);
00518         if (bOK) bOK=UpdateAKey("SAV_scilab_file\\DefaultIcon",Line);
00519 
00520         wsprintf(Line,"\"%s%s\" -X \"%%1\"",path,WSCILEX);
00521         if (bOK) bOK=UpdateAKey("SAV_scilab_file\\shell\\open\\command",Line);
00522 
00523         FREE(path);
00524         return bOK;
00525 }

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL UpdateSCE ( void   ) 

Definition at line 276 of file FilesAssociationBox.c.

References DeleteSCE(), FREE, GetCurrentLanguage(), GetWhereIsThisExe(), path, SCI_VERSION_STRING, TRUE, UpdateAKey(), and WSCILEX.

Referenced by ON_FILESASSOCIATIONBOX_WM_COMMAND().

00277 {
00278         BOOL bOK=TRUE;
00279         char Line[512];
00280         char *path=GetWhereIsThisExe();
00281         int Language=GetCurrentLanguage();
00282         char KeyRegistryWithLanguage[1024];
00283 
00284         DeleteSCE();
00285 
00286         bOK=UpdateAKey(".sce","SCE_scilab_file");
00287         if (bOK) bOK=UpdateAKey("SCE_scilab_file","SCE_scilab_file");
00288 
00289         wsprintf(Line,"\"%s%s\",9",path,WSCILEX);
00290         if (bOK) bOK=UpdateAKey("SCE_scilab_file\\DefaultIcon",Line);
00291 
00292         wsprintf(Line,"\"%s%s\" -O \"%%1\"",path,WSCILEX);
00293         if (bOK) bOK=UpdateAKey("SCE_scilab_file\\shell\\open\\command",Line);
00294 
00295         wsprintf(Line,"\"%s%s\" -X \"%%1\"",path,WSCILEX);
00296         switch (Language)
00297         {
00298                 case 1:
00299                         wsprintf(KeyRegistryWithLanguage,"SCE_scilab_file\\shell\\Executer avec %s\\command",SCI_VERSION_STRING);
00300                 break;
00301 
00302                 default :case 0:
00303                         wsprintf(KeyRegistryWithLanguage,"SCE_scilab_file\\shell\\Run with %s\\command",SCI_VERSION_STRING);
00304                 break;
00305         }
00306         if (bOK) bOK=UpdateAKey(KeyRegistryWithLanguage,Line);
00307 
00308         wsprintf(Line,"\"%s%s\" -P \"%%1\"",path,WSCILEX);
00309         if (bOK) bOK=UpdateAKey("SCE_scilab_file\\shell\\print\\command",Line);
00310 
00311         FREE(path);
00312         return bOK;
00313 }

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL UpdateSCI ( void   ) 

Definition at line 315 of file FilesAssociationBox.c.

References DeleteSCI(), FREE, GetCurrentLanguage(), GetWhereIsThisExe(), path, SCI_VERSION_STRING, TRUE, UpdateAKey(), and WSCILEX.

Referenced by ON_FILESASSOCIATIONBOX_WM_COMMAND().

00316 {
00317         BOOL bOK=TRUE;
00318         char Line[512];
00319         char *path=GetWhereIsThisExe();
00320         int Language=GetCurrentLanguage();
00321         char KeyRegistryWithLanguage[1024];
00322 
00323         DeleteSCI();
00324 
00325         bOK=UpdateAKey(".sci","SCI_scilab_file");
00326         if (bOK) bOK=UpdateAKey("SCI_scilab_file","SCI_scilab_file");
00327 
00328         wsprintf(Line,"\"%s%s\",10",path,WSCILEX);
00329         if (bOK) bOK=UpdateAKey("SCI_scilab_file\\DefaultIcon",Line);
00330 
00331         wsprintf(Line,"\"%s%s\" -O \"%%1\"",path,WSCILEX);
00332         if (bOK) bOK=UpdateAKey("SCI_scilab_file\\shell\\open\\command",Line);
00333 
00334         wsprintf(Line,"\"%s%s\" -X \"%%1\"",path,WSCILEX);
00335         switch (Language)
00336         {
00337         case 1:
00338                 wsprintf(KeyRegistryWithLanguage,"SCI_scilab_file\\shell\\Executer avec %s\\command",SCI_VERSION_STRING);
00339                 break;
00340 
00341         default :case 0:
00342                 wsprintf(KeyRegistryWithLanguage,"SCI_scilab_file\\shell\\Run with %s\\command",SCI_VERSION_STRING);
00343                 break;
00344         }
00345         if (bOK) bOK=UpdateAKey(KeyRegistryWithLanguage,Line);
00346 
00347 
00348         wsprintf(Line,"\"%s%s\" -P \"%%1\"",path,WSCILEX);
00349         if (bOK) bOK=UpdateAKey("SCI_scilab_file\\shell\\print\\command",Line);
00350 
00351         FREE(path);
00352         return bOK;
00353 }

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL UpdateTST ( void   ) 

Definition at line 355 of file FilesAssociationBox.c.

References DeleteTST(), FREE, GetCurrentLanguage(), GetWhereIsThisExe(), path, SCI_VERSION_STRING, TRUE, UpdateAKey(), and WSCILEX.

Referenced by ON_FILESASSOCIATIONBOX_WM_COMMAND().

00356 {
00357         BOOL bOK=TRUE;
00358         char Line[512];
00359         char *path=GetWhereIsThisExe();
00360         int Language=GetCurrentLanguage();
00361         char KeyRegistryWithLanguage[1024];
00362 
00363         DeleteTST();
00364 
00365         bOK=UpdateAKey(".tst","TST_scilab_file");
00366         if (bOK) bOK=UpdateAKey("TST_scilab_file","TST_scilab_file");
00367 
00368         wsprintf(Line,"\"%s%s\",11",path,WSCILEX);
00369         if (bOK) bOK=UpdateAKey("TST_scilab_file\\DefaultIcon",Line);
00370 
00371         wsprintf(Line,"\"%s%s\" -O \"%%1\"",path,WSCILEX);
00372         if (bOK) bOK=UpdateAKey("TST_scilab_file\\shell\\open\\command",Line);
00373 
00374         wsprintf(Line,"\"%s%s\" -X \"%%1\"",path,WSCILEX);
00375         switch (Language)
00376         {
00377         case 1:
00378                 wsprintf(KeyRegistryWithLanguage,"TST_scilab_file\\shell\\Executer avec %s\\command",SCI_VERSION_STRING);
00379                 break;
00380 
00381         default :case 0:
00382                 wsprintf(KeyRegistryWithLanguage,"TST_scilab_file\\shell\\Run with %s\\command",SCI_VERSION_STRING);
00383                 break;
00384         }
00385         if (bOK) bOK=UpdateAKey(KeyRegistryWithLanguage,Line);
00386 
00387 
00388         wsprintf(Line,"\"%s%s\" -P \"%%1\"",path,WSCILEX);
00389         if (bOK) bOK=UpdateAKey("TST_scilab_file\\shell\\print\\command",Line);
00390 
00391         FREE(path);
00392         return bOK;
00393 }

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on Sun Mar 4 15:57:34 2007 for Scilab [trunk] by  doxygen 1.5.1