![]() |
Handling Close button of XTPFramwWnd |
Post Reply
|
| Author | |
babumohan
Newbie
Joined: 25 October 2006 Location: United Kingdom Status: Offline Points: 30 |
Post Options
Thanks(0)
Quote Reply
Topic: Handling Close button of XTPFramwWndPosted: 07 November 2006 at 6:04am |
|
How can I handle Close Button of XTPFrameWnd TitleBar
|
|
|
Babs
|
|
![]() |
|
babumohan
Newbie
Joined: 25 October 2006 Location: United Kingdom Status: Offline Points: 30 |
Post Options
Thanks(0)
Quote Reply
Posted: 07 November 2006 at 6:26am |
|
it is not for XTPFrameWnd. it is for CUEXTPDockWindow
|
|
|
Babs
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 07 November 2006 at 9:05am |
|
Hi,
See in MSDN WM_SYSCOMMAND and SC_CLOSE
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
babumohan
Newbie
Joined: 25 October 2006 Location: United Kingdom Status: Offline Points: 30 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 November 2006 at 4:55am |
|
Hi Good day. I would like to use CXTWndHook.
I tried with the above mentioned WM_SYSCOMMAND and SC_CLOSE. It is not working properly
|
|
|
Babs
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 November 2006 at 5:39am |
|
Hello,
Show code you tried.
WM_SYSCOMMAND +SC_CLOSE send if user press "X" buttton, but may be not if user Close using Alt+F4.
So also try catch standard WM_CLOSE message
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
babumohan
Newbie
Joined: 25 October 2006 Location: United Kingdom Status: Offline Points: 30 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 November 2006 at 5:52am |
|
I used CXTWndHook::WindowProc(message, wParam, lParam) to get all messages.
void CMyMainFrame::OnSysCommand(UINT nID, LPARAM lp)
{ if (nID==SC_CLOSE) { // ... // handle it return ; } // pass to base class: important! return CXTPFrameWnd::OnSysCommand(nID, lp); } |
|
|
Babs
|
|
![]() |
|
babumohan
Newbie
Joined: 25 October 2006 Location: United Kingdom Status: Offline Points: 30 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 November 2006 at 7:19am |
|
I used following ways to implemeent the above said interface
1 .CXTWndHook::WindowProc(message, wParam, lParam) to get all messages.
2. void CMyMainFrame::OnSysCommand(UINT nID, LPARAM lp)
{ if (nID==SC_CLOSE) { // ... // handle it return ; } // pass to base class: important! return CXTPFrameWnd::OnSysCommand(nID, lp); } |
|
|
Babs
|
|
![]() |
|
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 |