Click here to Skip to main content
15,919,423 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralScreen Capture with DIB Pin
2-Jul-02 12:00
suss2-Jul-02 12:00 
GeneralRe: Screen Capture with DIB Pin
Christian Graus2-Jul-02 13:04
protectorChristian Graus2-Jul-02 13:04 
GeneralUpdateAllViews (...) - a trivial question Pin
ns2-Jul-02 11:35
ns2-Jul-02 11:35 
GeneralRe: UpdateAllViews (...) - a trivial question Pin
Jim A. Johnson2-Jul-02 11:43
Jim A. Johnson2-Jul-02 11:43 
GeneralRe: UpdateAllViews (...) - a trivial question Pin
jmkhael2-Jul-02 11:46
jmkhael2-Jul-02 11:46 
GeneralRe: UpdateAllViews (...) - a trivial question Pin
surbinsho3-Jul-02 0:05
surbinsho3-Jul-02 0:05 
GeneralRe: UpdateAllViews (...) - a trivial question Pin
ns3-Jul-02 4:40
ns3-Jul-02 4:40 
GeneralPlease Help with OPENFILENAME/GetOpenFileName Pin
el_robert2-Jul-02 10:34
el_robert2-Jul-02 10:34 
I'm writing a screen saver using the scrnsave library. I'm having a problem opening an Open Dialog box to browse for files. Here is the code i have right now, I want it to launch the Open Dialog box when a button is clicked on the config dialog(ScreenSaverConfigureDialog).

I've been working on this one problem since yesterday and I can't figure it out. Am I missing something here? any help would be greatly appreciated.

BOOL WINAPI RegisterDialogClasses(HANDLE hInst){
return TRUE;
}

BOOL WINAPI ScreenSaverConfigureDialog(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam){
OPENFILENAME ofn;
char szFile[260];
switch(message){
...
case WM_COMMAND:
switch(LOWORD(wParam)){
case ADD_IMAGES:
//initialize OPENFILENAME(ofn)
memset(&ofn, 0, sizeof(OPENFILENAME));
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = hdlg;
ofn.lpstrFile = szFile;
ofn.nMaxFile = sizeof(szFile);
ofn.nFilterIndex = 1;
ofn.lpstrFileTitle = NULL;
ofn.nMaxFileTitle = 0;
ofn.lpstrInitialDir = NULL;
ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST;

//displays the box
if(GetOpenFileName(&ofn)){
...
}
break;
}
...
}
}
GeneralRe: Please Help with OPENFILENAME/GetOpenFileName Pin
Marshall2-Jul-02 10:56
Marshall2-Jul-02 10:56 
GeneralRe: Please Help with OPENFILENAME/GetOpenFileName Pin
Roger Stewart2-Jul-02 10:59
professionalRoger Stewart2-Jul-02 10:59 
GeneralRe: Please Help with OPENFILENAME/GetOpenFileName Pin
el_robert2-Jul-02 11:41
el_robert2-Jul-02 11:41 
GeneralGot it!!! Pin
el_robert2-Jul-02 12:47
el_robert2-Jul-02 12:47 
GeneralHelp Pin
2-Jul-02 9:41
suss2-Jul-02 9:41 
GeneralCalling between MFC classes Pin
2-Jul-02 9:39
suss2-Jul-02 9:39 
GeneralRe: Calling between MFC classes Pin
Dave Bryant2-Jul-02 11:17
Dave Bryant2-Jul-02 11:17 
Generaldetecting working and non-working links in a website Pin
2-Jul-02 8:50
suss2-Jul-02 8:50 
GeneralRe: detecting working and non-working links in a website Pin
2-Jul-02 10:46
suss2-Jul-02 10:46 
GeneralMDAC 2.7 problems. Please HELP. Pin
DimkaSPB2-Jul-02 8:10
DimkaSPB2-Jul-02 8:10 
Generalbitmap writing problem Pin
SilentWarrior2-Jul-02 6:55
SilentWarrior2-Jul-02 6:55 
GeneralRe: bitmap writing problem Pin
Davide Pizzolato2-Jul-02 7:07
Davide Pizzolato2-Jul-02 7:07 
GeneralRe: bitmap writing problem Pin
Speedy3-Jul-02 11:04
Speedy3-Jul-02 11:04 
GeneralPreallocate a map Pin
2-Jul-02 6:49
suss2-Jul-02 6:49 
GeneralRe: Preallocate a map Pin
Joaquín M López Muñoz2-Jul-02 11:01
Joaquín M López Muñoz2-Jul-02 11:01 
GeneralRe: Preallocate a map Pin
markkuk2-Jul-02 21:23
markkuk2-Jul-02 21:23 
GeneralRe: Preallocate a map Pin
Alexandru Savescu2-Jul-02 22:49
Alexandru Savescu2-Jul-02 22:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.