Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Gallery Control in Dialog
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Gallery Control in Dialog

 Post Reply Post Reply
Author
Message
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Topic: Gallery Control in Dialog
    Posted: 28 April 2008 at 5:59am
Is it possible to add a gallery control to a dialog??? as we cannot seem to find any examples :(
 
Any help much appreciated
 
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
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 April 2008 at 6:04am
Hi,
Add CXTPToolBar and Gallery as control.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 28 April 2008 at 6:10am
Originally posted by oleg oleg wrote:

Hi,
Add CXTPToolBar and Gallery as control.
 
But surely this would show a toolbar :(
 
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 28 April 2008 at 6:20am
Also do you have example of a modal dialog with gallery added
 
Cheers
Terry
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
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 April 2008 at 11:12am
Hello,
 
ok, here sample.
 
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 28 April 2008 at 12:12pm
Cool, do I need to copy this over another sample as it says some files missing eg. .rc
 
Cheers
Terry
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 28 April 2008 at 12:32pm
Get the following error when try to build (after copying over Gallery Sample) for XTP 12
 
Any ideas cheers
 
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 28 April 2008 at 12:34pm
Originally posted by terrym terrym wrote:

Get the following error when try to build (after copying over Gallery Sample) for XTP 12
 
Any ideas cheers
 
 
Fixed ;) as forgot to add new files to project lol
 
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 28 April 2008 at 12:34pm
Thanks, once again for such great support :)
 
Cheers
Terry
 
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 16 May 2008 at 10:21am
Originally posted by oleg oleg wrote:

Hello,
 
ok, here sample.
 
 
Hi Oleg
 
Is there a reason in this sample you sent that the area that is normally white is light blue and changes when we hover over gallery control???
 
Thanks
Terry
 
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
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: 16 May 2008 at 12:41pm
Hi,
See gallery in Word's Ribbon. It works same.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 16 May 2008 at 12:49pm
This is not correct if in a dialog like in Word 2007, Insert/Insert Chart
 
As the background is then white, also the scroll bar works with mouse wheel.  How do we get scroll bar working with mouse wheel in dialog based gallery as in your example above.
 
Cheers
Terry
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 16 May 2008 at 12:57pm
to get around the paint problem with gallery controls for dialogs I have made FillControl in CXTPControlGallery a virtual function and just painted the background white for galleries.
 
However need a workaround for the mouse wheel on scroll bars
 
Cheers
Terry
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 17 May 2008 at 10:58am
For some reason the sample you sent me does not work for bPressed for items ???  Any ideas
 
Cheers
Terry
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
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: 18 May 2008 at 1:43am
Hi,
 
PainManager draws Text without Images without pressed state. Again you can override CXTPControlGalleryItem::Draw and draw as you need.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 18 May 2008 at 6:13am
we have overriden CXTPControlGalleryItem however bPressed is always false :( so even if we changed the draw handler it would still not have bPressed status :(
 
Also we have added OnUpdate and On handlers for the gallery in the dialog example you sent and pGallery is not valid and therefore SetCheckedItem etc. do not work :(, any ideas for this
 
Cheers
Terry
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 18 May 2008 at 6:14am
Originally posted by terrym terrym wrote:

we have overriden CXTPControlGalleryItem however bPressed is always false :( so even if we changed the draw handler it would still not have bPressed status :(
 
Also we have added OnUpdate and On handlers for the gallery in the dialog example you sent and pGallery is not valid and therefore SetCheckedItem etc. do not work :(, any ideas for this
 
Cheers
Terry
 
Also we have added images and still no pressed state???
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
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: 18 May 2008 at 1:06pm
Hi,
 
Did you override Draw  method? How ?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 18 May 2008 at 1:16pm
uploads/20080518_131643_code.zip
 
please see attached file
 
Cheers
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
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: 19 May 2008 at 1:17am
Hi,
 
change last parameters to
 
xtpBarTypeNormal, xtpBarPopup
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 19 May 2008 at 3:54am
Excellent, thanks.  Lol had to be something simple didn't it
 
Cheers
Terry
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 19 May 2008 at 4:39am
Ok last thing is, when we override CXTPControlGalleryItem, for some reason the new control does not have animation??? for the items unless we set m_bEnableAnimation = TRUE in the Draw handler, where is the proper place to do this please as if we do in the draw handler then all gallery controls seem to have animation turned on
 
Cheers
Terry
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 19 May 2008 at 4:45am
Ah strange we were missing

pCommandBars->GetPaintManager()->m_bEnableAnimation = TRUE;

from our CMainFrame so all fixed.  Unless there is better function call for this :)
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
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.172 seconds.