Click here to Skip to main content
15,881,380 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: ReadString() crashes at the end of file? Pin
AlanLai23-Mar-09 11:45
AlanLai23-Mar-09 11:45 
GeneralRe: ReadString() crashes at the end of file? Pin
AlanLai31-Mar-09 9:00
AlanLai31-Mar-09 9:00 
QuestionRun-time error stops dialog when combo box added: [8002] Window Create, and Create Dialog failure Error code-20 Pin
Goo220-Mar-09 12:00
Goo220-Mar-09 12:00 
AnswerRe: Run-time error stops dialog when combo box added: [8002] Window Create, and Create Dialog failure Error code-20 Pin
norish20-Mar-09 19:48
norish20-Mar-09 19:48 
QuestionWant to stop full screen display when using Windows media player Pin
Keith Worden20-Mar-09 8:43
Keith Worden20-Mar-09 8:43 
AnswerRe: Want to stop full screen display when using Windows media player Pin
V Shah11-Mar-10 6:28
V Shah11-Mar-10 6:28 
GeneralRe: Want to stop full screen display when using Windows media player Pin
Keith Worden11-Mar-10 6:45
Keith Worden11-Mar-10 6:45 
QuestionGetSaveFileName: does not work propoerly when the option "Hide file extension for know file type" is checked Pin
zouzoulikou20-Mar-09 7:49
zouzoulikou20-Mar-09 7:49 
hello.
I've a problem with the method GetSaveFileName.
When the option "Hide file extension for know file type" is checked, and the file name contains a ".", the filename is truncated.
here is my code:

OPENFILENAME ofn = {0};
ofn.lStructSize = sizeof(OPENFILENAMEW);
ofn.hwndOwner = (HWND)olhParentHWnd;
ofn.lpstrFilter = "(Doc files)\0*.pkp\0\0";
ofn.nFilterIndex = 1;
ofn.lpstrDefExt = ".pkp";
ofn.lpstrFile = "MyDoc.prefered";
ofn.nMaxFile = _MAX_PATH;
ofn.lpstrTitle = "Save pkp file"
ofn.Flags = OFN_NOREADONLYRETURN | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | OFN_EXPLORER | OFN_NOVALIDATE;
ofn.Flags |= OFN_ENABLEHOOK;
ofn.Flags |= OFN_ENABLESIZING;
ofn.lpfnHook = (LPOFNHOOKPROC)CMySavepkpFile::CustomSaveDlgHookProc;
ofn.lpstrInitialDir = "C:\Documents and Settings\Administrator\My Documents";
GetSaveFileName(&ofn);

Unfortunately, the default displayed name is "Mydoc" instead of "MyDoc.prefered".
Any idea ?
AnswerRe: GetSaveFileName: does not work propoerly when the option "Hide file extension for know file type" is checked Pin
David Crow20-Mar-09 7:57
David Crow20-Mar-09 7:57 
GeneralRe: GetSaveFileName: does not work propoerly when the option "Hide file extension for know file type" is checked Pin
zouzoulikou20-Mar-09 22:48
zouzoulikou20-Mar-09 22:48 
GeneralRe: GetSaveFileName: does not work propoerly when the option "Hide file extension for know file type" is checked Pin
David Crow21-Mar-09 16:11
David Crow21-Mar-09 16:11 
AnswerRe: GetSaveFileName: does not work propoerly when the option "Hide file extension for know file type" is checked Pin
norish21-Mar-09 1:54
norish21-Mar-09 1:54 
Questionhow to use #pragma data_seq() Pin
ernst2002053020-Mar-09 7:48
ernst2002053020-Mar-09 7:48 
AnswerRe: how to use #pragma data_seq() Pin
David Crow20-Mar-09 7:55
David Crow20-Mar-09 7:55 
GeneralRe: how to use #pragma data_seq() Pin
ernst2002053020-Mar-09 8:04
ernst2002053020-Mar-09 8:04 
GeneralRe: how to use #pragma data_seq() Pin
David Crow20-Mar-09 8:09
David Crow20-Mar-09 8:09 
GeneralRe: how to use #pragma data_seq() Pin
ernst2002053020-Mar-09 8:18
ernst2002053020-Mar-09 8:18 
GeneralRe: how to use #pragma data_seq() Pin
David Crow20-Mar-09 8:29
David Crow20-Mar-09 8:29 
AnswerRe: how to use #pragma data_seq() Pin
cmk20-Mar-09 10:38
cmk20-Mar-09 10:38 
QuestionErase previous drawings Pin
llp00na20-Mar-09 6:53
llp00na20-Mar-09 6:53 
AnswerRe: Erase previous drawings Pin
Chris Losinger20-Mar-09 7:09
professionalChris Losinger20-Mar-09 7:09 
GeneralRe: Erase previous drawings Pin
llp00na20-Mar-09 7:27
llp00na20-Mar-09 7:27 
GeneralRe: Erase previous drawings Pin
Chris Losinger20-Mar-09 7:35
professionalChris Losinger20-Mar-09 7:35 
GeneralRe: Erase previous drawings Pin
David Crow20-Mar-09 9:25
David Crow20-Mar-09 9:25 
AnswerRe: Erase previous drawings Pin
Code-o-mat20-Mar-09 7:30
Code-o-mat20-Mar-09 7:30 

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.