Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Skin Framework
  New Posts New Posts RSS Feed - Using the OCX file in C++
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Using the OCX file in C++

 Post Reply Post Reply
Author
Message
aaron1a12 View Drop Down
Newbie
Newbie


Joined: 12 December 2013
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote aaron1a12 Quote  Post ReplyReply Direct Link To This Post Topic: Using the OCX file in C++
    Posted: 13 December 2013 at 12:21am
Hi guys,

I'm developing my application with Win32 API and wxWidgets in C++, and I wanted to skin the app so I decided to try out the ActiveX OCX version of Skin Framework from Codejocks. The problem is that all the samples are in C#, Vb, and VB.NET but NOT in C++! I assume because most C++ users will be going for MFC version but I'm not.

Having very minimal knowledge in ATL, I have NO idea how to load the OCX in C++. 

Could someone tell me what's wrong in my code?

#include <atlbase.h>
#import "SkinFramework.ocx"

...

CoInitialize(NULL);

_DSkinFrameworkPtr MySkinframework;
HRESULT instanceResult = MySkinframework.CreateInstance("{bdc91302-2481-46d0-a36c-164e03514d79}");

    _com_error instanceErr(instanceResult);
    LPCWSTR instanceErrMsg = instanceErr.ErrorMessage();
    MessageBox(NULL, instanceErrMsg, L"CreateInstance Result", MB_OK);

MySkinframework->AboutBox();



CreateInstance throws a "The operation completed successfully" message but ->AboutBox(); results in this:
Unhandled exception at 0x773276fd in TestApp.exe: Microsoft C++ exception: _com_error at memory location 0x001afb30..

Is this the proper way to interact with an OCX? Is it the proper way to use Skin Framework? Am I using the right class id? Please help Cry
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.141 seconds.