| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 
 |  
#include "Tool.h"
 
 
#define	MAIN_LEN		80
#define IDC_MAIN_TEXT		100
 
/* Fenêtre ENREGISTRER SOUS */
void LoadDirectory(HWND hDlgTools, wchar_t szFileName[MAIN_LEN+1])
{
        /* Déclaration des variables */
 
	OPENFILENAME ofn;
 
	/* Init des variables */				
	ZeroMemory(&ofn, sizeof(ofn));
	szFileName=NULL;
 
	/* Déclaration de la structure de OPENFILENAME */
	ofn.lStructSize = sizeof(ofn); 
	ofn.hwndOwner = hDlgTools; 
	// ofn.hInstance =; 
	ofn.lpstrFilter = L"Fichiers xls (*.xls)\0*.xls\0Fichiers pdf (*.pdf)\0*.pdf\0Fichiers tex (*.tex)\0*.tex\0Fichiers txt (*.txt)\0*.txt\0Tous (*.*)\0*.*"; 
	// ofn.lpstrCustomFilter; 
	// ofn.nMaxCustFilter; 
	// ofn.nFilterIndex;
 
	ofn.lpstrFile = szFileName; 
	ofn.nMaxFile = MAIN_LEN+1; 
	// ofn.lpstrFileTitle = "Exportation"; 
	// ofn.nMaxFileTitle; 
	ofn.lpstrInitialDir = L"C:\\Documents and Settings\\Propriétaire\\Bureau\\"; 
	// ofn.lpstrTitle; 
	ofn.Flags = OFN_EXPLORER | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | OFN_NOCHANGEDIR; 
	// ofn.nFileOffset; 
	// ofn.nFileExtension =; 
	ofn.lpstrDefExt = L"xls"; 
	// ofn.lCustData; 
	// ofn.lpfnHook; 
	ofn.lpTemplateName =L"Exportation"; 
 
	/* Ouverture de la fenetre de selection */
	if ( GetSaveFileName ( &ofn ) )
	{
		/* Récupération du nom de fichier */
   		SendMessage(GetDlgItem(hDlgTools,IDC_MAIN_TEXT),WM_GETTEXT,sizeof(szFileName),(LPARAM)szFileName);
	}
} | 
Partager