Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - How to make PopupControl hide gradually
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to make PopupControl hide gradually

 Post Reply Post Reply
Author
Message
jigarmehtamscit View Drop Down
Groupie
Groupie
Avatar

Joined: 29 October 2005
Location: India
Status: Offline
Points: 64
Post Options Post Options   Thanks (0) Thanks(0)   Quote jigarmehtamscit Quote  Post ReplyReply Direct Link To This Post Topic: How to make PopupControl hide gradually
    Posted: 26 November 2005 at 1:08pm
Hi,

    I am using PopupControl to show the MSN kind of popup in my application.. Now, on click of the close button, I want the popup control to be hidden gradually (with the method it appeared.. for me, its xtpPopupAnimationSlide right now.. So, is that possible ?? If yes, how.. ?

    Right now, I am using method described as follows to hide it,

m_wndPopupControl.Close();

but it disappears immediately which is not what I wanted..

Regards,
Jigar Mehta
Back to Top
jigarmehtamscit View Drop Down
Groupie
Groupie
Avatar

Joined: 29 October 2005
Location: India
Status: Offline
Points: 64
Post Options Post Options   Thanks (0) Thanks(0)   Quote jigarmehtamscit Quote  Post ReplyReply Direct Link To This Post Posted: 26 November 2005 at 1:27pm
Originally posted by jigarmehtamscit jigarmehtamscit wrote:

Hi,

    I am using PopupControl to show the MSN kind of popup in my application.. Now, on click of the close button, I want the popup control to be hidden gradually (with the method it appeared.. for me, its xtpPopupAnimationSlide right now.. So, is that possible ?? If yes, how.. ?

    Right now, I am using method described as follows to hide it,

m_wndPopupControl.Close();

but it disappears immediately which is not what I wanted..



Another question regarding the same popup control is, I want my pop control to be shown in the right bottom corner of the screen.. I have status bar, toolbar and menubar of CJ in my application.. Now, to calculate the user screen size in my application I am using this function,

    xRightBottom = GetSystemMetrics(SM_CXFULLSCREEN);
    yRightBottom = GetSystemMetrics(SM_CYFULLSCREEN);

Which should give the right-bottom pixel which is not obscured by the taskbar.. because user can have variable height task bar in windows.. Now, if i use this code, I get my popup slightly (some 15 pixels) above the taskbar.. which looks very ugly.. My code for setting the popup control is as below,

m_wndPopupControl.SetPopupPos(CPoint(xRightBottom,yRightBott om));

Am I wrong somewhere ?? I want my popup to be at the right-bottom and above taskbar.. So, what should I do ?
Regards,
Jigar Mehta
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: 27 November 2005 at 3:56am

Hi,

1. guess it must be m_wndPopupControl.Hide();

2. You need SPI_GETWORKAREA instead

 CRect rcDeskWnd;
 //get desctop parameters
 ::SystemParametersInfo(SPI_GETWORKAREA, 0, &rcDeskWnd, 0);
xRightBottom =  rcDeskWnd.right;

yRightBottom =  rcDeskWnd.bottom;

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
jigarmehtamscit View Drop Down
Groupie
Groupie
Avatar

Joined: 29 October 2005
Location: India
Status: Offline
Points: 64
Post Options Post Options   Thanks (0) Thanks(0)   Quote jigarmehtamscit Quote  Post ReplyReply Direct Link To This Post Posted: 27 November 2005 at 11:51am
Hi,

Yes.. 2nd solution you stated is correct and working properly.. Now I am getting the popup in the work area only.. Thx for that..

But for first problem.. I am still not able to get the solution.. I am using MSN kind of theme.. and using slide as the animation theme.. I want to make the popup go in the reverse way it came.. like from upwords to downwords.. But .Hide() function does not do that.. Please tell me how can I do that.. ??

And another question.. I want my popup to get hidden whenever anybody clicks anywhere in the popup.. like we have items in the popup control... and some area is not filled with items.. If user clicks on an unfilled area (like anywhere in the popup..) that event should also hide hte popup and i want to do some more processing on that.. So, how to do that ?

Regards,
Jigar Mehta
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: 28 November 2005 at 2:27am

Right, sorry didn't test it.

1. The problem that it starts Hide id, but because of Mouse over control it Show it again. I can only suggest override CXTPPopupControl and its OnMouseMove and don't call base class if m_popupState == xtpPopupStateCollapsing

3. You can add some transparent item stretched to popup size...

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.059 seconds.