![]() |
Problem in task panel on the dialog. |
Post Reply
|
| Author | |
jigarmehtamscit
Groupie
Joined: 29 October 2005 Location: India Status: Offline Points: 64 |
Post Options
Thanks(0)
Quote Reply
Topic: Problem in task panel on the dialog.Posted: 07 December 2005 at 1:43pm |
|
Hi,
I am using Taskpanel on a dialog with menubar and toolbar. I am adding a group to the taskpanel and start adding control on it.. Now, that controls gets added from the (0, 0) pixel of the screen where menubar and toolbar size (top 50 pixels) are not taken into consideration.. Please tell me how can I solve this problem.. If you want to regenerate the issue, please take a simple dialog, add a menubar and toolbar to it.. and then take a task panel, add a group to it and add a simple editbox to it by, pGroup1->AddControlItem(m_EditControl); Now, see how this editbox appears.. How to solve this ??? |
|
|
Regards,
Jigar Mehta |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 December 2005 at 3:01am |
|
Hello, Jigar, attach this sample here, and I will show what you must to change.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
jigarmehtamscit
Groupie
Joined: 29 October 2005 Location: India Status: Offline Points: 64 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 December 2005 at 11:03am |
|
Hi, Please have a look at the attached sample application that i am trying to work in.. Problem s that I expect to get solved by you are as follows.. 1. I want the background color of the dialog I added as transparant.. It should not be white.. (it looks very bad..) 2. Dialog thats shown has some controls on it.. NOw, I want to have control and value variables for those controls in that dialog class.. now, how to access them and get value out of them.. your sample doesnt show anything for that.. If I talk about it, i have not created the calss for that dialog.. just created the CTaskPanel class object and craeted the instance of that dialog.. Now, i dont have any variable defined for controls on that.. say, currently in the sample, i dont have editbox variable.. I want to take the value of that editbox.. so, where should i add variable (CString) for that and how to map it with text box.. please tell me this also.. it will help me a lot.. 3. My basic question.. why does that dialog being shown from 0,0 location.. i want it to be at place.. and i can not hardcode the value in margin because i may have two more toolbar in my application. Awaiting for reply... 2005-12-08_110326_Sample_Oleg.zip |
|
|
Regards,
Jigar Mehta |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 December 2005 at 12:01pm |
|
Hi, 1. Window ņontrols can't be transparent....
to change white color: in void CTaskPanelDlg::UpdateColors() replace COLORREF clrBack = m_pItem->GetBackColor(); to COLORREF clrBack = XTPPaintManager()->GetXtremeColor(XPCOLOR_3DFACE);
also you can draw gradient in CTaskPanelDlg::OnEraseBkgnd to make it look like transparent... XTPDrawHelpers()->GradientFill(pDC, CXTPClientRect(this), XTPColorManager()->grcCaption, FALSE);
2. Add Variable to CTaskPanelDlg members and map it with dialog control in CTaskPanelDlg::DoDataExchange 3. In properties of IDD_DIALOG_MYDLG in styles tab set style= Child.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
jigarmehtamscit
Groupie
Joined: 29 October 2005 Location: India Status: Offline Points: 64 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 December 2005 at 12:29pm |
|
Hi,
Thanks for the prompt reply, I will check it out what you have told and will reply back over here.. But some other questions regarding the task panel are as follows, Instead of adding control item - dialog, if I want to add a textedit box, that also painted above 50 pixels.. (The same way like dialog was painted above...!!) now, edit control doesnt have any property like child .. so, what to do if in the same taskpanel example, i want to add an editbox ?? Thx |
|
|
Regards,
Jigar Mehta |
|
![]() |
|
jigarmehtamscit
Groupie
Joined: 29 October 2005 Location: India Status: Offline Points: 64 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 December 2005 at 12:38pm |
Hi, 1. Static text control can be transparant... cant it be ?? If I put it transparant and still it doesnt get drawn in transparant mode... can i do that ?? if yes how.. in my above sample it has three static control.. i want to make it transparant.. for combo and editbox, its ok.. The problem is, i want to give taskpanel theme support to user like user will change the theme at runtime.. if you try the sample i sent you with all different theme.. it behaves differently.. like sometimes its background gets painted with matching color and sometimes it doesnt.. Another problem is, if i have the width of the taskpanel less than that of my dialog contained in the taskpanel.. it will cut some portion of the dialog.. So, my question is is there anyway to get the width of my dialog (IDD_DIALOG_MYDLG) in the sample case... 2. Yes.. it can take the value of the variable from this method.. thx for that. 3. This works too.. Thx for the solution.. You are great.. |
|
|
Regards,
Jigar Mehta |
|
![]() |
|
jigarmehtamscit
Groupie
Joined: 29 October 2005 Location: India Status: Offline Points: 64 |
Post Options
Thanks(0)
Quote Reply
Posted: 12 December 2005 at 1:09pm |
|
I opened another post for my problem.. please look at,
http://forum.codejock.com/forum_posts.asp?TID=3395&PN=1& amp;TPN=1 Thx.. Let me know the solution.. |
|
|
Regards,
Jigar Mehta |
|
![]() |
|
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 |