Print Page | Close Window

How to make PopupControl hide gradually

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=3287
Printed Date: 09 November 2025 at 12:59pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to make PopupControl hide gradually
Posted By: jigarmehtamscit
Subject: How to make PopupControl hide gradually
Date 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



Replies:
Posted By: jigarmehtamscit
Date 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


Posted By: Oleg
Date 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


Posted By: jigarmehtamscit
Date 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


Posted By: Oleg
Date 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



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