Click here to Skip to main content
16,004,977 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
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 
You are trying in your code to create CView Windows! The way of creating a New View is use:
CDocTemplate::CreateNewFrame
virtual CFrameWnd* CreateNewFrame( CDocument* pDoc, CFrameWnd* pOther );

Goto Scribble to see how

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.

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



LateNightsInNewry

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 
AnswerRe: How can I grayed out i.e. Enable or dissable the controls from Tool bar Pin
Amar Sutar4-Aug-06 23:40
Amar Sutar4-Aug-06 23:40 
AnswerRe: How can I grayed out i.e. Enable or dissable the controls from Tool bar Pin
Hamid_RT5-Aug-06 2:40
Hamid_RT5-Aug-06 2:40 
Questioncommunication b/w modeless dlg and its parent Pin
GANsJob4-Aug-06 21:46
GANsJob4-Aug-06 21:46 

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.