![]() |
How to change title of a Tab. But not doc-title |
Post Reply ![]() |
Author | |
Sacha ![]() Newbie ![]() Joined: 04 January 2007 Status: Offline Points: 2 |
![]() ![]() ![]() ![]() ![]() Posted: 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 ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
![]() ![]() ![]() ![]() ![]() |
Oh thank you it works
![]() |
|
![]() |
|
leo_12 ![]() Groupie ![]() ![]() Joined: 12 April 2005 Location: Germany Status: Offline Points: 17 |
![]() ![]() ![]() ![]() ![]() |
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: 1201 |
![]() ![]() ![]() ![]() ![]() |
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 |
![]() ![]() ![]() ![]() ![]() |
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 |