Win API : files mit einem Einzelklick öffnen?

Nabi

Erfahrenes Mitglied
Hallo ,
ich habe diese funktion zum öffnen von Files (hier bitmaps ) , das ausgewählte File wird mit Doppelklick
geöffnet , die frage ist : welche änderungen soll bei dieser funktion gemacht werden um Dateien per Einzelklick zu öffnen?
danke für jede antwort.

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);
    


}
 
muss nicht Doppel-Maus-Klick sein un eine datei von PC zu wählen , ich wähle eine Datei von PC mit 1 Klick , nur bei dem program mit dem oben genannte Code ist anderes , also es hat nichts zu tun mit system-einstellung sondern mit Code.
 
Zurück