![]() |
How to change title of a Tab. But not doc-title |
Post Reply
|
| Author | |
Sacha
Newbie
Joined: 04 January 2007 Status: Offline Points: 2 |
Post Options
Thanks(0)
Quote Reply
Topic: How to change title of a Tab. But not doc-titlePosted: 04 January 2007 at 4:24am |
|
Hallo!
I have that problem. I creat a doc and show it in a MDI with taps. now i open a part of this doc in a new view with a new tab. But the new tab hase the same title (the title of the doc). If i change the title with SetTitle() it change the title from the first tab also. Pleas Help. |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 04 January 2007 at 6:04am |
|
Hi,
Catch WM_XTP_GETWINDOWTEXT message in CChildFrame and reeturn (LPCTSTR) points to Tab Caption you need.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Sacha
Newbie
Joined: 04 January 2007 Status: Offline Points: 2 |
Post Options
Thanks(0)
Quote Reply
Posted: 04 January 2007 at 7:30am |
|
Oh thank you it works
|
|
![]() |
|
leo_12
Groupie
Joined: 12 April 2005 Location: Germany Status: Offline Points: 17 |
Post Options
Thanks(0)
Quote Reply
Posted: 16 January 2007 at 12:00pm |
|
Hi Oleg,
I have implemented a message handler as you suggested, but the compiler constantly tells me that he cannot convert from LPCTSTR to LRESULT.
![]() So, what's wrong with my code below?
Heiko
|
|
![]() |
|
mgampi
Senior Member
Joined: 14 July 2003 Status: Offline Points: 1210 |
Post Options
Thanks(0)
Quote Reply
Posted: 17 January 2007 at 8:47am |
|
Hi Heiko;
You have to cast m_strTabTitle to LRESULT not to LPCTSTR!
The sender of the message knows how to interpret the LRESULT param - in this case its a const pointer to a string.
try
return reinterpret_cast<LRESULT>(m_strTabTitle);
or if m_strTabTitle is of type CString
return reinterpret_cast<LRESULT>(reinterpret_cast<LPCTSTR>(m_strTabTitle));
You can do it also in old C style... return (LRESULT)m_strTabTitle
|
|
|
Martin Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
|
![]() |
|
leo_12
Groupie
Joined: 12 April 2005 Location: Germany Status: Offline Points: 17 |
Post Options
Thanks(0)
Quote Reply
Posted: 17 January 2007 at 9:28am |
|
Thanks Martin,
the cast (LRESULT)((LPCTSTR)m_strTabTitle) works. Maybe the help-topics of WM_XTP_GETWINDOWTEXT and WM_XTP_GETWINDOWTOOLTIP should be updated.
Heiko
|
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |