Click here to Skip to main content
15,909,530 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How do I change the font color in CRichEditView? Pin
Mike Newberry14-Jun-00 9:24
sussMike Newberry14-Jun-00 9:24 
Generalclass '...all MFC classes...' needs to have dll-interface to be used by clients of class 'ErrDlg' Pin
Member 135613-Jun-00 23:20
Member 135613-Jun-00 23:20 
GeneralRe: class '...all MFC classes...' needs to have dll-interface to be used by clients of class 'ErrDlg' Pin
Blake Miller14-Jun-00 5:52
Blake Miller14-Jun-00 5:52 
GeneralRe: class '...all MFC classes...' needs to have dll-interface to be used by clients of class 'ErrDlg' Pin
Brian Hart25-Jun-00 12:44
Brian Hart25-Jun-00 12:44 
GeneralChallenging Problem, Solution Wanted! Pin
Mike13-Jun-00 15:02
Mike13-Jun-00 15:02 
GeneralRe: Challenging Problem, Solution Wanted! Pin
Christoph Rupp15-Jun-00 4:45
sussChristoph Rupp15-Jun-00 4:45 
QuestionHow do I Set the default Location for Saving Files?? Pin
Member 1174279013-Jun-00 11:15
Member 1174279013-Jun-00 11:15 
AnswerRe: How do I Set the default Location for Saving Files?? Pin
ALfadhly13-Jun-00 11:35
sussALfadhly13-Jun-00 11:35 
Try this code

[CODE]


OPENFILENAME ofn;

char defaultFileName[MAX_PATH + 1] = "Default file name";

char szFileTitle[MAX_PATH + 1];



ofn.lStructSize = sizeof(OPENFILENAME);

ofn.hwndOwner = NULL;

ofn.hInstance = GetModuleHandle(NULL);

ofn.lpstrFilter = "All Files (*.*)\0*.*\0\0";

ofn.lpstrCustomFilter = (LPTSTR) NULL;

ofn.nMaxCustFilter = 0L;

ofn.nFilterIndex = 1L;

ofn.lpstrFile = defaultFileName;

ofn.nMaxFile = sizeof(defaultFileName);

ofn.lpstrFileTitle = szFileTitle;

ofn.nMaxFileTitle = MAX_PATH;

ofn.lpstrInitialDir = "C:\\DefaultDir";

ofn.lpstrTitle = __TEXT("Save Da Doc as...");

ofn.nFileOffset = 0;

ofn.nFileExtension = 0;

ofn.lpstrDefExt = NULL;

ofn.lCustData = 0;

ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY |
OFN_EXPLORER | OFN_LONGNAMES;


int result = GetSaveFileName(&ofn);

if (result == IDOK) {


MessageBox(defaultFileName,"Full Path is ");

MessageBox(szFileTitle,"File Name only is ");


}



[CODE]


Note There is also easier ways with MFC ... Big Grin | :-D

Hope It will help

ALfadhly
AnswerRe: How do I Set the default Location for Saving Files?? Pin
solex13-Jun-00 22:29
solex13-Jun-00 22:29 
GeneralRe: How do I Set the default Location for Saving Files?? Pin
Alfadhly14-Jun-00 5:27
sussAlfadhly14-Jun-00 5:27 
GeneralRe: How do I Set the default Location for Saving Files?? Pin
solex14-Jun-00 5:45
solex14-Jun-00 5:45 
GeneralRe: How do I Set the default Location for Saving Files?? Pin
Blake Miller14-Jun-00 5:48
Blake Miller14-Jun-00 5:48 
GeneralRe: How do I Set the default Location for Saving Files?? Pin
Alfadhly14-Jun-00 6:01
sussAlfadhly14-Jun-00 6:01 
QuestionRecently seen a Newsreader app sample? Pin
Matthias13-Jun-00 9:33
Matthias13-Jun-00 9:33 
AnswerRe: Recently seen a Newsreader app sample? Pin
Frank Deo14-Jun-00 5:54
Frank Deo14-Jun-00 5:54 
GeneralRe: Recently seen a Newsreader app sample? Pin
Matthias14-Jun-00 11:10
Matthias14-Jun-00 11:10 
GeneralRe: Recently seen a Newsreader app sample? Pin
Brian Hart25-Jun-00 13:03
Brian Hart25-Jun-00 13:03 
AnswerRe: Recently seen a Newsreader app sample? Pin
Alfadhly14-Jun-00 5:57
sussAlfadhly14-Jun-00 5:57 
GeneralRe: Recently seen a Newsreader app sample? Pin
Matthias14-Jun-00 11:29
Matthias14-Jun-00 11:29 
GeneralRe: Recently seen a Newsreader app sample? Pin
Alfadhly15-Jun-00 10:06
sussAlfadhly15-Jun-00 10:06 
GeneralRe: Recently seen a Newsreader app sample? Pin
Alex Gorev16-Jun-00 4:32
Alex Gorev16-Jun-00 4:32 
GeneralRe: Recently seen a Newsreader app sample? Pin
Brian Hart25-Jun-00 12:57
Brian Hart25-Jun-00 12:57 
GeneralRe: Recently seen a Newsreader app sample? Pin
Buck15-Jun-00 13:05
Buck15-Jun-00 13:05 
GeneralRegister a File Type Pin
Tony Li13-Jun-00 9:28
Tony Li13-Jun-00 9:28 
GeneralCDatabase::OpenEx() fails in ATL/COM dll Pin
Member 262913-Jun-00 4:03
Member 262913-Jun-00 4:03 

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.