Click here to Skip to main content
15,899,126 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCRectTracker+CScrollView="going crazy!!!" Pin
Gavriloaie Andrei2-Feb-04 16:34
Gavriloaie Andrei2-Feb-04 16:34 
Generaltypedef vector<vector<vector<double> > > vMatrix; Pin
closecall2-Feb-04 15:52
closecall2-Feb-04 15:52 
GeneralRe: typedef vector<vector<vector<double> > > vMatrix; Pin
ZoogieZork2-Feb-04 19:10
ZoogieZork2-Feb-04 19:10 
GeneralRegisterHotKey function Pin
zephyr1232-Feb-04 15:05
susszephyr1232-Feb-04 15:05 
GeneralRe: RegisterHotKey function Pin
valikac2-Feb-04 17:37
valikac2-Feb-04 17:37 
GeneralRe: RegisterHotKey function Pin
Zephy1232-Feb-04 20:37
sussZephy1232-Feb-04 20:37 
Generaldavidlee108 Pin
davidlee1082-Feb-04 14:59
sussdavidlee1082-Feb-04 14:59 
GeneralOpenFile > Cancel - Problem Pin
TiberiusvP2-Feb-04 14:32
TiberiusvP2-Feb-04 14:32 
Hi there!
I have a problem with my MDI-application.
When the application starts, i want to have an OpenFile dialog. I have

cmdInfo.m_nShellCommand = CCommandLineInfo::FileOpen;

in CMyappApp::InitInstance() and

DoPromptFileNames(filename, AFX_IDS_OPENFILE,OFN_HIDEREADONLY | OFN_FILEMUSTEXIST , TRUE, NULL)))

in CMyappDoc::OnOpenDocument(), everything works fine, the dialog opens on startup.

Now the problem: by pressing the 'Cancel'-button, one would expect nothing to happen, no view to open, just the dialog to disappear.
But the view opens just like it would if one selected a file, and produces lots of trouble cause it actually has no file to handle.

I tried to work around this by closing it right away by calling CWnd::DestroyWindow() in my view's OnInitialUpdate() if there's no file to handle, but then I get in trouble with my CDoc*...

What I want is just a simple solution for this: Open a fileOpen-dialog, just close it by pressing 'Cancel' and closing it and launching my view by selecting a file...

I hope it is understandable, my english isn't actually the best Smile | :)
thank you and greetz

Tib

----------------------------------------------------------
I once had a nightmare in binary --- I think there was a 2
GeneralRe: OpenFile > Cancel - Problem Pin
Roger Allen3-Feb-04 2:59
Roger Allen3-Feb-04 2:59 
GeneralRe: OpenFile > Cancel - Problem Pin
TiberiusvP3-Feb-04 3:44
TiberiusvP3-Feb-04 3:44 
GeneralGoing Crazy (How to Install a Font) Pin
netx20032-Feb-04 13:18
netx20032-Feb-04 13:18 
GeneralRe: Going Crazy (How to Install a Font) Pin
Anonymous2-Feb-04 15:20
Anonymous2-Feb-04 15:20 
GeneralRe: Going Crazy (How to Install a Font) Pin
Roger Allen3-Feb-04 3:02
Roger Allen3-Feb-04 3:02 
GeneralISDN USB modem detection Pin
Tadej Zgur2-Feb-04 11:52
Tadej Zgur2-Feb-04 11:52 
QuestionWhat is a good PDF Viewer control? Pin
Alex Korchemniy2-Feb-04 11:04
Alex Korchemniy2-Feb-04 11:04 
Generalcustomize CFileDialog for dynamic Files of Type Pin
sysop@HAL9K.com2-Feb-04 11:00
sysop@HAL9K.com2-Feb-04 11:00 
QuestionCImage and atlimage.h? Pin
__Cerb2-Feb-04 10:52
__Cerb2-Feb-04 10:52 
AnswerRe: CImage and atlimage.h? Pin
Michael Dunn2-Feb-04 11:42
sitebuilderMichael Dunn2-Feb-04 11:42 
GeneralService stops when LOG OFF from the system Pin
cchauhan2-Feb-04 10:38
cchauhan2-Feb-04 10:38 
GeneralRe: Service stops when LOG OFF from the system Pin
Prakash Nadar2-Feb-04 17:17
Prakash Nadar2-Feb-04 17:17 
GeneralRe: Service stops when LOG OFF from the system Pin
Anonymous3-Feb-04 6:11
Anonymous3-Feb-04 6:11 
GeneralRe: Service stops when LOG OFF from the system Pin
Prakash Nadar3-Feb-04 15:57
Prakash Nadar3-Feb-04 15:57 
GeneralAbout TrackMouseEvent function Pin
Cael2-Feb-04 10:22
Cael2-Feb-04 10:22 
GeneralRe: About TrackMouseEvent function Pin
sps-itsec462-Feb-04 10:58
sps-itsec462-Feb-04 10:58 
Generalboost makes min/max ambiguous Pin
peterchen2-Feb-04 9:29
peterchen2-Feb-04 9:29 

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.