Solved

change formview title when using propertysheet

Posted on 2002-05-25
15
277 Views
Last Modified: 2013-11-20
hi,

i am doing an mdi app.
in the childframe i have a form view/doc and in it i got a propertysheet with 2 property pages.

when i go to the "windows" menu i see the number 1 only with no title near it.

i guess i should use SetWindowText("blabla") some where but it doesnt work good for me.

i want to have the option to change this according to the open doc.
thanks
0
Comment
Question by:talsp
  • 8
  • 7
15 Comments
 
LVL 1

Accepted Solution

by:
gurly earned 100 total points
ID: 7034996
I'm not sure I understood what you're trying to do, but if I got you right - you are trying to change the title of the child frame, right ?
have you tried using SetTitle on the document ?
0
 

Author Comment

by:talsp
ID: 7035069
i tried SetTitle in the document but it doesn't work.
0
 
LVL 1

Expert Comment

by:gurly
ID: 7035124
Did I understand you correctly ?
Is that what you're trying to achieve ?
> you are trying to change the title of the child frame, right ?
0
 
LVL 1

Expert Comment

by:gurly
ID: 7035125
Did I understand you correctly ?
Is that what you're trying to achieve ?
> you are trying to change the title of the child frame, right ?
0
 

Author Comment

by:talsp
ID: 7035135
yes, thats what i am trying to do.

i want to change the title of the child frame.
i want to have also the option to change it according to a serial number i am setting.

thanks.
0
 
LVL 1

Expert Comment

by:gurly
ID: 7035183
Where did you use the SetTitle ?
0
 

Author Comment

by:talsp
ID: 7035197
i am trying to do it outside the cchildframe
because if i am doing it in cchildframe i dont see a way how to change it according to changes i want to make to the name
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 1

Expert Comment

by:gurly
ID: 7035206
Did you try from the view ?
Something like - GetDocument()->SetTitle("blabla") ?
0
 

Author Comment

by:talsp
ID: 7035221
i tried but i am getting an error using the getdocument function.
0
 
LVL 1

Expert Comment

by:gurly
ID: 7035242
What error ?
Is your view attached to a document in a doc - template mechanism ?
0
 

Author Comment

by:talsp
ID: 7035264
yes the view attached to a doc in a doc template mechanism.

the assert is on:
BOOL CObject::IsKindOf(const CRuntimeClass* pClass) const
{
     ASSERT(this != NULL);
0
 
LVL 1

Expert Comment

by:gurly
ID: 7035287
Do you call the GetDocument() after OnInitialUpdate() was called ? and before the view is destoyed ?
Are you sure the view object is a valid window when you call GetDocument()
0
 

Author Comment

by:talsp
ID: 7035327
yes i am doing it on a button click.
0
 
LVL 1

Expert Comment

by:gurly
ID: 7035358
well,
I'm sorry.
This is how far I get.
I woyld have focused on that assert if I were you, but I can't really think why it occurs.
0
 

Author Comment

by:talsp
ID: 7035376
well thanks for the effort.
its up to me now to find the error but u surly help me.
thanks.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now