Print Page | Close Window

CXTPTabClientWnd tab change icon

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=2428
Printed Date: 12 December 2024 at 1:36am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPTabClientWnd tab change icon
Posted By: ruanjiandev
Subject: CXTPTabClientWnd tab change icon
Date Posted: 21 June 2005 at 11:04pm

CXTPTabClientWnd tab dose not update the icon automatically when the MDIChild frame window icon is change by calling SetIcon(...). How to force the Client Tab update the icon?






Replies:
Posted By: Oleg
Date Posted: 22 June 2005 at 3:50am

TabClient send WM_XTP_GETTABICON first to get current icon:

BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd)
 //{{AFX_MSG_MAP(CChildFrame)
 ON_COMMAND(ID_BACK, OnBack)
 ON_MESSAGE(WM_XTP_GETTABICON, OnGetTabIcon)
 //}}AFX_MSG_MAP
END_MESSAGE_MAP()

void CChildFrame::OnBack()
{
 HICON hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
 SetIcon(hIcon, FALSE);
 GetParentFrame()->RecalcLayout();
}

LRESULT CChildFrame::OnGetTabIcon(WPARAM, LPARAM)
{
 return ::SendMessage(m_hWnd, WM_GETICON, ICON_SMALL, 0);
}



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: ruanjiandev
Date Posted: 22 June 2005 at 6:00am
Thank you very much. It works



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net