Code:
void openfile(){
ZeroMemory(&opn, sizeof(OPENFILENAME));
opn.lStructSize = sizeof(OPENFILENAME);
opn.hwndOwner = hWnd;
opn.lpstrFile = tz1;
opn.nMaxFile = sizeof(tz1);
opn.lpstrFilter = "Bitmaps (*.bmp)\0*.bmp\0";
opn.nFilterIndex = 1;
opn.lpstrFileTitle = NULL;
opn.nMaxFileTitle = 0;
opn.lpstrInitialDir = NULL;
opn.hInstance = hInstance;
opn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST|OFN_NOVALIDATE;
bfile=GetOpenFileName(&opn);
csave=1;
}
Hi , In diesem Beispiel öffnet sich ein "OPEN FILE FENSTER" , Das Problem ist:
Manchmal will man das Fenster wieder schließen ohne ein File zu Wählen/Öffnen
Wie Informiere ich das Programm dass das Fenster ist geschlossen , welche if anweisung soll ich in diesem fall im Programm
Schreiben?.. sonst wählt das Programm beim schliessen etweder ein leere Name oder das letzte
gewählte file-Name
und das will ich verhindern.
danke in Voraus.