Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - CXTPTabClientWnd tab change icon
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPTabClientWnd tab change icon

 Post Reply Post Reply
Author
Message
ruanjiandev View Drop Down
Newbie
Newbie


Joined: 16 June 2005
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote ruanjiandev Quote  Post ReplyReply Direct Link To This Post Topic: CXTPTabClientWnd tab change icon
    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?



Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
ruanjiandev View Drop Down
Newbie
Newbie


Joined: 16 June 2005
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote ruanjiandev Quote  Post ReplyReply Direct Link To This Post Posted: 22 June 2005 at 6:00am
Thank you very much. It works
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.219 seconds.