Click here to Skip to main content
15,921,371 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionserial.Open(_T("COM1")); in CSerial class Pin
m-hwang23-Mar-07 14:01
m-hwang23-Mar-07 14:01 
AnswerRe: serial.Open(_T("COM1")); in CSerial class Pin
Cedric Moonen23-Mar-07 22:41
Cedric Moonen23-Mar-07 22:41 
GeneralRe: serial.Open(_T("COM1")); in CSerial class Pin
m-hwang24-Mar-07 5:50
m-hwang24-Mar-07 5:50 
AnswerRe: serial.Open(_T("COM1")); in CSerial class Pin
Gary R. Wheeler24-Mar-07 2:47
Gary R. Wheeler24-Mar-07 2:47 
QuestionEject one USB device on multiple USB devices Pin
fuxiangwu23-Mar-07 12:37
fuxiangwu23-Mar-07 12:37 
QuestionNewbie learning MFC, confused about Document/View Pin
maxmaven23-Mar-07 10:26
maxmaven23-Mar-07 10:26 
AnswerRe: Newbie learning MFC, confused about Document/View Pin
Gary R. Wheeler24-Mar-07 3:37
Gary R. Wheeler24-Mar-07 3:37 
GeneralRe: Newbie learning MFC, confused about Document/View Pin
maxmaven24-Mar-07 9:37
maxmaven24-Mar-07 9:37 
This is why I'm confused. So just to recall, I have UsefulSplitterWnd and two child views of the split. The left one is a CTreeView and the right one is a CFormView. Each of the CFormViews has an associated dialog that it displays.

Here's what I've tried with these CFormViews. First, I tried overriding OnCreate(...). But this function is never called at any time during execution of my application.

Next, I tried overriding OnUpdate(...) and OnInitialUpdate(...). I put breakpoints in these functions and found that they are only executed once, at the start up of the application. They are never called again, even when CUsefulSplitterWnd::replaceview(...) is called.

There are basically two important functions that CUsefulSplitterWnd::replaceview(...) calls. They are:

// Delete existing view 
((CView *) GetPane(row,col))->DestroyWindow();


This destroys the window associated with the CFormView. However, in searching the MSDN help docs, it says that this function doesn't destroy the CFormView class object. So my class must be around somewhere (?).

The second important function is:

// Create new view                      
   
context.m_pNewViewClass=pViewClass;
context.m_pCurrentDoc=pDoc;
context.m_pNewDocTemplate=NULL;
context.m_pLastView=NULL;
context.m_pCurrentFrame=NULL;
   
CreateView(row,col,pViewClass,size, &context);


This should be telling me what function I need to override so that the dialog is initialized to the saved values in my CDocument subclass. But, I tried all the sensible functions. They are either never called in the app, or only called once at app startup.

I'm pretty lost. Confused | :confused:

Max
Questionalways load windows default color scheme in a dialog??? Pin
tiflo23-Mar-07 9:28
tiflo23-Mar-07 9:28 
QuestionContext Menu and displaying menu on screen Pin
flippydeflippydebop23-Mar-07 8:17
flippydeflippydebop23-Mar-07 8:17 
AnswerRe: Context Menu and displaying menu on screen Pin
flippydeflippydebop23-Mar-07 8:39
flippydeflippydebop23-Mar-07 8:39 
Questionany fn to know the memoru allocated by SafeArrayCreate() Pin
GANsJob23-Mar-07 7:24
GANsJob23-Mar-07 7:24 
AnswerRe: any fn to know the memoru allocated by SafeArrayCreate() Pin
prasad_som23-Mar-07 20:44
prasad_som23-Mar-07 20:44 
Questioncan't retrieve the string from string table using loadstring() Pin
GANsJob23-Mar-07 7:16
GANsJob23-Mar-07 7:16 
AnswerRe: can't retrieve the string from string table using loadstring() Pin
perle123-Mar-07 14:22
perle123-Mar-07 14:22 
Questionconfusing problem Pin
swatgodjr23-Mar-07 6:58
swatgodjr23-Mar-07 6:58 
AnswerRe: confusing problem Pin
Christian Graus23-Mar-07 7:10
protectorChristian Graus23-Mar-07 7:10 
GeneralRe: confusing problem Pin
swatgodjr23-Mar-07 7:42
swatgodjr23-Mar-07 7:42 
AnswerRe: confusing problem Pin
Phil J Pearson23-Mar-07 7:38
Phil J Pearson23-Mar-07 7:38 
AnswerRe: confusing problem Pin
Sameerkumar Namdeo23-Mar-07 22:22
Sameerkumar Namdeo23-Mar-07 22:22 
GeneralRe: confusing problem Pin
swatgodjr24-Mar-07 2:52
swatgodjr24-Mar-07 2:52 
GeneralRe: confusing problem Pin
Sameerkumar Namdeo25-Mar-07 16:48
Sameerkumar Namdeo25-Mar-07 16:48 
QuestionInitializtion Code for Dialog Boxes Pin
gunner_uk200023-Mar-07 4:48
gunner_uk200023-Mar-07 4:48 
AnswerRe: Initializtion Code for Dialog Boxes Pin
led mike23-Mar-07 4:52
led mike23-Mar-07 4:52 
AnswerRe: Initializtion Code for Dialog Boxes Pin
Ravi Bhavnani23-Mar-07 6:33
professionalRavi Bhavnani23-Mar-07 6:33 

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.