![]() |
SuiteCtrls WTL Sample |
Post Reply ![]() |
Author | |
burns7975 ![]() Newbie ![]() Joined: 25 May 2005 Status: Offline Points: 8 |
![]() ![]() ![]() ![]() ![]() 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 |
|
![]() |
|
JamesH ![]() Senior Member ![]() Joined: 01 December 2004 Status: Offline Points: 149 |
![]() ![]() ![]() ![]() ![]() |
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> #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") #undef DT_TOP #import "Codejock.SuiteCtrls.9700.ocx" |
|
![]() |
|
burns7975 ![]() Newbie ![]() Joined: 25 May 2005 Status: Offline Points: 8 |
![]() ![]() ![]() ![]() ![]() |
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 。 How can i correct this problem? thanks! |
|
![]() |
|
JamesH ![]() Senior Member ![]() Joined: 01 December 2004 Status: Offline Points: 149 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
burns7975 ![]() Newbie ![]() Joined: 25 May 2005 Status: Offline Points: 8 |
![]() ![]() ![]() ![]() ![]() |
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); But it doesn't work! thanks! burns |
|
![]() |
|
burns7975 ![]() Newbie ![]() Joined: 25 May 2005 Status: Offline Points: 8 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
JamesH ![]() Senior Member ![]() Joined: 01 December 2004 Status: Offline Points: 149 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
burns7975 ![]() Newbie ![]() Joined: 25 May 2005 Status: Offline Points: 8 |
![]() ![]() ![]() ![]() ![]() |
Hi, James: My code is: if (!SUCCEEDED(AtlAxCreateControlEx( if (!SUCCEEDED(m_spShortCut.QueryInterface(&m_spShortCutBar Caption))) 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 |
|
![]() |
|
JamesH ![]() Senior Member ![]() Joined: 01 December 2004 Status: Offline Points: 149 |
![]() ![]() ![]() ![]() ![]() |
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
|
|
![]() |
|
burns7975 ![]() Newbie ![]() Joined: 25 May 2005 Status: Offline Points: 8 |
![]() ![]() ![]() ![]() ![]() |
Thanks!
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |