OPENFILENAME ofd;
char buf[256];
FillMemory(&ofd,sizeof(ofd),0);
FillMemory(buf,256,0);
ofd.Flags=OFN_PATHMUSTEXIST|OFN_FILEMUSTEXIST|OFN_NOCHANGEDIR;
ofd.lStructSize=sizeof(ofd);
ofd.hwndOwner=hWnd;
ofd.lpstrFilter ="Windows Bitmap\0*.bmp\0Portable Network Graphics\0*.png\0JPEG\0*.jpg\0TARGA\0*.tga\0\0";
ofd.lpstrInitialDir = _chr(""); //work_dir
ofd.lpstrFile=buf;
ofd.nMaxFile=255;
ofd.lpstrTitle="Lade eine Bilddatei für den Hintergrund";
if (GetOpenFileName(&ofd))
{
// ofd.lpstrFile == the string of the filename + location
// use it like: ent_create(ofd.lpstrFile, vector, NULL);
}
else
{
// when file is not existing or nothing selected
}