Click here to Skip to main content
15,892,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: What does this mean? Pin
SmilingHeart13-Dec-02 21:56
SmilingHeart13-Dec-02 21:56 
GeneralRe: What does this mean? Pin
Taka Muraoka13-Dec-02 22:03
Taka Muraoka13-Dec-02 22:03 
GeneralFile Management :: Win32 Pin
valikac13-Dec-02 12:12
valikac13-Dec-02 12:12 
GeneralRe: File Management :: Win32 Pin
Christian Graus13-Dec-02 12:52
protectorChristian Graus13-Dec-02 12:52 
GeneralRe: File Management :: Win32 Pin
valikac13-Dec-02 13:14
valikac13-Dec-02 13:14 
GeneralRe: File Management :: Win32 Pin
Michael Dunn13-Dec-02 15:29
sitebuilderMichael Dunn13-Dec-02 15:29 
GeneralRe: File Management :: Win32 Pin
valikac13-Dec-02 16:06
valikac13-Dec-02 16:06 
QuestionHow to get pointer of a view in Splitter in document? Pin
13-Dec-02 9:52
suss13-Dec-02 9:52 
I have an SDI Application with a splitter as follows

------------------------------------------------------------------
Property Sheet containing a few tabs
------------------------------------------------------------------
Log View
------------------------------------------------------------------


Most of the application activities happen in the upper pane where i have a property sheet containing few tabs that have bunch of controls
All the data is contained in the document class. Every activity is logged in the lower pane which contains a CListView
In the document template i have attached the document with the view used in the upper pane.
I created the panes in CMainFrame as follows.

BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
BOOL flag;

if (!Splitter.CreateStatic(this,2,1))
return FALSE;

flag=Splitter.CreateView(0, 0,pContext->m_pNewViewClass,CSize u(90,90), pContext);
if(!flag)
return FALSE;

pContext->m_pNewViewClass= RUNTIME_CLASS(CLoggingView);
flag=Splitter.CreateView(1,0,pContext->m_pNewViewClass,CSize s(10,10),pContext);
return flag;
}

Now i basically need a pointer to the lower pane Log View in my document as document as all the data which is required while logging. The way i am doing it is basically since i know that this is the second view, i am iterating through the two views and getting the keeping the second view as pointer to log view, as shown below. Have feeling this is not the best way of doing this.

bool anotherfFlag = true;
POSITION posi = GetFirstViewPosition();
while (pos != NULL)
{
CView* pView = GetNextView(posi);
if (!anotherfFlag )
m_PointerToLogView = (CLoggingView*)pView;

anotherfFlag = false;
}

Could you please suggest some better way of doing this?

GeneralMy program will not execute. Pin
Anonymous13-Dec-02 9:41
Anonymous13-Dec-02 9:41 
GeneralRe: My program will not execute. Pin
will138313-Dec-02 9:45
will138313-Dec-02 9:45 
GeneralRe: My program will not execute. Pin
Christian Graus13-Dec-02 9:49
protectorChristian Graus13-Dec-02 9:49 
GeneralRe: My program will not execute. Pin
Gary Kirkham13-Dec-02 10:36
Gary Kirkham13-Dec-02 10:36 
GeneralRe: My program will not execute. Pin
Michael Dunn13-Dec-02 15:32
sitebuilderMichael Dunn13-Dec-02 15:32 
QuestionHow to display a string vertically? Pin
Vincent Ye13-Dec-02 8:31
Vincent Ye13-Dec-02 8:31 
AnswerRe: How to display a string vertically? Pin
Gary Kirkham13-Dec-02 10:46
Gary Kirkham13-Dec-02 10:46 
AnswerRe: How to display a string vertically? Pin
Alvaro Mendez13-Dec-02 11:02
Alvaro Mendez13-Dec-02 11:02 
GeneralRe: How to display a string vertically? Pin
Vincent Ye13-Dec-02 17:44
Vincent Ye13-Dec-02 17:44 
Generaldeleting a node Pin
Anonymous13-Dec-02 8:07
Anonymous13-Dec-02 8:07 
GeneralRe: deleting a node Pin
Nick Parker13-Dec-02 8:33
protectorNick Parker13-Dec-02 8:33 
GeneralMSFledGrid...Help Pin
Anonymous13-Dec-02 8:06
Anonymous13-Dec-02 8:06 
Generaliostream Pin
will138313-Dec-02 7:51
will138313-Dec-02 7:51 
GeneralRe: iostream Pin
Nick Parker13-Dec-02 8:19
protectorNick Parker13-Dec-02 8:19 
GeneralRe: iostream Pin
will138313-Dec-02 8:29
will138313-Dec-02 8:29 
GeneralSearches Pin
will138313-Dec-02 7:49
will138313-Dec-02 7:49 
GeneralRe: Searches Pin
Alvaro Mendez13-Dec-02 8:15
Alvaro Mendez13-Dec-02 8:15 

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.