Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Handling Close button of XTPFramwWnd
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Handling Close button of XTPFramwWnd

 Post Reply Post Reply
Author
Message
babumohan View Drop Down
Newbie
Newbie
Avatar

Joined: 25 October 2006
Location: United Kingdom
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote babumohan Quote  Post ReplyReply Direct Link To This Post Topic: Handling Close button of XTPFramwWnd
    Posted: 07 November 2006 at 6:04am
How can I handle Close Button of XTPFrameWnd TitleBar
Babs
Back to Top
babumohan View Drop Down
Newbie
Newbie
Avatar

Joined: 25 October 2006
Location: United Kingdom
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote babumohan Quote  Post ReplyReply Direct Link To This Post Posted: 07 November 2006 at 6:26am
it is not for XTPFrameWnd.  it is for CUEXTPDockWindow
Babs
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 07 November 2006 at 9:05am
Hi,
 
See in MSDN WM_SYSCOMMAND and SC_CLOSE
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
babumohan View Drop Down
Newbie
Newbie
Avatar

Joined: 25 October 2006
Location: United Kingdom
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote babumohan Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 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
Back to Top
babumohan View Drop Down
Newbie
Newbie
Avatar

Joined: 25 October 2006
Location: United Kingdom
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote babumohan Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
babumohan View Drop Down
Newbie
Newbie
Avatar

Joined: 25 October 2006
Location: United Kingdom
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote babumohan Quote  Post ReplyReply Direct Link To This Post 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
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.063 seconds.