FindScilab.h File Reference

#include <windows.h>

Include dependency graph for FindScilab.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

BOOL HaveAnotherWindowScilab (void)
char * ChooseAnotherWindowScilab (void)


Function Documentation

char* ChooseAnotherWindowScilab ( void   ) 

Definition at line 63 of file FindScilab.c.

References ChooseScilabBox(), FREE, ListScilabName, MALLOC, NULL, and NumberScilab.

00064 {
00065         char *TitleScilabChoose=NULL;
00066         if (NumberScilab == 1)
00067         {
00068                 TitleScilabChoose=MALLOC( (strlen(ListScilabName[NumberScilab-1])+1) * sizeof(char) );
00069                 wsprintf(TitleScilabChoose,"%s",ListScilabName[NumberScilab-1]);
00070         }
00071         else
00072         {
00073                 HWND hWndScilab=NULL;
00074                 TitleScilabChoose=ChooseScilabBox();
00075                 hWndScilab=FindWindow(NULL,TitleScilabChoose);
00076                 if (hWndScilab==NULL) /* La fenetre n'existe plus */
00077                 {
00078                         FREE(TitleScilabChoose);
00079                         TitleScilabChoose=NULL;
00080                 }
00081         }
00082 
00083         return TitleScilabChoose;
00084 
00085 
00086 }

Here is the call graph for this function:

BOOL HaveAnotherWindowScilab ( void   ) 

Definition at line 28 of file FindScilab.c.

References a, BeginningWindowScilabName, FALSE, LineMax, ListScilabName, MoreMaxNumberScilabMax, NULL, NumberScilab, NumberScilabMax, SCI_VERSION_STRING, and TRUE.

00029 {
00030         BOOL Retour=FALSE;
00031         HWND CurrenthWnd=NULL;
00032         
00033         int a=0;
00034 
00035         wsprintf(BeginningWindowScilabName,"%s (",SCI_VERSION_STRING);
00036         
00037         CurrenthWnd=GetWindow(GetDesktopWindow(),GW_CHILD);
00038         CurrenthWnd=GetWindow(CurrenthWnd,GW_HWNDFIRST);
00039 
00040         while ( CurrenthWnd!= NULL )
00041         {
00042                 char Title[LineMax];
00043 
00044                 GetWindowText(CurrenthWnd,Title,strlen(BeginningWindowScilabName)+1);
00045                 if (strcmp(Title,BeginningWindowScilabName) == 0)
00046                 {
00047                         GetWindowText(CurrenthWnd,Title,LineMax);
00048                         if (NumberScilab<NumberScilabMax)
00049                         {
00050                                 wsprintf(ListScilabName[NumberScilab],"%s",Title);
00051                         }
00052                         else MoreMaxNumberScilabMax=TRUE;
00053                         NumberScilab++;
00054                         Retour=TRUE;
00055                 }
00056         
00057                 CurrenthWnd=GetWindow(CurrenthWnd,GW_HWNDNEXT);
00058         }
00059 
00060         return Retour;
00061 }


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