Solved

change formview title when using propertysheet

Posted on 2002-05-25
15
289 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Login Script to Copy Folders 12 29
ASCII Non-Printable characters/codes and their HTML equivalents 6 106
dog bark java program 15 87
format the code in java 6 86
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

867 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

23 Experts available now in Live!

Get 1:1 Help Now