CXTPControlPopupColor icon not redrawn |
Post Reply |
Author | |
craig
Groupie Joined: 11 August 2005 Location: United States Status: Offline Points: 44 |
Post Options
Thanks(0)
Posted: 25 August 2005 at 7:53pm |
I've added a CXTPControlPopupColor control to my application, but the
icon used in the toolbar never gets redrawn. After tracing
through the code, it appears that it is because the image manager
doesn't contain the icon. The icon is in my toolbar resources,
but not in the Xtreme TK image manager.
How do I add my icon? Thanks, Craig |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello, see XTPImageManager()->SetIcon(..) XTPImageManager()->SetIcons(..) |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
craig
Groupie Joined: 11 August 2005 Location: United States Status: Offline Points: 44 |
Post Options
Thanks(0)
|
I was looking at those, but after grepping for "SetIcon" in the
Office2003 sample where the XTPControlColorPopup is demonstrated I
couldn't find it being used anywhere.
How is the control working in this example without using SetIcon? Shoot, after spending 4 days on this, I'd settle for any example where the XTPControlColorPopup is working with or without SetIcon, SetIcons, etc. --Craig Edited by craig |
|
craig
Groupie Joined: 11 August 2005 Location: United States Status: Offline Points: 44 |
Post Options
Thanks(0)
|
I need to get this resolved soon. I'll post here and see if it
gets worked out over the weekend. Otherwise, I'll submit a tech
support incident on Monday.
I tried using SetIcon and SetIcons today. Neither helps because the GetImageManager() returns a new instance of an image manager every time it is called. Even if I set the Icon in the image manager it doesn't matter because the image manager instance isn't saved by the control. Later when SetColor calls GetImageManager it gets yet another new instance. The CXTPControlPopupColor control fails for two reasons: 1. The IconId for the control is not set anywhere. I'm not sure what this is supposed to be. I thought it would be the ID of the icon that is to be used on the button. When I look inside of the SetColor method though, it is looking up an entire set of Icons using this ID. Anyway, this id is always 0. I can call SetIconId on the control, but I am still baffled as to why I have to do this in my code, but it isn't done in the sample application. - One important note here is that my CXTPToolbar is a member of a CXTPDialog class, and CXTPControlPopupColor is being added to this toolbar. 2. Even if I get an IconId set, the call to GetImageManager always returns a new instance. See above. Even if I can get an ImageManager, I'm not sure what ID I should be using for the Icon, what Icon I should set the control to (single Icon or some sort of set of icons) If you could just provide some documentation or a "simple" example where this control is used it would be very helpful. Edited by craig |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
craig
Groupie Joined: 11 August 2005 Location: United States Status: Offline Points: 44 |
Post Options
Thanks(0)
|
I have that sample, but it doesn't compile under Visual C++ 7.
1. Can't include CodejockSample.h FIXED in stdafx.h: //#include "CodejockSample.h" // Replace it to "XTToolkitPro.h" #include "XTToolkitPro.h" 2. AboutDlg.h not found. I commented it out, then several other errors popped up. Perhaps you have a newer version that has the missing header file? Also, that looks like it is a DialogView application, I'm trying to add the control to a CXTPToolbar in a dialog box not a dialog view. Thanks, Craig Edited by craig |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
At least run it. I name it like DIalogSample, but it is not samlpe from package. |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
craig
Groupie Joined: 11 August 2005 Location: United States Status: Offline Points: 44 |
Post Options
Thanks(0)
|
aw crud... I thought I did try it.
I downloaded it, unzipped it, and then went to another dialog_sample I
had downloaded that had a different date appended to the name.
Now that I'm working off the correct codebase from this thread it does compile. I'll take a look at the code now. Thanks for the help, and sorry about the mistake. Craig |
|
craig
Groupie Joined: 11 August 2005 Location: United States Status: Offline Points: 44 |
Post Options
Thanks(0)
|
Oleg,
Thanks for the help. The example was perfect, and I now have it working in OnCreateControl. Again, sorry for the mishandling of the sample. --Craig |
|
craig
Groupie Joined: 11 August 2005 Location: United States Status: Offline Points: 44 |
Post Options
Thanks(0)
|
I've also since realized that a lot of my grief was due to the fact
that I was trying to implement this popupcontrol extension in an MFC
extension DLL. Upon moving everything inside of my application
project several of my troubles just dissapeared.
I'll have to figure out how to modularize later. --Craig |
|
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 |