Gallery Control in Dialog
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=10381
Printed Date: 08 November 2025 at 6:55am Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: Gallery Control in Dialog
Posted By: terrym
Subject: Gallery Control in Dialog
Date 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
|
Replies:
Posted By: Oleg
Date Posted: 28 April 2008 at 6:04am
|
Hi,
Add CXTPToolBar and Gallery as control.
------------- Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS
|
Posted By: terrym
Date Posted: 28 April 2008 at 6:10am
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
|
Posted By: terrym
Date 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
|
Posted By: Oleg
Date Posted: 28 April 2008 at 11:12am
|
Hello,
ok, here sample.
https://forum.codejock.com/uploads/20080428_111155_GallerySample.zip - uploads/20080428_111155_GallerySample.zip
------------- Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS
|
Posted By: terrym
Date 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
|
Posted By: terrym
Date 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
|
Posted By: terrym
Date Posted: 28 April 2008 at 12:34pm
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
|
Posted By: terrym
Date 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
|
Posted By: terrym
Date Posted: 16 May 2008 at 10:21am
oleg wrote:
Hello,
ok, here sample.
https://forum.codejock.com/uploads/20080428_111155_GallerySample.zip - uploads/20080428_111155_GallerySample.zip |
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
|
Posted By: Oleg
Date Posted: 16 May 2008 at 12:41pm
|
Hi,
See gallery in Word's Ribbon. It works same.
------------- Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS
|
Posted By: terrym
Date 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
|
Posted By: terrym
Date 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
|
Posted By: terrym
Date 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
|
Posted By: Oleg
Date 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
|
Posted By: terrym
Date 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
|
Posted By: terrym
Date Posted: 18 May 2008 at 6:14am
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
|
Posted By: Oleg
Date Posted: 18 May 2008 at 1:06pm
|
Hi,
Did you override Draw method? How ?
------------- Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS
|
Posted By: terrym
Date Posted: 18 May 2008 at 1:16pm
|
https://forum.codejock.com/uploads/20080518_131643_code.zip - 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
|
Posted By: Oleg
Date Posted: 19 May 2008 at 1:17am
|
Hi,
change last parameters to
xtpBarTypeNormal, xtpBarPopup
------------- Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS
|
Posted By: terrym
Date 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
|
Posted By: terrym
Date 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
|
Posted By: terrym
Date 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
|
|