OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-09-2014, 12:26
abdoj abdoj is offline
Junior Member
 
Join Date: Nov 2008
Posts: 12
Default AddCustomButton fails in CorelDraw x7 with Update 1 and 2

Hi,

I have been trying to resolve this issue in the last few days and without any success.

The CPG plugin we develop for x7 (for both x86/x64 version) works fine prior to update 1 and update 2 does resole the problem either.

It seems that the call to create a custom toolbar button with 'AddCustomButton' passing true as the last parameter failed to create the button. However, passing false value does create the button but it will also creates another new button every time the Corel started. Here is the piece of code, mind you this same code works fine before the update:

STDMETHODIMP CVGAppPlugin::raw_StartSession()
{
m_pApp->AddPluginCommand( _bstr_t("Click Me"), "App Name", "App Name");
VGCore::ICUIControlPtr ctl = m_pApp->CommandBars->Item[_bstr_t("Standard")]->Controls->AddCustomButton(VGCore::cdrCmdCategoryPlugins,_bstr_t(("Click Me"), 0, VARIANT_TRUE);
ctl->SetCustomIcon( "C:\\temp\\custom.ico" );
}

STDMETHODIMP CVGAppPlugin::raw_StopSession()
{
m_pApp->RemovePluginCommand( _bstr_t("Click Me") );

return S_OK;
}

Any idea why this is happeing?

Thanks for your help.

Abdo
Reply With Quote
Reply

Tags
addplugincommand


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[X5] CommandBarControl.SetIcon fails wOxxOm CorelDRAW/Corel DESIGNER VBA 3 29-12-2012 05:31
VBA Import fails but CorelScript FileImport works on PC shape - BUG? runflacruiser CorelDRAW/Corel DESIGNER VBA 4 17-07-2011 16:43
CustomCommand CreateBoundary call fails abdoj CorelDRAW/Corel DESIGNER VBA 8 17-07-2010 01:20
C# ApplicationObject.CreateDocument() Fails sjs CorelDRAW/Corel DESIGNER VBA 1 31-03-2008 14:08
forum fails in sending notification s_federici Web site suggestions 2 08-11-2004 03:47


All times are GMT -5. The time now is 15:05.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com