Ho scritto questa funzione in Visual C++ :

codice:
private: System::Void OpenFileMenuItem_Click(System::Object^ sender, System::EventArgs^  e) { 
OPENFILENAME ofn; 
char szFile[260]; 
HANDLE hf; 
ZeroMemory(&ofn, sizeof(ofn)); 
ofn.lStructSize = sizeof(ofn); 
ofn.hwndOwner = NULL; 
ofn.lpstrFile = LPWSTR(szFile); 
ofn.lpstrFile[0] = '\0'; ofn.nMaxFile = sizeof(szFile); 
ofn.lpstrFilter = L"All\0*.*\0Bitmaped\0*.BMP\0"; 
ofn.nFilterIndex = 1; 
ofn.lpstrFileTitle = NULL; 
ofn.nMaxFileTitle = 0; 
ofn.lpstrInitialDir = NULL; 
ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST; 
if ((OpenFileDialog(&ofn)==TRUE))  
hf = CreateFile(ofn.lpstrFile, GENERIC_READ, 0,(LPSECURITY_ATTRIBUTES) NULL, OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL, (HANDLE) NULL); 
}
HO incluso la libreria Commdlg.h e windows.h .
L'errore in fase di compilazione é questo:

<function-style-cast>': impossibile convertire da 'OPENFILENAME *' a 'System::Windows::Forms::OpenFileDialog'

Cosa posso fare?