#include "EndUser4glwinx.h" #include "executex.h" extern void EU_ListView_OnSize(HWND ,HWND ,int ,int ,int ,int ); extern void EU_ListView_InitializeIconListSys(HWND hwndLV, char *sz); extern void EU_ListView_InitializeImageListSys(HWND hwndList,int Ival); extern int EU_ListView_InitializeImageList(HWND hwndList,char *valeur1); extern void EU_LVAddColumn(HWND hwndLV, int i, char *name, int width); void SubClassEditField(HWND hwnd); /* inclure les codes éxécution de votre langage*/ extern long OPCExecute_SynWinListView(long OPCcodeExe) { char zone1[C_CMP_TAILLE_NOM_DICT] = "\0"; char zone2[C_CMP_TAILLE_NOM_DICT]= "\0"; char valeur1 [MAXBUFLENSTRING] = "\0"; char valeur2 [MAXBUFLENSTRING] = "\0" ; char tmpLocal [MAXBUFLENSTRING]; int Ival=0,a,b,c,d = 0,i=0 ; long Lval = 0 ; DWORD Dw; HWND HwndMaster; switch(OPCcodeExe) { case CodexTlistview : OPCF_Pile_Depile( P_NAMEVAR, (void *)zone1 ); OPCF_Pile_Depile( P_INTEGER,(void *)&a); OPCF_Pile_Depile( P_INTEGER,(void *)&b); OPCF_Pile_Depile( P_INTEGER,(void *)&c); OPCF_Pile_Depile( P_INTEGER,(void *)&d); OPC_Depile_All(); InitCommonControls(); EU_CodeCreateVarInteger (zone1,tmpLocal); OPC_Update_TableSymbole(tmpLocal,&IncrTbutton); OPC_Update_TableSymboleDialog(tmpLocal,GlobalNumberTDialog); strcpy(GzoneEditWin,tmpLocal); if(G_HwndTabControl) HwndMaster =G_HwndTabControl; else HwndMaster =Dialog[GlobalNumberTDialog].HwndDialog; Dialog[GlobalNumberTDialog].TabCoordWin[IncrTbutton].hWnd = // Create the list view window. CreateWindowEx(WS_EX_CLIENTEDGE, WC_LISTVIEW, "", WS_VISIBLE | WS_CHILD | G_Win_Style , 0, 0, 0,0,HwndMaster, (HMENU) EU_ListViewEdit, hInstance,NULL); EU_Memory_Window(Dialog[GlobalNumberTDialog].TabCoordWin[IncrTbutton].hWnd,\ IncrTbutton,1, NULL, d,c,b,a,FALSE,NULL); EU_ListView_OnSize(Dialog[GlobalNumberTDialog].HwndDialog ,\ Dialog[GlobalNumberTDialog].TabCoordWin[IncrTbutton].hWnd, d,c,b,a); IncrTbutton++ ; G_Win_ExtendStyle=0; break; case CodexeLVS_SUBCLASSEDITSALL : if( LVS_EDITLABELS & G_Win_Style ){ Dialog[GlobalNumberTDialog].TabCoordWin[IncrTbutton-1].hWndEditLV =\ CreateWindow("EDIT","", WS_BORDER|WS_CHILD |ES_LEFT, 0,0,0,0, Dialog[GlobalNumberTDialog].TabCoordWin[IncrTbutton-1].hWnd, (HMENU)1001, hInstance,NULL); SubClassEditField(Dialog[GlobalNumberTDialog].TabCoordWin[IncrTbutton-1].hWndEditLV); } G_Win_Style = 0;G_Win_ExtendStyle=0; break; case CodexeLVS_GRID: //@@@ SubClassLVdrawGrid(Dialog[GlobalNumberTDialog].TabCoordWin[IncrTbutton-1].hWnd); Dw = ListView_GetExtendedListViewStyle(Dialog[GlobalNumberTDialog].TabCoordWin[IncrTbutton-1].hWnd); ListView_SetExtendedListViewStyleEx(Dialog[GlobalNumberTDialog].TabCoordWin[IncrTbutton-1].hWnd,0L,Dw \ | LVS_EX_GRIDLINES | LVS_EX_INFOTIP | LVS_EX_FULLROWSELECT | LVS_EX_TRACKSELECT);// break; case CodexeLVS_CHECKBOX: Dw = ListView_GetExtendedListViewStyle(Dialog[GlobalNumberTDialog].TabCoordWin[IncrTbutton-1].hWnd); ListView_SetExtendedListViewStyleEx(Dialog[GlobalNumberTDialog].TabCoordWin[IncrTbutton-1].hWnd,0L, Dw \ | LVS_EX_CHECKBOXES | LVS_EX_INFOTIP | LVS_EX_FULLROWSELECT | LVS_EX_TRACKSELECT);// break; case CodexIconTextListview : OPCF_Pile_Depile( P_STRING, (void *)valeur1 ) ; EU_ListView_InitializeIconListSys(\ Dialog[GlobalNumberTDialog].TabCoordWin[IncrTbutton-1].hWnd,valeur1) ; break ; case CodexIconSysColumnListview : OPCF_Pile_Depile( P_NAMEVAR, (void *)valeur1 ) ; OPCF_Pile_Depile( P_INTEGER,(void *)&Ival); EU_ListView_InitializeImageListSys(Dialog[GlobalNumberTDialog].TabCoordWin[IncrTbutton-1].hWnd,Ival) ; break ; case CodexIconStringColumnListview : OPCF_Pile_Depile( P_STRING, (void *)valeur1 ) ; EU_ListView_InitializeImageList(Dialog[GlobalNumberTDialog].TabCoordWin[IncrTbutton-1].hWnd,valeur1) ; break; case CodexColumnListview : OPCF_Pile_Depile( P_STRING, (void *)valeur1 ) ; OPCF_Pile_Depile( P_INTEGER,(void *)&Ival); //printf(" CodexColumnListview : valeur1 : %s Ival : %d %X", valeur1,Ival,Dialog[GlobalNumberTDialog].TabCoordWin[IncrTbutton-1].hWnd); EU_LVAddColumn(Dialog[GlobalNumberTDialog].TabCoordWin[IncrTbutton-1].hWnd,Ival-1,\ valeur1,strlen(valeur1)+2); break; default : return EUError;//return EU_Error_Code_Exe(OPCcodeExe); /* execute.c */ } OPC_Depile_All(); return 0; }