Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTPControlPopupColor icon not redrawn
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPControlPopupColor icon not redrawn

 Post Reply Post Reply
Author
Message
craig View Drop Down
Groupie
Groupie


Joined: 11 August 2005
Location: United States
Status: Offline
Points: 44
Post Options Post Options   Thanks (0) Thanks(0)   Quote craig Quote  Post ReplyReply Direct Link To This Post Topic: CXTPControlPopupColor icon not redrawn
    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

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


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: 25 August 2005 at 11:37pm

Hello,

see

XTPImageManager()->SetIcon(..)

XTPImageManager()->SetIcons(..)

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


Joined: 11 August 2005
Location: United States
Status: Offline
Points: 44
Post Options Post Options   Thanks (0) Thanks(0)   Quote craig Quote  Post ReplyReply Direct Link To This Post Posted: 26 August 2005 at 1:58pm
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
Back to Top
craig View Drop Down
Groupie
Groupie


Joined: 11 August 2005
Location: United States
Status: Offline
Points: 44
Post Options Post Options   Thanks (0) Thanks(0)   Quote craig Quote  Post ReplyReply Direct Link To This Post Posted: 26 August 2005 at 4:44pm
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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


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 August 2005 at 11:28am
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
craig View Drop Down
Groupie
Groupie


Joined: 11 August 2005
Location: United States
Status: Offline
Points: 44
Post Options Post Options   Thanks (0) Thanks(0)   Quote craig Quote  Post ReplyReply Direct Link To This Post Posted: 27 August 2005 at 4:08pm
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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


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 August 2005 at 11:50pm

At least run it.

I name it like DIalogSample, but it is not samlpe from package.

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


Joined: 11 August 2005
Location: United States
Status: Offline
Points: 44
Post Options Post Options   Thanks (0) Thanks(0)   Quote craig Quote  Post ReplyReply Direct Link To This Post Posted: 29 August 2005 at 12:23pm
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

Back to Top
craig View Drop Down
Groupie
Groupie


Joined: 11 August 2005
Location: United States
Status: Offline
Points: 44
Post Options Post Options   Thanks (0) Thanks(0)   Quote craig Quote  Post ReplyReply Direct Link To This Post Posted: 29 August 2005 at 1:36pm
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

Back to Top
craig View Drop Down
Groupie
Groupie


Joined: 11 August 2005
Location: United States
Status: Offline
Points: 44
Post Options Post Options   Thanks (0) Thanks(0)   Quote craig Quote  Post ReplyReply Direct Link To This Post Posted: 29 August 2005 at 3:04pm
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

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.203 seconds.