Bonjour,

J'essaye depuis deux jours d'afficher la boite de dialog find de windows, lorsque que la boite de dialog s'affiche, j'ai plein d'exception qui s'affiche dans le debug de visual studio et
mon application bloque.

Je suis sur Windows 7 x64, j'utilise Visual studio 2013.

Le code est le suivant:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
 
       FINDREPLACE _fdlg;
 
       TCHAR _FindWhat[128];
 
       generic_strcpy(FindWhat, 128, TEXT("test"));
 
       ZeroMemory(&_fdlg, sizeof(_fdlg));
	_fdlg.lStructSize = sizeof(_fdlg);
	if (_winVersion < WV_W2K)
		_fdlg.lStructSize = sizeof(FINDREPLACE);
	_fdlg.hwndOwner = hwnd;
	_fdlg.hInstance = NULL;
	_fdlg.Flags = 0;;
	_fdlg.lpfnHook = NULL;
	_fdlg.lCustData = 0;
	_fdlg.lpTemplateName = NULL;
 
        _fdlg.lpstrFindWhat = (TCHAR *)_FindWhat;
	_fdlg.wFindWhatLen = generic_strlen(_FindWhat);
 
	return FindText(&_fdlg);
Les message d'erreurs sont les suivants.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
 
First-chance exception at 0x00000001 in demoapp.exe: 0xC0000005: Access violation executing location 0x00000001.
First-chance exception at 0x00000001 in demoapp.exe: 0xC0000005: Access violation executing location 0x00000001.
First-chance exception at 0x75DF4B0E (shell32.dll) in demoapp.exe: 0xC0000005: Access violation writing location 0x760153F8.
First-chance exception at 0x00000011 in demoapp.exe: 0xC0000005: Access violation executing location 0x00000011.
First-chance exception at 0x00000001 in demoapp.exe: 0xC0000005: Access violation executing location 0x00000001.
First-chance exception at 0x00000001 in demoapp.exe: 0xC0000005: Access violation executing location 0x00000001.
First-chance exception at 0x75DF4B0E (shell32.dll) in demoapp.exe: 0xC0000005: Access violation writing location 0x760153F8.
First-chance exception at 0x00000011 in demoapp.exe: 0xC0000005: Access violation executing location 0x00000011.
First-chance exception at 0x00000001 in demoapp.exe: 0xC0000005: Access violation executing location 0x00000001.
First-chance exception at 0x00000001 in demoapp.exe: 0xC0000005: Access violation executing location 0x00000001.
First-chance exception at 0x00000000 in demoapp.exe: 0xC0000005: Access violation executing location 0x00000000.
First-chance exception at 0x76EAA964 (comdlg32.dll) in demoapp.exe: 0xC0000005: Access violation writing location 0x00340FFC.
J'ai essayé de modifier les paramètres de la structure FINDREPLACE mais ca ne donne rien.

avez vous une idée?

Merci de votre aide.