Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - CXTPWinThemeWrapper problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPWinThemeWrapper problem

 Post Reply Post Reply
Author
Message
Jimor Marlow View Drop Down
Groupie
Groupie
Avatar

Joined: 03 June 2007
Location: Russian Federation
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jimor Marlow Quote  Post ReplyReply Direct Link To This Post Topic: CXTPWinThemeWrapper problem
    Posted: 30 September 2007 at 5:02am
I'm little bit confused.
When I've tried to use theme wrapper in dll I've got link error on OpenThemeData(). Looks like no export declaration only for that function.

Used code:
CXTPWinThemeWrapper themeScroll;
themeScroll.OpenThemeData(0, L"SCROLLBAR");
themeScroll.DrawThemeBackground(dc.GetSafeHdc(), SBP_SIZEBOX, SZB_RIGHTALIGN, &rect, 0);

Output:
error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall CXTPWinThemeWrapper::OpenThemeData(struct HWND__ *,unsigned short const *)" (__imp_?OpenThemeData@CXTPWinThemeWrapper@@QAEXPAUHWND__@@PBG@Z) referenced in function "public: void __thiscall CPlugInsRibbonHelper::SetUsed(class ATL::CStringT<char,class StrTraitMFC_DLL<char,class ATL::ChTraitsCRT<char> > > const &,int)" (?SetUsed@CPlugInsRibbonHelper@@QAEXABV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@H@Z)
.\..\Debug/***.dll : fatal error LNK1120: 1 unresolved externals

In code below no errors found but sure not works. Other methods of CXTPWinThemeWrapper imported ok.

CXTPWinThemeWrapper themeScroll;
//themeScroll.OpenThemeData(0, L"SCROLLBAR");
themeScroll.DrawThemeBackground(dc.GetSafeHdc(), SBP_SIZEBOX, SZB_RIGHTALIGN, &rect, 0);

When I use that code in main exe all ok, no errors. Problem only in all my dlls.

Any help would be appreciated :)
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: 30 September 2007 at 9:14am
Hi,

In project settings change

Properties->c/c++>Language->Treate wchar_t as Builtin Type =yes
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Jimor Marlow View Drop Down
Groupie
Groupie
Avatar

Joined: 03 June 2007
Location: Russian Federation
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jimor Marlow Quote  Post ReplyReply Direct Link To This Post Posted: 30 September 2007 at 2:38pm
Oleg, thanx a lot!
I've just found your answer in tread http://forum.codejock.com/forum_posts.asp?TID=6299 and intended to try :)
Anyway, you a great.

PS. It should be boring to answer the same dumb questions all the time, isn't it? :)))

PPS. Why I'm asking, I'm working on Sunday too :)
Back to Top
omtara View Drop Down
Groupie
Groupie
Avatar

Joined: 22 December 2007
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote omtara Quote  Post ReplyReply Direct Link To This Post Posted: 23 February 2008 at 7:07am

I am having the same problem... But if I set the option to "Yes" I get another problem:

comsuppw.lib(comutil.obj) : error LNK2005: "class _variant_t vtMissing" (?vtMissing@@3V_variant_t@@A) already defined in comsupp.lib(comutil.obj)

Thanks,
 
Omtara
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: 23 February 2008 at 10:26am
Hi,
It means you have some another library that don't have this option switched to Yes.
Another solution is set it to "No", open Toolkit set it to "No" too and rebuild toolkit.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.154 seconds.