-
findfirstfile
Does anyone know whats wrong with this line of code because I cannot figure it out.
"dir" is a textbox containing the directory.
Code:
int temp;
char wtxt[25];
HWND fhwnd;
WIN32_FIND_DATA fd;
temp = GetWindowText(dir, wtxt,25);
fhwnd = FindFirstFile(wtxt,&fd);
this is the error I get:
cannot convert from 'void *' to 'struct HWND__ *'
Conversion from 'void*' to pointer to non-'void' requires an explicit cast
-
On which line are you gettings this error? Try typecasting with "(HWND)" or declare fhwnd as HANDLE.
-
.........aahhhhhh why would a function that finds a FILE handle return a windows handle?
To add to abdul's statement
I think you want to delcare:
HANDLE fhwnd;
-
thanks, that was the problem