Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - SuiteCtrls WTL Sample
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SuiteCtrls WTL Sample

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


Joined: 25 May 2005
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote burns7975 Quote  Post ReplyReply Direct Link To This Post Topic: SuiteCtrls WTL Sample
    Posted: 25 May 2005 at 8:39am

Where are there the SuiteCtrls WTL samples? When I import the Codejock.SuiteCtrls.9510.ocx I always get a long error list!!

thanks!

burns7975

Back to Top
JamesH View Drop Down
Senior Member
Senior Member


Joined: 01 December 2004
Status: Offline
Points: 149
Post Options Post Options   Thanks (0) Thanks(0)   Quote JamesH Quote  Post ReplyReply Direct Link To This Post Posted: 25 May 2005 at 11:07am

Unfortunatley I don't think there is a WTL example, afaik there are only 2 WTL examples included.

I don't know if this will help or not, but this is the .h file I use to import the suite controls:

#include "stdafx.h"

#include <atlbase.h>

#include <atlcom.h>
#include <atlhost.h>
#include <atlwin.h>
#include <atlctl.h>

#import "olepro32.dll" no_auto_exclude

#import "C:\WINDOWS\system32\stdole2.tlb" rename("OLE_HANDLE", "XTP_OLE_HANDLE"), rename("OLE_COLOR", "XTP_OLE_COLOR"), rename("OLE_XPOS_PIXELS", "XTP_OLE_XPOS_PIXELS"), rename("OLE_YPOS_PIXELS", "XTP_OLE_YPOS_PIXELS"), rename("DISPPARAMS", "XTP_DISPPARAMS"), rename("EXCEPINFO", "XTP_EXCEPINFO"), rename("GUID", "XTP_GUID")
using namespace stdole;

#undef DT_TOP
#undef DT_LEFT
#undef DT_CENTER
#undef DT_RIGHT
#undef DT_VCENTER
#undef DT_BOTTOM
#undef DT_WORDBREAK
#undef DT_SINGLELINE
#undef DT_END_ELLIPSIS

#import "Codejock.SuiteCtrls.9700.ocx"
using namespace XtremeSuiteControls;

Back to Top
burns7975 View Drop Down
Newbie
Newbie


Joined: 25 May 2005
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote burns7975 Quote  Post ReplyReply Direct Link To This Post Posted: 25 May 2005 at 7:23pm

It is right!! Thank you, JamesH!

I have another question about your two wtl samples;

I always got the exceptions like this this:(vs.net2003, wtl75_5102)

Microsoft C++ exception: COleException @ 0x0012e210 。
Microsoft C++ exception: COleException @ 0x0012e210 。
 Microsoft C++ exception: COleException @ 0x0012e204 。
Microsoft C++ exception: COleException @ 0x0012e1e8 。

How can i correct this problem?

thanks!

Back to Top
JamesH View Drop Down
Senior Member
Senior Member


Joined: 01 December 2004
Status: Offline
Points: 149
Post Options Post Options   Thanks (0) Thanks(0)   Quote JamesH Quote  Post ReplyReply Direct Link To This Post Posted: 26 May 2005 at 11:31am

Sorry, I'm using VC 6 and don't see any of those problems.  Perhaps someone else or someone from codejock can help you out.

- James

Back to Top
burns7975 View Drop Down
Newbie
Newbie


Joined: 25 May 2005
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote burns7975 Quote  Post ReplyReply Direct Link To This Post Posted: 27 May 2005 at 9:25am

Hi, James:

I have another problem to need your help.

I want to add a view to the ShortCutBar like this:

HWND d = m_view.Create((HWND)m_spShortCutBar->GethWnd(), rcDefault, NULL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, WS_EX_CLIENTEDGE);
  m_spShortCutBar->Selected = m_spShortCutBar->AddItem(1,_T("Test"),(long)d);

But it doesn't work!

thanks!

burns

Back to Top
burns7975 View Drop Down
Newbie
Newbie


Joined: 25 May 2005
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote burns7975 Quote  Post ReplyReply Direct Link To This Post Posted: 27 May 2005 at 10:59am

Hi, James:

I have figured out above problem!

but I cann't make the ShortcutCaption working in the ShortcutBar  like the VB

Sample ShutcutBar does! Any idea?

thanks a lot!!

Burns

Back to Top
JamesH View Drop Down
Senior Member
Senior Member


Joined: 01 December 2004
Status: Offline
Points: 149
Post Options Post Options   Thanks (0) Thanks(0)   Quote JamesH Quote  Post ReplyReply Direct Link To This Post Posted: 27 May 2005 at 12:05pm

Hello Burns,

Unfortunately I don't use the shortcut bar.. what can't you get working with the shortcut caption?  Do you have a code segment you could post?

- James

Back to Top
burns7975 View Drop Down
Newbie
Newbie


Joined: 25 May 2005
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote burns7975 Quote  Post ReplyReply Direct Link To This Post Posted: 28 May 2005 at 1:43am

Hi, James:

My code is:

  if (!SUCCEEDED(AtlAxCreateControlEx(
   OLESTR("{95E24DB0-1BBC-4411-BA54-204565E95 4AE}"),
   (HWND)m_spShortCutBar->GethWnd(),
   NULL,
   NULL,
   &m_spShortCut,
   IID_NULL, NULL)))
  {
   return FALSE;
  }

  if (!SUCCEEDED(m_spShortCut.QueryInterface(&m_spShortCutBar Caption)))
  {
   return FALSE;
  }

  m_spShortCutBarCaption->PutCaption(_T("Test!" ));

but the following line doesn't work, because the AddItem's 3rd argument  needs a HWND

//m_spShortCutBar->AddItem(1,_T("This"),m_spShortCutBarCa ption);

What can I do?

thanks!

Burns

Back to Top
JamesH View Drop Down
Senior Member
Senior Member


Joined: 01 December 2004
Status: Offline
Points: 149
Post Options Post Options   Thanks (0) Thanks(0)   Quote JamesH Quote  Post ReplyReply Direct Link To This Post Posted: 30 May 2005 at 11:40am

I've never used the short cut bar but it looks like you need to do something like:

IShortcutBarItemPtr item = m_spShortCutBar->AddItem(1,_T("This"), hwnd() );

item->Caption = _T("New caption");

Where hwnd() is the window handle for the wndow to display in the client area.  (From the help file "hWnd

Child window associated with the shortcut, this window will be displayed in the client pane when clicked. " ).

 

Back to Top
burns7975 View Drop Down
Newbie
Newbie


Joined: 25 May 2005
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote burns7975 Quote  Post ReplyReply Direct Link To This Post Posted: 04 June 2005 at 11:33pm
Thanks!
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.156 seconds.