Click here to Skip to main content
15,918,976 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionUpdating the property window from my custom property page? Pin
Daed27-Aug-03 2:41
Daed27-Aug-03 2:41 
QuestionHow to catch exception? Pin
HansonDavid27-Aug-03 2:39
HansonDavid27-Aug-03 2:39 
AnswerRe: How to catch exception? Pin
Neville Franks27-Aug-03 10:29
Neville Franks27-Aug-03 10:29 
GeneralRe: How to catch exception? Pin
HansonDavid27-Aug-03 18:31
HansonDavid27-Aug-03 18:31 
GeneralRe: How do you link Dialog boxes together Pin
Maximilien27-Aug-03 2:37
Maximilien27-Aug-03 2:37 
GeneralRe: How do you link Dialog boxes together Pin
funjat27-Aug-03 4:00
funjat27-Aug-03 4:00 
GeneralRe: How do you link Dialog boxes together Pin
PremL27-Aug-03 5:36
PremL27-Aug-03 5:36 
GeneralCan't display a file with the SDI framework and CEditView Pin
Anonymous27-Aug-03 2:01
Anonymous27-Aug-03 2:01 
Hello all,

As a beginner in MFC/Visual C++, I'm trying to write a very simple text editor in order to learn things. I am using the SDI framework which associates a frame window, a view and a document. The code is very short and simple, and is nearly identical to the MULTIPAD sample found in VC++, except that it's using SDI instead of MDI.

When I type text in the window, it gets displayed correctly, but when I try to open a file, all I get on my screen are strange | characters and not the content of the file.

I've traced the program execution CEditView::SerializeRaw() (my CDocument derived class calls SerializeRaw() in its Serialize() method) to see what could be wrong. I've found that the file gets read properly, and looking at the buffer's content in CEditView::ReadFromArchive(), all is OK at this point. This suggests that something goes wrong after the call to CEditView::GetEditCtrl()::SetHandle(). Since SetHandle() is implemented using messages, I don't know how to debug this further.

I'm having a hard time figuring out what is possibly wrong with this code, and any help would be greatly appreciated. Smile | :)

Thanks,
Maxime
GeneralCan't display a file with the SDI framework and CEditView Pin
Maxime Henrion27-Aug-03 2:01
sussMaxime Henrion27-Aug-03 2:01 
GeneralPreTranslateMessage in ocx Pin
Dudi Avramov27-Aug-03 0:54
Dudi Avramov27-Aug-03 0:54 
GeneralRe: PreTranslateMessage in ocx Pin
igor196027-Aug-03 9:17
igor196027-Aug-03 9:17 
GeneralRe: PreTranslateMessage in ocx Pin
Dudi Avramov27-Aug-03 21:10
Dudi Avramov27-Aug-03 21:10 
GeneralRe: PreTranslateMessage in ocx Pin
igor196028-Aug-03 8:26
igor196028-Aug-03 8:26 
GeneralRe: PreTranslateMessage in ocx Pin
Dudi Avramov30-Aug-03 19:30
Dudi Avramov30-Aug-03 19:30 
GeneralCustom CWnd - Z-Order Pin
Andrew Birt27-Aug-03 0:49
Andrew Birt27-Aug-03 0:49 
GeneralRe: Custom CWnd - Z-Order Pin
l a u r e n27-Aug-03 7:56
l a u r e n27-Aug-03 7:56 
GeneralThreading problem (Threads, Dialogs and Messages) Pin
d-mon27-Aug-03 0:27
d-mon27-Aug-03 0:27 
GeneralRe: Threading problem (Threads, Dialogs and Messages) Pin
Neville Franks27-Aug-03 2:24
Neville Franks27-Aug-03 2:24 
GeneralRe: Threading problem (Threads, Dialogs and Messages) Pin
John M. Drescher27-Aug-03 4:54
John M. Drescher27-Aug-03 4:54 
GeneralRe: Threading problem (Threads, Dialogs and Messages) Pin
d_mon@email.si27-Aug-03 9:27
sussd_mon@email.si27-Aug-03 9:27 
GeneralRe: Threading problem (Threads, Dialogs and Messages) Pin
Neville Franks27-Aug-03 10:24
Neville Franks27-Aug-03 10:24 
GeneralRe: Threading problem (Threads, Dialogs and Messages) Pin
valikac27-Aug-03 12:53
valikac27-Aug-03 12:53 
Generallinking error Pin
bhawin1327-Aug-03 0:04
bhawin1327-Aug-03 0:04 
GeneralRe: linking error Pin
Ryan Binns27-Aug-03 0:45
Ryan Binns27-Aug-03 0:45 
Generallinking error Pin
bhawin1327-Aug-03 0:02
bhawin1327-Aug-03 0:02 

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.