Click here to Skip to main content
15,898,134 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Hello all I want to capture an image from a Camera Pin
Chiew Heng Wah3-Mar-04 14:47
Chiew Heng Wah3-Mar-04 14:47 
GeneralRe: Hello all I want to capture an image from a Camera Pin
GegoTheWizard23-Mar-04 12:51
GegoTheWizard23-Mar-04 12:51 
GeneralMFC help!!! Pin
modeonetwo2-Mar-04 8:58
modeonetwo2-Mar-04 8:58 
GeneralRe: MFC help!!! Pin
GegoTheWizard2-Mar-04 9:23
GegoTheWizard2-Mar-04 9:23 
GeneralRe: MFC help!!! Pin
David Crow2-Mar-04 9:23
David Crow2-Mar-04 9:23 
GeneralRe: MFC help!!! Pin
modeonetwo2-Mar-04 12:43
modeonetwo2-Mar-04 12:43 
GeneralTrying to create static splitter... Pin
Nat292-Mar-04 7:41
Nat292-Mar-04 7:41 
GeneralRe: Trying to create static splitter... Pin
Antti Keskinen2-Mar-04 8:24
Antti Keskinen2-Mar-04 8:24 
In order for this to work, both of your view classes must support dynamic creation.

The macro 'DECLARE_DYNCREATE' or 'DECLARE_DYNAMIC' must be found at the start of both classes header files. The parameter for the macro is the class name.
Additionally, a macro 'IMPLEMENT_DYNCREATE' or 'IMPLEMENT_DYNAMIC' must be placed near the top of your implementation file (after the headers, but before function definitions). Parameters for this macro are the class name and the name of the base class.

See the MSDN for information about the differences between these macros.

If all macros are correctly placed in your files, then see if the error is caused by missing header files. Your main frame implementation file must have the header files of both view classes. Otherwise an error is generated.

In addition, the way you create the views is a bit dangerous. A more convinient way is to add the headers into the main frame header file, then create two member variables (either static or dynamic), one of each view class. After this, you can create the views, and specify the splitter window as the parent. Using 'CSplitterWnd::IdFromRowCol' allows you to get the identifier of the pane. When you put this identifier as the id of the newly created view window, the view gets placed into inside the pane.

If you use this technique, however, you must be certain that you destroy the views when your program is closing up. You must first destroy the view windows, then destroy the splitter window, and after this, if you used dynamic variables, you can delete the reserved memory.

There is an article in the works about this method. I'm not sure when it will be out, but I bet in the next few months or so..

-Antti Keskinen

----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
GeneralRe: Trying to create static splitter... Pin
Nat292-Mar-04 9:15
Nat292-Mar-04 9:15 
GeneralRe: Trying to create static splitter... Pin
David Crow2-Mar-04 9:27
David Crow2-Mar-04 9:27 
GeneralRe: Trying to create static splitter... Pin
Nat292-Mar-04 10:34
Nat292-Mar-04 10:34 
GeneralRe: Trying to create static splitter... Pin
David Crow2-Mar-04 10:37
David Crow2-Mar-04 10:37 
GeneralRe: Trying to create static splitter... Pin
Nat292-Mar-04 11:22
Nat292-Mar-04 11:22 
GeneralGetting content from HTML control Pin
Vikram A Punathambekar2-Mar-04 5:55
Vikram A Punathambekar2-Mar-04 5:55 
GeneralRe: Getting content from HTML control Pin
Ravi Bhavnani2-Mar-04 6:58
professionalRavi Bhavnani2-Mar-04 6:58 
GeneralRe: Getting content from HTML control Pin
Vikram A Punathambekar2-Mar-04 7:05
Vikram A Punathambekar2-Mar-04 7:05 
GeneralRe: Getting content from HTML control Pin
Ravi Bhavnani2-Mar-04 7:47
professionalRavi Bhavnani2-Mar-04 7:47 
GeneralRe: Getting content from HTML control Pin
Vikram A Punathambekar2-Mar-04 7:34
Vikram A Punathambekar2-Mar-04 7:34 
GeneralRe: Getting content from HTML control Pin
Ravi Bhavnani2-Mar-04 7:50
professionalRavi Bhavnani2-Mar-04 7:50 
GeneralRe: Getting content from HTML control Pin
Ravi Bhavnani2-Mar-04 8:22
professionalRavi Bhavnani2-Mar-04 8:22 
GeneralRe: Getting content from HTML control Pin
Vikram A Punathambekar2-Mar-04 9:32
Vikram A Punathambekar2-Mar-04 9:32 
GeneralRe: Getting content from HTML control Pin
Ravi Bhavnani2-Mar-04 11:17
professionalRavi Bhavnani2-Mar-04 11:17 
GeneralRe: Getting content from HTML control Pin
David Crow2-Mar-04 7:29
David Crow2-Mar-04 7:29 
GeneralWriting large STL vectors to file Pin
inter8ection2-Mar-04 5:52
inter8ection2-Mar-04 5:52 
GeneralRe: Writing large STL vectors to file Pin
valikac2-Mar-04 18:06
valikac2-Mar-04 18:06 

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.