Click here to Skip to main content
15,890,845 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Class templates Pin
Michael Dunn5-Aug-06 13:36
sitebuilderMichael Dunn5-Aug-06 13:36 
GeneralRe: Class templates Pin
Jörgen Sigvardsson5-Aug-06 13:42
Jörgen Sigvardsson5-Aug-06 13:42 
QuestionRe: Class templates Pin
jon-805-Aug-06 13:41
professionaljon-805-Aug-06 13:41 
AnswerRe: Class templates Pin
Jörgen Sigvardsson5-Aug-06 13:18
Jörgen Sigvardsson5-Aug-06 13:18 
AnswerRe: Class templates Pin
Jörgen Sigvardsson5-Aug-06 13:20
Jörgen Sigvardsson5-Aug-06 13:20 
QuestionRe: Class templates [modified] Pin
jon-805-Aug-06 18:43
professionaljon-805-Aug-06 18:43 
QuestionCreate a CView as a "child window" without any borders etc Pin
Tengil995-Aug-06 7:32
Tengil995-Aug-06 7:32 
AnswerRe: Create a CView as a "child window" without any borders etc Pin
Bram van Kampen5-Aug-06 15:38
Bram van Kampen5-Aug-06 15:38 
I Understand that you want to create an independent CView derrived Class. Cannot be done!(or, Can be done, but not with any comfort). you see, you are jumping into the middle of a very complicated protocol,A View is not an independent window class, it is a view, or "rendering", of an underlaying document! The document is what you store on disk. the View class paints it on the screen.When you start messing with the DYNCREATE Macro, you start messing with underlying structures which connect the underlying file to the view. That mechanism is also a link in the chain which enables you to paste a section of what you see in a view into say an excell sheet.(however, in order to do so, far more code is needed)

The Document and the View are parts of a complicated suite of software which you got free with the compiler, it is called the MFC Framework, and you cannot in general change something in the middle, without affecting the whole. As Soon as you try, you get these strange errors.In General you have two options, Work with MFC, and follow its rules. This means in this case that you get things done in a view by making changes in the underlying document, and notify the view that things have changed. Just follow the scribble tutorial ( And DO SO, even if you have 10 years experience) to see how that's done!
Writing for MFC is not easy,things often must be done "the long way around", but there are benefits to be gained. If you follow the rules, an upgrade to the next window release, generally involves only recompilation. Also any advances in MFC will add functionality to your prrogram by no other means than your customers installing the Next service pack for their operating system.

The alternative is to roll your own! Derrive a Main Frame Class window from CMainFrame, and a Child Window from class CChildFrame, and paint your info by hand as required. Somethimes this is the right way to go! But, if you are trying to paint your own data in a View window, See Scribble

LateNightsInNewry

QuestionCSplitterWnd error [modified] Pin
Tengil995-Aug-06 6:53
Tengil995-Aug-06 6:53 
AnswerRe: My CSplitterWnd class Pin
Tengil995-Aug-06 6:54
Tengil995-Aug-06 6:54 
AnswerRe: CSplitterWnd error Pin
Bram van Kampen5-Aug-06 15:59
Bram van Kampen5-Aug-06 15:59 
GeneralRe: CSplitterWnd error Pin
Tengil996-Aug-06 1:14
Tengil996-Aug-06 1:14 
Questionfstream object not cleared from memory Pin
jon-805-Aug-06 4:01
professionaljon-805-Aug-06 4:01 
AnswerRe: fstream object not cleared from memory Pin
Gary R. Wheeler5-Aug-06 5:42
Gary R. Wheeler5-Aug-06 5:42 
GeneralRe: fstream object not cleared from memory Pin
jon-805-Aug-06 6:09
professionaljon-805-Aug-06 6:09 
QuestionAdd a non-resource-dialog to a CPropertySheet Pin
Tengil995-Aug-06 3:43
Tengil995-Aug-06 3:43 
AnswerRe: Add a non-resource-dialog to a CPropertySheet Pin
Tengil995-Aug-06 6:48
Tengil995-Aug-06 6:48 
QuestionActive Foreground Window Pin
Imtiaz Murtaza5-Aug-06 1:44
Imtiaz Murtaza5-Aug-06 1:44 
Questionhow to select CListCtrl Items programatically Pin
GANsJob5-Aug-06 0:54
GANsJob5-Aug-06 0:54 
AnswerRe: how to select CListCtrl Items programatically Pin
Hamid_RT5-Aug-06 1:33
Hamid_RT5-Aug-06 1:33 
AnswerRe: how to select CListCtrl Items programatically Pin
Marc Soleda5-Aug-06 3:54
Marc Soleda5-Aug-06 3:54 
QuestionReading Media File in 100 thread instances Pin
Andy Rama5-Aug-06 0:47
Andy Rama5-Aug-06 0:47 
QuestionCOPY AND PASTE CODE in vc++ Pin
ningthemcha4-Aug-06 23:57
ningthemcha4-Aug-06 23:57 
AnswerRe: COPY AND PASTE CODE in vc++ Pin
Hans Dietrich5-Aug-06 17:37
mentorHans Dietrich5-Aug-06 17:37 
QuestionHow can I grayed out i.e. Enable or dissable the controls from Tool bar Pin
Sameer_Thakur4-Aug-06 23:26
Sameer_Thakur4-Aug-06 23:26 

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.