wmcopydata.h File Reference

#include <windows.h>

Include dependency graph for wmcopydata.h:

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

Go to the source code of this file.

Data Structures

struct  tagMYREC

Typedefs

typedef tagMYREC MYREC

Functions

BOOL SendCommandToAnotherScilab (char *ScilabWindowNameSource, char *ScilabWindowNameDestination, char *CommandLine)
BOOL GetCommandFromAnotherScilab (char *TitleWindowSend, char *CommandLine)
BOOL ReceiveFromAnotherScilab (HWND hWndSend, PCOPYDATASTRUCT MyCopyDataStruct)


Typedef Documentation

typedef struct tagMYREC MYREC


Function Documentation

BOOL GetCommandFromAnotherScilab ( char *  TitleWindowSend,
char *  CommandLine 
)

Definition at line 14 of file wmcopydata.c.

00015 {
00016         BOOL Retour=FALSE;
00017 
00018         if (ReceiveDatafromAnotherScilab)
00019         {
00020                 if (wsprintf(CommandLine,"%s",LineFromAnotherScilab) <= 0) return FALSE;
00021                 wsprintf(TitleWindowSend,"%s",TitleScilabSend);
00022 
00023                 ReceiveDatafromAnotherScilab=FALSE;
00024                 Retour=TRUE;
00025         }
00026         else
00027         {
00028                 Retour=FALSE;
00029         }
00030 
00031         return Retour;
00032 }

BOOL ReceiveFromAnotherScilab ( HWND  hWndSend,
PCOPYDATASTRUCT  MyCopyDataStruct 
)

Definition at line 64 of file wmcopydata.c.

00065 {
00066    BOOL Retour=FALSE;
00067  
00068    if (wsprintf(LineFromAnotherScilab,"%s",(LPSTR) ((MYREC *)(MyCopyDataStruct->lpData))->CommandFromAnotherScilab)  <= 0) return FALSE;
00069    
00070    GetWindowText(hWndSend,TitleScilabSend,MAX_PATH);
00071    ReceiveDatafromAnotherScilab=TRUE;
00072    Retour=TRUE;
00073 
00074    return Retour;
00075 }

BOOL SendCommandToAnotherScilab ( char *  ScilabWindowNameSource,
char *  ScilabWindowNameDestination,
char *  CommandLine 
)

Definition at line 34 of file wmcopydata.c.

References tagMYREC::CommandFromAnotherScilab, FALSE, NULL, and TRUE.

00035 {
00036    COPYDATASTRUCT MyCDS;
00037    MYREC MyRec;
00038    HWND hWndSource=NULL;
00039    HWND hWndDestination=NULL;
00040  
00041 
00042    if (wsprintf(MyRec.CommandFromAnotherScilab,"%s",CommandLine) <= 0) return FALSE;
00043   
00044 
00045    MyCDS.dwData = 0; 
00046    MyCDS.cbData = sizeof( MyRec );
00047    MyCDS.lpData = &MyRec;
00048    
00049    hWndSource=FindWindow(NULL,ScilabWindowNameSource);
00050    hWndDestination=FindWindow(NULL, ScilabWindowNameDestination);
00051 
00052    if ( (hWndDestination != NULL) )
00053    {
00054              SendMessage( hWndDestination,
00055                                           WM_COPYDATA,
00056                                           (WPARAM)(HWND) hWndDestination,
00057                                           (LPARAM) (LPVOID) &MyCDS );
00058    }
00059    else return FALSE;
00060 
00061    return TRUE;
00062 }


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