Click here to Skip to main content
15,895,507 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to create 2 tree view in one window Pin
Roger Allen22-Nov-11 2:10
Roger Allen22-Nov-11 2:10 
QuestionClose documents problem Pin
_Flaviu22-Nov-11 0:30
_Flaviu22-Nov-11 0:30 
AnswerRe: Close documents problem Pin
Roger Allen22-Nov-11 2:14
Roger Allen22-Nov-11 2:14 
GeneralRe: Close documents problem Pin
_Flaviu22-Nov-11 2:43
_Flaviu22-Nov-11 2:43 
AnswerRe: Close documents problem Pin
Stefan_Lang22-Nov-11 3:50
Stefan_Lang22-Nov-11 3:50 
GeneralRe: Close documents problem Pin
_Flaviu22-Nov-11 9:17
_Flaviu22-Nov-11 9:17 
GeneralRe: Close documents problem Pin
_Flaviu22-Nov-11 9:24
_Flaviu22-Nov-11 9:24 
GeneralRe: Close documents problem Pin
Stefan_Lang22-Nov-11 21:59
Stefan_Lang22-Nov-11 21:59 
As I said, I can't really tell - it's been >15 years I last coded something like that, and while not much seems to have changed, my memory does fail me here. It seems a good idea to me to try close the view associated with the document, rather than the document itself. but I wonder, do you really have multiple views associated to your documents? Your code doesn't even try to close the first view it finds. Maybe you can try that before looking for more views?

On a sidenote, why do you even need to closee your documents manually? Normally this is something the framework does for you (which may be the reason why it seems to be so badly documented). Normally you have a GUI with one or more views to one or more documents, and when you close a view (e. g. by menu, or clicking on the [x] button), that view will be closed. When the last view referencing a document is closed, that document will be closed as well. And when you close the app, it will close all views. That's all in the framework already, no need for any extra code. In fact, it might even be a bad idea to close a document manually because it may confound the framework when it tries to do likewise.
GeneralRe: Close documents problem Pin
_Flaviu23-Nov-11 2:46
_Flaviu23-Nov-11 2:46 
GeneralRe: Close documents problem Pin
_Flaviu23-Nov-11 20:25
_Flaviu23-Nov-11 20:25 
QuestionMainWindow of dll how to launch from client exe Pin
appollosputnik21-Nov-11 16:06
appollosputnik21-Nov-11 16:06 
AnswerRe: MainWindow of dll how to launch from client exe Pin
Richard MacCutchan21-Nov-11 21:29
mveRichard MacCutchan21-Nov-11 21:29 
GeneralRe: MainWindow of dll how to launch from client exe Pin
appollosputnik22-Nov-11 5:11
appollosputnik22-Nov-11 5:11 
GeneralRe: MainWindow of dll how to launch from client exe Pin
Richard MacCutchan22-Nov-11 6:18
mveRichard MacCutchan22-Nov-11 6:18 
QuestionBALANCED merge sort Pin
sadas232341s21-Nov-11 10:40
sadas232341s21-Nov-11 10:40 
QuestionCalculating Megabytes from ULONG Pin
jkirkerx21-Nov-11 8:18
professionaljkirkerx21-Nov-11 8:18 
AnswerRe: Calculating Megabytes from ULONG Pin
Richard Andrew x6421-Nov-11 9:11
professionalRichard Andrew x6421-Nov-11 9:11 
GeneralRe: Calculating Megabytes from ULONG Pin
jkirkerx21-Nov-11 10:07
professionaljkirkerx21-Nov-11 10:07 
GeneralRe: Calculating Megabytes from ULONG Pin
David Crow21-Nov-11 10:30
David Crow21-Nov-11 10:30 
GeneralRe: Calculating Megabytes from ULONG Pin
jkirkerx21-Nov-11 10:53
professionaljkirkerx21-Nov-11 10:53 
GeneralRe: Calculating Megabytes from ULONG Pin
jkirkerx21-Nov-11 11:09
professionaljkirkerx21-Nov-11 11:09 
AnswerRe: Calculating Megabytes from ULONG Pin
CPallini21-Nov-11 9:50
mveCPallini21-Nov-11 9:50 
GeneralRe: Calculating Megabytes from ULONG Pin
jkirkerx21-Nov-11 10:09
professionaljkirkerx21-Nov-11 10:09 
AnswerRe: Calculating Megabytes from ULONG Pin
Chuck O'Toole21-Nov-11 14:48
Chuck O'Toole21-Nov-11 14:48 
GeneralRe: Calculating Megabytes from ULONG Pin
jkirkerx21-Nov-11 15:57
professionaljkirkerx21-Nov-11 15:57 

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.