Habe hier meinen Code zum Laden einer Entity:

Code:
STRING* OB_E_NAME_STR = "#30";

OPENFILENAME my_file;
char buf[256];
FillMemory (&my_file,sizeof(my_file),0);
FillMemory (buf,256,0);
my_file.Flags = OFN_PATHMUSTEXIST|OFN_FILEMUSTEXIST;
my_file.lStructSize = sizeof(my_file);
my_file.hwndOwner = hWnd;	
my_file.lpstrFilter = "Modelle (*.mdl)\0*.mdl\0Bitmaps (*.tga; *.bmp)\0*.tga;*.bmp\0\0";
my_file.lpstrInitialDir = _chr(OB_E_PFAD_STR);
my_file.lpstrFile = buf;
my_file.nMaxFile = 255;	
my_file.lpstrTitle = "Entity laden:";
		
while (key_any)   wait(1);
		
if (GetOpenFileName(&my_file))
{
	str_cpy (OB_E_NAME_STR,my_file.lpstrFile);
}