|
You need to create an ATL Project from the main wizard, then add the composite control from the 'Add ATL Object' Wizard.
This gives you the basic composition control that you can use in VB.
Professional ATL COM Programming by Richard Grimes has a good chapter on this suject.
|
|
|
|
|
Thanks Rashid, i already tried to create a composite control,but it didnot work on vb,i mean i could not add controls to the composite from VB
i found that MFC use OLEMISC_SIMPLEFRAMESITE and
ISimpleFrameSite
to create a simple frame container
thanks.
tomer dror
|
|
|
|
|
I recently created a composite control using pure ATL and WTL (No MFC) and I had no problems.
You might need to give me more details on what goes wrong ?
|
|
|
|
|
Rashid here is what i did
1.create a composite control
2.put it on a VB form
3.choose a command button control from the VB toolbox and put it on the atl composite control
the result is that the command button control didnot become a child control of the composite control,if i move the composite control the command button control stay in his place
i just want to create a control like SSTab,of FRAME
|
|
|
|
|
Hi,
I want to remove the "Apply" button in my ATL properties ( I only want to show the "Ok" button), is that possible without completly rewriting the code for the ActiveX property pages container ?
Thanks in advance, greetings
Braulio
|
|
|
|
|
I downloaded the WTL 7 from the link provided in a previous thread. When I tried to compile the MTPad example program using VC6 on XP computer I get 59 errors. There is a message at the beginning that reads:
****************************************************
Compiling...
stdatl.cpp
NOTE: WINVER has been defined as 0x0500 or greater which enables
Windows NT 5.0 and Windows 98 features. When these headers were released,
Windows NT 5.0 beta 1 and Windows 98 beta 2.1 were the current versions.
For this release when WINVER is defined as 0x0500 or greater, you can only
build beta or test applications. To build a retail application,
set WINVER to 0x0400 or visit http://www.microsoft.com/msdn/sdk
to see if retail Windows NT 5.0 or Windows 98 headers are available.
See the SDK release notes for more information.
Compiling...
****************************************************
Then it produces lots of errors. I'll only show the first one.
****************************************************
mtpad.cpp
c:\wtl70\include\atlframe.h(274) : error C2146: syntax error : missing ';' before identifier 'lpnm'
c:\wtl70\include\atlframe.h(905) : see reference to class template instantiation 'WTL::CFrameWindowImplBase<tbase,twintraits>' being compiled
c:\wtl70\include\atlframe.h(274) : error C2501: 'LPNMREBARCHEVRON' : missing storage-class or type specifiers
****************************************************
|
|
|
|
|
I believe that you will need to load the latest version of the windows SDK.
First off, the note about WINVER 5.0 means that the program enabled all of the features only available in Windows 2000 and above.
Second, I get the same basic set of errors, I only get about 14 errors though.
LPNMREBARCHEVRON is not defined in any of the header files that I have as well as IPrintDialogCallback and PRINTERDLGEX, but I believe they will be found in the latest header files in the SDK.
Good luck!
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
I've just had a look in the SDK on my PC (May 2002) and all those symbols are defined (well, PRINTDLGEX , not PRINTERDGLEX ).
It's a big download, but it's worth it in the long run.
Stuart Dootson
'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'
|
|
|
|
|
If you don't have the latest SDK, change the WINVER define in stdafx.h to 0x0400 and that will eliminate the errors. However, you won't be able to use the IE-style chevron and a few other new toys.
|
|
|
|
|
Hi, i want to program an owner-draw popup menu class with WTL. My actual implementation inherits from CMenu, COwnerDraw and CMessageMap, and the user of the class chains to the msg map of the menu class. But it seems to me that is an overkill, i mean, if i´m getting it right ( i don´t really know ), i´m getting all the messages from the parent window of the class just to process DrawItem and MeasureItem. I don´t know much about WTL, so i suppose there is a better design solution...
Any ideas???
Gabriel
Old C programmers never die. They just cast into void
|
|
|
|
|
That's how message maps work in general. Throw everything at them, and the class acts on only the messages it's interested in.
--Mike--
Just released - RightClick-Encrypt v1.3 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
I have an ATL service (ATL 3). I'd like to create a hidden window to send messages to from one of my threads.
What is the best way to approach this? Is WTL needed or would the standard ATL window classes do the job?
Any recommended reading and examples so that I can understand the principles better?
Michael
Time flies like an arrow. Fruit flies like a banana
|
|
|
|
|
For a plain-jane window, just use CWindowImpl.
class CMySvcWindow : public CWindowImpl<CMySvcWindow> and give it a message map.
--Mike--
Just released - RightClick-Encrypt v1.3 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Im trying to program an STL version of sprints and sscans using stl strings to format a variable number of arguments and print to or read from a string, but have become hopelessly lost in format flags/precisions etc.
Function headers i would like to expose are:
int SPrintS( std::string buffer, const std::string format, ...);
... and ...
int SScanS( std::string buffer, const std::string format, ...);
Both functions return the number of chars read/written to the string or -1 on conversion failure.
In the implementation of these functions i dont want to call the c version of sprints or sscans (or svprintf etc).
I understand how to deal with variable arguments, the problem im having is in parsing the format specifier, it takes the general form:
%[flags] [width] [.precision] [{h | l | I64 | L}]type
My attempts at a parse function always seems to become unruly then break down before it can cope with the complete range of optional prefixes to a type (those within [] ), that coupled with format strings can contain any number of format specifiers.
Any suggstions as to the way forward would be welcomed.
|
|
|
|
|
Easiest route is to take a look at the GNU source code for sprintf and see how theyve done it!
|
|
|
|
|
|
thanks guys
|
|
|
|
|
|
Hello there !!!!
Excusme for my crazy question
But can you tell what is WTL ?
Regards,
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
It is a Win32 framework that is written in the same style as ATL. It stands for Windows Template Library. It is a set of templates that wrap the basic windowing functions and objects in the Win32 API, and it is a great alternative to MFC.
WTL produces very small and efficient applications that do not need to link to any external DLL's like MFC.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Thanks for reply ...
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
I read the other threads here, downloaded the MS SDK core and cannot locate any of the wtl files. Also read and downloaded the WTL files from the link in the artle "Introduction To WTL Part I" on this site. The read-me file says that it is version 3.1, not version 7 as described in other threads here.
So where is version 7?
|
|
|
|
|
|
Hi,
i want to return a collection from my ATL-Component to Simple VBAppl. I
have gone through the example of MSDN in which it is using the Interface
"ICollectionOnSTLImpl ", but in that Example it is returning a particular
value as per the given Index or key and i am looking for returning whole
collection.
There is Data member "m_coll" of "ICollectionOnSTLImpl" it holds the
collection values. Is there any way to return "m_coll" from ATL-Component
? or any other way to return Collection type from COM.
Thanking you,
Regards,
Shailaja
|
|
|
|
|
You don't return a collection, a collection is only for holding and iterating through items. What you want is a SAFEARRAY. See Q207931[^] for some sample code. Scenario 3 in the article is the one that applies to your situation.
--Mike--
Just released - RightClick-Encrypt v1.3 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|