• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 323
  • Last Modified:

change formview title when using propertysheet

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
talsp
Asked:
talsp
  • 8
  • 7
1 Solution
 
gurlyCommented:
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
 
talspAuthor Commented:
i tried SetTitle in the document but it doesn't work.
0
 
gurlyCommented:
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
gurlyCommented:
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
 
talspAuthor Commented:
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
 
gurlyCommented:
Where did you use the SetTitle ?
0
 
talspAuthor Commented:
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
 
gurlyCommented:
Did you try from the view ?
Something like - GetDocument()->SetTitle("blabla") ?
0
 
talspAuthor Commented:
i tried but i am getting an error using the getdocument function.
0
 
gurlyCommented:
What error ?
Is your view attached to a document in a doc - template mechanism ?
0
 
talspAuthor Commented:
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
 
gurlyCommented:
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
 
talspAuthor Commented:
yes i am doing it on a button click.
0
 
gurlyCommented:
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
 
talspAuthor Commented:
well thanks for the effort.
its up to me now to find the error but u surly help me.
thanks.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 8
  • 7
Tackle projects and never again get stuck behind a technical roadblock.
Join Now