Click here to Skip to main content
15,899,313 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Getting LogicalDriveInformation of different hard disks..... Pin
David Crow10-Jan-11 5:48
David Crow10-Jan-11 5:48 
QuestionRead Serial Port data [modified] Pin
shiv@nand8-Jan-11 0:15
shiv@nand8-Jan-11 0:15 
AnswerRe: Read Serial Port data Pin
User 74293388-Jan-11 1:48
professionalUser 74293388-Jan-11 1:48 
AnswerRe: Read Serial Port data Pin
Richard MacCutchan8-Jan-11 2:36
mveRichard MacCutchan8-Jan-11 2:36 
QuestionPopulate An Array With Numbers. Pin
Mike Certini7-Jan-11 10:39
Mike Certini7-Jan-11 10:39 
AnswerRe: Populate An Array With Numbers. Pin
Nuri Ismail7-Jan-11 10:48
Nuri Ismail7-Jan-11 10:48 
GeneralRe: Populate An Array With Numbers. Pin
Mike Certini7-Jan-11 12:40
Mike Certini7-Jan-11 12:40 
QuestionUsing CSplitterWnd OnCreateClient to split window Pin
cy163@hotmail.com7-Jan-11 4:32
cy163@hotmail.com7-Jan-11 4:32 
Hi All

I create a SDI project to implement splitting window using CSplitterWnd and OnCreateClient (VC 6.0).


In MainFrm.h, two CSplitterWnd member variables are declared

public:
	CMySplitter wndSplitter_horizontal;
CMySplitter wndSplitter_erect;


In MainFrm.cpp the OnCreateClienct function is as follows
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) 
{
	// TODO: Add your specialized code here and/or call the base class
	
	
if(wndSplitter_horizontal.CreateStatic(this,2,1)==NULL) 
	return FALSE;
	
	
wndSplitter_horizontal.CreateView(0,0,RUNTIME_CLASS(CMonitorTopView),CSize(50,50),pContext);//CMonitorTopView   CViewLeft
	
	
    
   if(wndSplitter_erect.CreateStatic(&wndSplitter_horizontal,1,2,WS_CHILD|WS_VISIBLE, wndSplitter_horizontal.IdFromRowCol(1, 0))==NULL)
		
	return FALSE; 
	
	
wndSplitter_erect.CreateView(0,0,RUNTIME_CLASS(CViewRight),CSize(220,220),pContext);//CMonitorRightView
	
	
wndSplitter_erect.CreateView(0,1,RUNTIME_CLASS(CViewRight),CSize(220,220),pContext); //CMonitorRightView
    
return TRUE;
}



It works fine when a CEditView based view 'CViewRight' or 'CViewLeft' is linked to the pane with CreateView(), but failed when a CFormView based view 'CViewRight_Dlg1111' , 'CMonitorTopView' or 'CMonitorRightView' is linked to the pane, though compiling is successful.

'CViewRight_Dlg1111' is created as follows,

(1) First create a dialog resource (IDD_Dlg_1111)
(2)Invoke the 'New Class' dialog box
Class Type: MFC class
Base Class: CFormView
Dialog ID: IDD_Dlg_1111


Creating 'CMonitorTopView' and 'CMonitorRightView' follows the same way.

Also, I find that the program works fine when classes derived from CEditView, CTreeView, CView are linked to the pane .

i do not know why. Please help


I would like the program to deploy the multi-pane layout only when the user clicking a menu item, How to do this.
AnswerRe: Using CSplitterWnd OnCreateClient to split window Pin
Eugen Podsypalnikov7-Jan-11 9:05
Eugen Podsypalnikov7-Jan-11 9:05 
Questionmanipulation de bits dans une variable quelconque Pin
andromida7-Jan-11 3:52
andromida7-Jan-11 3:52 
AnswerRe: manipulation de bits dans une variable quelconque Pin
Yusuf7-Jan-11 3:55
Yusuf7-Jan-11 3:55 
AnswerRe: manipulation de bits dans une variable quelconque Pin
Code-o-mat7-Jan-11 3:57
Code-o-mat7-Jan-11 3:57 
AnswerRe: manipulation de bits dans une variable quelconque Pin
User 74293387-Jan-11 4:02
professionalUser 74293387-Jan-11 4:02 
AnswerRe: manipulation de bits dans une variable quelconque Pin
Luc Pattyn7-Jan-11 5:26
sitebuilderLuc Pattyn7-Jan-11 5:26 
QuestionNot able to Read Contents for File while Reading Huge Amount of data. Pin
janaswamy uday7-Jan-11 3:37
janaswamy uday7-Jan-11 3:37 
AnswerRe: Not able to Read Contents for File while Reading Huge Amount of data. Pin
CPallini7-Jan-11 3:43
mveCPallini7-Jan-11 3:43 
AnswerRe: Not able to Read Contents for File while Reading Huge Amount of data. Pin
Paresh Chitte7-Jan-11 3:54
Paresh Chitte7-Jan-11 3:54 
AnswerRe: Not able to Read Contents for File while Reading Huge Amount of data. Pin
David Crow7-Jan-11 4:12
David Crow7-Jan-11 4:12 
AnswerRe: Not able to Read Contents for File while Reading Huge Amount of data. Pin
Richard MacCutchan7-Jan-11 5:38
mveRichard MacCutchan7-Jan-11 5:38 
AnswerRe: Not able to Read Contents for File while Reading Huge Amount of data. Pin
Andrew Brock10-Jan-11 23:55
Andrew Brock10-Jan-11 23:55 
GeneralRe: Not able to Read Contents for File while Reading Huge Amount of data. Pin
janaswamy uday11-Jan-11 18:24
janaswamy uday11-Jan-11 18:24 
Question#include "testView.h" in MainFrm.cpp [modified] Pin
cy163@hotmail.com7-Jan-11 2:24
cy163@hotmail.com7-Jan-11 2:24 
AnswerRe: #include "testView.h" in MainFrm.cpp Pin
Niklas L7-Jan-11 2:43
Niklas L7-Jan-11 2:43 
GeneralRe: #include "testView.h" in MainFrm.cpp Pin
cy163@hotmail.com7-Jan-11 3:31
cy163@hotmail.com7-Jan-11 3:31 
AnswerRe: #include "testView.h" in MainFrm.cpp Pin
User 74293387-Jan-11 3:53
professionalUser 74293387-Jan-11 3:53 

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.