Click here to Skip to main content
16,005,037 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralMacro Processor for VC Pin
RobinT24-Oct-00 22:13
RobinT24-Oct-00 22:13 
GeneralDetecting MouseMove over a button Pin
Matthias Steinbart24-Oct-00 21:11
sussMatthias Steinbart24-Oct-00 21:11 
GeneralRe: Detecting MouseMove over a button Pin
Brendan Tregear26-Oct-00 15:35
Brendan Tregear26-Oct-00 15:35 
GeneralRemote Data Service 2ndPost Pin
Bashir Irfan Malik24-Oct-00 19:40
Bashir Irfan Malik24-Oct-00 19:40 
QuestionHow To obtain information about the window under the cursor. Pin
Wolfram Steinke24-Oct-00 15:57
Wolfram Steinke24-Oct-00 15:57 
AnswerRe: How To obtain information about the window under the cursor. Pin
Christian24-Oct-00 19:44
Christian24-Oct-00 19:44 
GeneralPlaying AVI movies using MCI commands Pin
Atlus_24-Oct-00 15:23
sussAtlus_24-Oct-00 15:23 
GeneralFile Dialog and Windows 2000 Pin
Jon24-Oct-00 9:55
Jon24-Oct-00 9:55 
I got a bug report on a program that I wrote saying that when it tries to open the file dialog that it crashes under windows 2000 professional. I used to following function to open a "file open" dialog:

BOOL DlgGetFileName(HWND hWnd,LPSTR lpszTitle,LPSTR lpszFormat,LPSTR lpszFileName,BOOL save)

{ OPENFILENAME of;

int result;

// Initialize the OPENFILENAME members
of.lStructSize = sizeof(OPENFILENAME);

of.Flags = OFN_ALLOWMULTISELECT | OFN_HIDEREADONLY | OFN_NOCHANGEDIR |
OFN_FILEMUSTEXIST | OFN_EXPLORER;

of.hwndOwner = hWnd;

of.hInstance = hInst;

of.lpstrFile = lpszFileName;

of.lpstrFilter = lpszFormat;

of.nFilterIndex = 1;

of.nMaxFile = 5120;

of.lpstrInitialDir = NULL;

of.lpstrTitle = lpszTitle;

of.lpTemplateName = 0;

of.lpfnHook = NULL;

of.nFileOffset = FileOffset;

// Display the dialog
if (save) result=GetSaveFileName(&of);

else result=GetOpenFileName(&of);

return result;

}

Does anyone have any ideas why this would crash? I will give credit for the fix if you help me out... I am thinking there must be a problem with the file open common dialog and windows 2K, maybe windows 2K uses different common dialogs that win 98 or something and my code doesn't take that into account?

Thanks for any ideas,
Jon (webmaster@compumatrix.com)
GeneralRe: File Dialog and Windows 2000 Pin
Michael Dunn24-Oct-00 15:13
sitebuilderMichael Dunn24-Oct-00 15:13 
GeneralRe: File Dialog and Windows 2000 Pin
James Corrie24-Oct-00 15:24
sussJames Corrie24-Oct-00 15:24 
Generalplease help -- desktop screen Pin
kk924-Oct-00 9:40
kk924-Oct-00 9:40 
GeneralRe: please help -- desktop screen Pin
Brendan Tregear26-Oct-00 15:45
Brendan Tregear26-Oct-00 15:45 
QuestionHow to get path to application execuable file??? Pin
Peter Pawluczuk24-Oct-00 6:49
sussPeter Pawluczuk24-Oct-00 6:49 
AnswerRe: How to get path to application execuable file??? Pin
David Wulff24-Oct-00 9:18
David Wulff24-Oct-00 9:18 
GeneralInstant Messenger Software Pin
donaldsa24-Oct-00 3:29
donaldsa24-Oct-00 3:29 
GeneralRe: Instant Messenger Software Pin
Leo Davidson24-Oct-00 9:15
Leo Davidson24-Oct-00 9:15 
GeneralRevision Control Software Pin
donaldsa24-Oct-00 3:27
donaldsa24-Oct-00 3:27 
GeneralRe: Revision Control Software Pin
Erik Funkenbusch24-Oct-00 10:06
Erik Funkenbusch24-Oct-00 10:06 
GeneralLine Drawing Control Pin
Mel Stober24-Oct-00 2:58
Mel Stober24-Oct-00 2:58 
GeneralRe: Line Drawing Control Pin
Christian24-Oct-00 19:59
Christian24-Oct-00 19:59 
QuestionNetwork Neighborhood people search ??? Pin
FuMo24-Oct-00 2:37
FuMo24-Oct-00 2:37 
GeneralPrinting a GIF Pin
Hank23-Oct-00 23:39
Hank23-Oct-00 23:39 
GeneralRe: Printing a GIF Pin
Christian24-Oct-00 20:05
Christian24-Oct-00 20:05 
GeneralRe: Printing a GIF Pin
Chris Losinger31-Oct-00 5:29
professionalChris Losinger31-Oct-00 5:29 
GeneralCreating A Dialog Window from a Win32 Console program Pin
Dave23-Oct-00 17:07
Dave23-Oct-00 17:07 

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.