Solved

change formview title when using propertysheet

Posted on 2002-05-25
15
296 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
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
 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to create frequencies of a variable from SAS dataset? 10 125
Macro to save highlighted rows as a separate file 5 43
maxBlock challenge 30 128
while loop over for loop 7 101
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

786 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