Click here to Skip to main content
14,981,532 members
Everything / Desktop Programming / ATL

ATL

ATL

Great Reads

by Michael Dunn
A tutorial on writing a shell extension that can be used on the Send To menu.
by Michael Dunn
A tutorial on writing a shell extension that provides custom drag and drop functionality.
by Tim Smith
Color picker control for WTL applications including optional support for XP themes
by Ernest Laurentin
Full-fledged ATL Windowless ActiveX Container. Ideal for hosting Windows Media Player, Transparent Flash and Silverlight Animations.

Latest Articles

by Shivprasad koirala
This blog will discuss the difference between server.transfer and response.redirect.
by Nick Pirocanac
Linker errors due to CStringT template classes and ATL vs. MFC issues
by Midi_Mick
Using ATL and STL to create collections of COM objects without circular references
by Gregory Morse
Deserialization and serialization classes for JSON objects in native C++ with COM and ATL

All Articles

Sort by Score

ATL 

Please Sign up or sign in to vote.
26 May 2006
Michael Dunn
A tutorial on writing a shell extension that can be used on the Send To menu.
Please Sign up or sign in to vote.
24 May 2006
Michael Dunn
A tutorial on writing a shell extension that provides custom drag and drop functionality.
Please Sign up or sign in to vote.
13 Jun 2002
Tim Smith
Color picker control for WTL applications including optional support for XP themes
Please Sign up or sign in to vote.
5 Mar 2009
Ernest Laurentin
Full-fledged ATL Windowless ActiveX Container. Ideal for hosting Windows Media Player, Transparent Flash and Silverlight Animations.
Please Sign up or sign in to vote.
25 Sep 2008
Rajesh R Subramanian
Of all your questions I've attempted, this is the toughest one, Christian.First off, .NET and C++ (I will say only C++ in this message. But, When I say C++, include the frameworks and libraries built on and around it - MFC, ATL, WTL, etc.,) are...
Please Sign up or sign in to vote.
16 Jul 2002
soptest
How MS implements them and why they do not want you to see the source code of those functions.
Please Sign up or sign in to vote.
14 Oct 2009
Alex Blekhman
Example of handling real-life challenges when hosting WebBrowser control: separate creation of hosting window and the control, keyboard shortcuts, control's dimensions, etc.
Please Sign up or sign in to vote.
8 May 2005
Brian C Hart
We build our new server and install it on the server machine.
Please Sign up or sign in to vote.
29 Dec 2006
Michael Dunn
How to use power status notifications to make your applications conserve power when necessary.
Please Sign up or sign in to vote.
29 Jun 2009
Michael Dunn
Create custom tasks in your app's jump list on Windows 7
Please Sign up or sign in to vote.
30 Jul 2002
Vagif Abilov
Guidelines to migrate ATL-based Windows service application to Visual C++.NET
Please Sign up or sign in to vote.
4 Jun 2001
Leon Finker
Describes how to add various Microsoft Management Console UI items using ATL
Please Sign up or sign in to vote.
11 Aug 2000
Brian C Hart
We look at connection points and set up the server's end of one. We'll also finish implementing our SayHello() method.
Please Sign up or sign in to vote.
18 Sep 2003
Zac Howland
An article on using component categories to create pluggable components
Please Sign up or sign in to vote.
13 Aug 2009
Stuart Dootson
The way I'd approach it is like this:1. Define functions that return random voewls and random consonants - here's a random vowel function:char RandomVowel(){ const char vowels[] = {'a', 'e', 'i', 'o', 'u'}; // Use rand() to get a number...
Please Sign up or sign in to vote.
12 Oct 2009
Jörgen Sigvardsson
In addition to what Stuart said, if you really don't want to change the function signature from floatto double, you can always use literals that are typed as float. If you add the suffix f to the floating point numbers, they will be typed float.Your examples would then be function(1.2f, 2f) and func
Please Sign up or sign in to vote.
13 Sep 2012
Wendelius
This is an alternative for "SQL Server: Query to find upcoming birthdays for the current week"
Please Sign up or sign in to vote.
8 Apr 2009
joseangelmt
We are going to enable your application to write entries in HKEY_LOCAL_MACHINE, elevating your application when necessary.
Please Sign up or sign in to vote.
22 Aug 2008
Perspx
I don't know about removing power but you can lock volumes with DeviceIoControl() with the FSCTL_LOCK_VOLUME which means that your process has exclusive access to that volume. Take a look at the documentation here. You could do this with the CD...
Please Sign up or sign in to vote.
17 Oct 2009
Rajesh R Subramanian
hanlei0000000009 wrote:I need my program sleep 1 microsecond, but Sleep() can not do this.Neither can any other API do this (under Windows). Windows was never designed to provide this kind of functionality (it is not a real-time OS). If you use something like Sleep(2), your program may sleep for 2 m
Please Sign up or sign in to vote.
27 Jun 2001
Rashid Thadha
An outlook control and framework that can be used in your WTL Application
Please Sign up or sign in to vote.
3 Apr 2001
Michael Dunn
This article shows how to add your own pages to Control Panel applets by writing a property sheet handler.
Please Sign up or sign in to vote.
22 Aug 2008
Jijo.Raj
ameyakoshti wrote:1st of all i want to know whether it is possible to disable usb portsTo disable USB ports, check this[^]. You have to programatically access the registry and set the key.ameyakoshti wrote:and CD rom "POWER" through VC++.I hope...
Please Sign up or sign in to vote.
30 Jan 2009
CPallini
"text && text" If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.This is going on my arrogant assumptions....
Please Sign up or sign in to vote.
18 Apr 2001
Erik Thompson
Create an ATL Server to generate random tips using a Server Response File
Please Sign up or sign in to vote.
11 Aug 2000
Brian C Hart
Here we add a method to our DCOM-remoted object, and start on implementing its functionality.
Please Sign up or sign in to vote.
27 Aug 2001
George Anescu
A context menu handler shell extension for extracting icons from .exe and .dll files
Please Sign up or sign in to vote.
11 Jul 2002
Pavel Kobyakov
A DevStudio add-in described provides two interesting IDE integration features: adding a new tab to VC WorkspaceView window and running an arbitrary process under IDE with output sent to "Build" tab of VC Output window.
Please Sign up or sign in to vote.
28 Jul 2003
Katasonov
Easiest way to add XML persistence to an existing IDispatch based ATL COM object.
Please Sign up or sign in to vote.
30 Sep 2002
Ernest Laurentin
Shows how to use Microsoft Script Hosting inside existing ATL/WTL Application
Please Sign up or sign in to vote.
22 Aug 2008
vikas amin
its simple by modifying the registery , check this linkhttp://forums.msdn.microsoft.com/en-US/vcgeneral/thread/15469774-bd67-4bed-b797-32a899eb79d3[^] Vikas AminMy First Article on CP" Virtual Serial Port "[^]modified on Thursday, July 24, 2008...
Please Sign up or sign in to vote.
2 Aug 2009
«_Superman_»
In an executable, there must be one entry point that can be called by the loader, runtime etc.There cannot be any ambiguity here.That is why we can have only one main function in a console program and only one WinMain function in a windows...
Please Sign up or sign in to vote.
8 Aug 2009
David Crow
See here. "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." -...
Please Sign up or sign in to vote.
13 Feb 2009
«_Superman_»
SetEndOfFile can be used to extend or truncate a file. «_Superman_»
Please Sign up or sign in to vote.
26 Feb 2010
Eugen Podsypalnikov
There are two steps:// Set WS_EX_LAYERED on this window SetWindowLong(hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED);// Make this window 70% alphaSetLayeredWindowAttributes(hwnd, 0, (255 * 70) / 100, LWA_ALPHA);Here is only one variable hwnd - handle...
Please Sign up or sign in to vote.
5 Aug 2000
Konstantin Boukreev
Describes an ActiveX Control to use OLE Automation to set an object's properties.
Please Sign up or sign in to vote.
22 Apr 2009
Stuart Dootson
Use std::inserter[^] or std::back_inserter[^] for the output iterator. That causes the items to be inserted into the container without having to know what size it should be before you've constructed it.If you're using a vector or list as the...
Please Sign up or sign in to vote.
3 Aug 2008
hoxsiew
int count; // Loop counter variableint correct;char correct_answers[count] = {B, D, A, A, C, A, B, A, C, D, B, C, D, A, D, C, C, B, D, A}This can only cause problems. correct_answers[count] should probably be correct_answers[NUM_QUESTIONS] since...
Please Sign up or sign in to vote.
1 Aug 2009
Bacon Ultimate Cheeseburger
Simply make a call to GetObjectType().
Please Sign up or sign in to vote.
13 Aug 2009
Stuart Dootson
Using Spy++ on a sample application I just built, it would seem that instead of edt1, you now want to use cmb13 (0x47c). I guess they decided that as that field is (now) actually a combo-box, that would be a better ID to use. Java, Basic, who...
Please Sign up or sign in to vote.
13 Oct 2009
Cedric Moonen
No, you can't select the type of the class this way. However, by using pointers (or references), you can manipulate all buildings the same way by manipulating pointers to the base class (this is called polymorphism, google for it if you want more information).What you want are virtual constructors,
Please Sign up or sign in to vote.
5 Feb 2013
Gokulnath007
To get instant control over Outlook and various operations of outlook.
Please Sign up or sign in to vote.
30 Nov 1999
Gerolf Reinwardt
An article that discusses drawing a control at designtime
Please Sign up or sign in to vote.
16 Apr 2001
Igor Sukhov
The ATL and MFC versions of the class that implements a dialog for selecting users(computers) within the Windows Network.
Please Sign up or sign in to vote.
28 May 2001
Ben Burnett
An article on the CodeMax editing control.
Please Sign up or sign in to vote.
19 Dec 2008
Stuart Dootson
I think you need to add the WTL include directory to the include directory path for the resource compiler. Right-click on the project, select 'Properties', select Resources->General in the properties window and add the WTL include directory to...
Please Sign up or sign in to vote.
21 Apr 2009
liquid_
1 alternative  
How to compute difference and intersection of two sets?There are functions set_difference and set_intersection which requires two pairs of iterators of source sets and output iterator of resulting set. Here, set can be any sorted container with...
Please Sign up or sign in to vote.
22 Sep 2008
Christian Flutcher
4 alternatives  
I am progressing with my C++ learning. I am stuck with the following code. void ChangeData(int** ptr){ int ab = 1000; // scope in this method *ptr = &ab;}int _tmain(int argc, _TCHAR* argv[]){ int a = 10; int* aPtr = &a; ChangeData(&aPtr); cout...
Please Sign up or sign in to vote.
22 Sep 2008
Russell'
The variable is destroyed, but not the contents.You know the abbress s you can continue to check it's value...but, as you sad, it is wrong, so do not do it. The system can use the same locatio of that variable in any moment after that the...
Please Sign up or sign in to vote.
22 Sep 2008
Cedric Moonen
Christian Flutcher wrote:I am confused how this is happening?Because you were lucky (or in your case, not ). In your ChangeData function, your local variable has a certain address which you store in your ptr variable. When the function exits,...
Please Sign up or sign in to vote.
10 Oct 2008
led mike
Gut Mikh Tappe wrote:Please let me know what to do Ok I will try. What you need to do is read the documentation.[^]Also reading this might help as well.[^]In my experience not all authors match every reader. So if you find reading those sources...
Please Sign up or sign in to vote.
10 Dec 2008
Kiran Pinjala
2 alternatives  
Hi,I have creted a MFC SDI project in VC 2008 and compiled in Vista OS. Now when i copied the project into XP OS system and opened. I can open all views(class view, solution explorer...) but the resource view...it is showing a MessageBox statingA...
Please Sign up or sign in to vote.
29 May 2009
«_Superman_»
Call GetLogicalDrives to get all the available drive letters.Call GetSystemDirectory to get the drive which contains the OS.Open the volume using CreateFile("\\.\C:", ...Here replace C: with the drive letter returned in GetSystemDirectory.Call...
Please Sign up or sign in to vote.
1 Jul 2009
David Crow
Caslen wrote:If it is my problem is there anyway to detect programatically whether a file is already open somewhere else?Open it exclusively. All other attempts will fail. "Old age is like a bank account. You withdraw later in life what you...
Please Sign up or sign in to vote.
1 Aug 2009
«_Superman_»
OnCreate is called just when the application requests that the Create function be called. So it is not guarenteed that the window is fully created. OnInitDialog is called after the window (in this case the dialog) is completely created.When you...
Please Sign up or sign in to vote.
16 Oct 2009
Stuart Dootson
Yeah, that's not happening...Why 1 microsecond, FFS? What are you trying to do? Because there may well be a better way.
Please Sign up or sign in to vote.
3 Apr 2009
David Crow
The union looks something like this:-----------------------| 512 |-----------------------| 00000010 | 00000000 |-----------------------| 2 | 0 |----------------------- "Old age is like a bank account. You withdraw...
Please Sign up or sign in to vote.
22 Jan 2010
Jast_in
Add this 2 blocks to your class source file:BEGIN_MESSAGE_MAP(YourClassName, YourBaseClass)ON_BN_CLICKED( BUTTON_ID, OnBtnClick )END_MESSAGE_MAP()afx_msg void YourClassName::OnBtnClick(){MessageBox( "Some test text" );}Add this line to your class header...
Please Sign up or sign in to vote.
21 Jan 2010
Jast_in
You need to add a message handler to your button: ON_BN_CLICKED( BUTTON_ID, OnBtnClick )And, of course a function for that:afx_msg void ClassName::OnBtnClick(){MessageBox( "Some test text" );}I just tried it in my BHO for IE... works fine!
Please Sign up or sign in to vote.
16 Oct 2010
Aescleal
If you're using C++ there's no reason to use printf or the whole god awful family of C relics. Use a stream. Then you get type safety and you won't try reading return addresses off the stack to interpret as strings. Consider rewriting along the lines of:int main(){ int d = 20; ...
Please Sign up or sign in to vote.
25 Mar 2011
Nuri Ismail
Have a look at this[^] nice CP Tip/Trick. TCHAR is well explained there. :)
Please Sign up or sign in to vote.
25 Mar 2011
mbue
For the first: TCHAR is not a type themselves - its a placeholder for the character type you use. This can be:* unicode characters (unsigned short or wchar_t)* ANSI characters (char).this depends on your project settings. You can plan your module to support both of them. Therefore you have...
Please Sign up or sign in to vote.
6 Oct 2012
Briti Sundar
May be you have missed to malloc first before insert into MyArray.MyDataStructure* pNewStruct;pNewStruct =(MyDataStructure* )malloc(sizeof(MyDataStructure));MyArray.Add(pNewStruct);Hope this will work.
Please Sign up or sign in to vote.
5 Mar 2013
jan.mach71
A small tool listing Administrators group members recursively using the ActiveDS library.
Please Sign up or sign in to vote.
12 Aug 2000
Paul Shaffer
An article on ATL COM event connection point threading issues
Please Sign up or sign in to vote.
28 Aug 2001
Adrian Bacaianu
This article shows how to make one ATL COM component with crypt/decrypt functions and how to use it in ASP programs. It shows also how to register a component in MTS.
Please Sign up or sign in to vote.
19 Dec 2008
josip cagalj
2 alternatives  
Hi to all. I'm trying to open some project wroted using WTL. When I try to rebuild it (using VS2008 on Win XP) I get the compile error as above. Now, "atlres.h" file is in directory which I added to my project settings properly and I don't know...
Please Sign up or sign in to vote.
26 May 2009
followait
1 alternative  
I tried as below, but ostream cannot be instantiate?ifstream ifs1("file1");ifstream ifs2("file2");ostream oss;oss
Please Sign up or sign in to vote.
26 May 2009
Stuart Dootson
ostream is an abstract base class - that's why you can't instantiate it. Also, you can't use the insertion operator on streams to get what you're wanting.So...what do you mean by "memory binary stream"? If you were using strings, then this should...
Please Sign up or sign in to vote.
15 Oct 2010
fantasy1215
4 alternatives  
Please run the code below.int main(int argc, char* argv[]){ int ii = 20; char tmp[32] = "loveing"; printf("[%d]hello[%s]\n", tmp); //no integer fill the %d format char szData[52] = {0}; sprintf(szData, "[%d]saying [%s]\n",ii);//no string fill the %s format printf("%s", szData); return 0;}The...
Please Sign up or sign in to vote.
9 Sep 2008
SandeepNK
4 alternatives  
Sample code is as follows:class TestClass{CCriticalSection m_csTest;void Fun1() { m_csTest.Lock(); Fun2(); MessageBox("In Fun1 critical section."); m_csTest.Unlock();}void Fun2(){ m_csTest.Lock(); MessageBox("In Fun2 critical...
Please Sign up or sign in to vote.
25 Sep 2008
Christian Flutcher
1 alternative  
I know .NET framework and C# well. Recently I started working with C++/CLI which I felt more interesting than C#. Since .NET framework is becoming popular, do you think MFC got obsolete? Are you guys doing any projects in MFC other than...
Please Sign up or sign in to vote.
10 Oct 2008
Mark Salsbery
In addition to super_ttd's reply...If you must use fopen(), then you should probably use a CStringA.CString has a generic internal character type, depending on whetherUNICODE or _UNICODE is defined.If you want to use the generic text CString,...
Please Sign up or sign in to vote.
7 Jan 2009
CPallini
I suppose it depends on color depth... See BITMAP struct definition [^], the bmBitsPixel member looks promising. If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. ...
Please Sign up or sign in to vote.
8 Jan 2009
Code-o-mat
Take a look at this[^], might be usefull. > The problem with computers is that they do what you tell them to do and not what you want them to do.
Please Sign up or sign in to vote.
8 Jan 2009
Hamid_RT
OR see CRichEditControl50W - A VC++ Rich Text Edit 4.1 MFC Control[^]. Of one Essence is the human racethus has Creation put the baseOne Limb impacted is sufficientFor all Others to feel the Mace(Saadi )
Please Sign up or sign in to vote.
27 Jan 2009
Garth J Lancaster
1) this sounds like homework - we dont do homework - at best we will give you hints, but if you're expecting us to jump in and solve all your issues, go to RentACoder or such 2) DONT GET IMPATIENT AND POST MORE THAN ONCE - most of us here have...
Please Sign up or sign in to vote.
22 Jun 2009
Stuart Dootson
Member 4399131 wrote:I assumed that the problem isn't in my coding technique, it must be generally in the algorithm I use!!!Yep.Member 4399131 wrote:Does somebody know a better algorithm to implement FindOneOf???Looking at their code (strpbrk -...
Please Sign up or sign in to vote.
2 Aug 2009
CPallini
Because there is only one application in your application... If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of...
Please Sign up or sign in to vote.
6 May 2010
sashoalm
Here's my try:#include using namespace std;int main(int argc, char* argv[]){ string name; static const int namelen = 15; static const char* letters[2] = { "bcdfghjklmnpqrstvwxyz", "aeiouy" }; static const letterlen[2] = { strlen(letters[0]), strlen(letters[1])...
Please Sign up or sign in to vote.
13 Aug 2009
softwaremonkey
1 alternative  
Hi,In an older (MSVC++6.0) project I used HideControl(edt1) to hide the filename edit control in a CFileDialog derrived class, which worked fine at the time.When I compile this project with MSDEV2008, the code complies OK but control is no longer...
Please Sign up or sign in to vote.
13 Aug 2009
Stuart Dootson
Could you do all of the automation, including creation of the Word object, on the worker thread?Basically you're running foul of COM single-threaded apartments and things, I think. This article[^] explains them well. Java, Basic, who cares - it's...
Please Sign up or sign in to vote.
31 Aug 2009
Moreno Airoldi
Consider this as a rough idea:#include void PrintArrayClockwise(int *array, int rows, int columns){ int r = 0; int rh = rows / 2; int i; while (r
Please Sign up or sign in to vote.
15 Aug 2009
Stuart Dootson
birajendu wrote:I want to write some code which will double click a desktop shortcut. or the alternate way is how can i run a desktop shurtcut using Createprocess() api.If you know the path to the desktop shortcut, then you should be able to use...
Please Sign up or sign in to vote.
16 Aug 2009
David Crow
The SetActivePage() method looks promising. "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown"Fireproof doesn't mean the fire will never come. It means when the fire comes that you...
Please Sign up or sign in to vote.
15 Jul 2008
CPallini
1.From the same article, below your quoted sentence.The LEA instruction uses hardwired address generation tables that makes multiplying by a select set of numbers very fast (for example, multiplying by 3, 5, and 9). Twisted, but true.That means...
Please Sign up or sign in to vote.
13 Mar 2009
Cedric Moonen
Which kind of string ? C style strings ? Then use strcat. std::string ? Then use the + operator. Cédric MoonenSoftware developerCharting control [v1.5]OpenGL game tutorial in C++
Please Sign up or sign in to vote.
10 Mar 2009
Iain Clarke, Warrior Programmer
I've just noticed you posted the same question four hours before. You really should have more patience! People volunteer to answer these questions. Asking the same one again in a short time is not helpful to you...Iain. Codeproject MVP for C++, I...
Please Sign up or sign in to vote.
10 Oct 2008
Maximilien
George_George wrote:I am developing for both x86 and x64. I stop mouse on size_t in the code, and "typedef unsigned int size_t" is always displayed. I think it is not correct for x64. Since x64 size_t is 64-bit and unsigned int on x64 is 32-bit....
Please Sign up or sign in to vote.
10 Oct 2008
Chris Losinger
from io.h (and crtdefs.h)#ifndef _SIZE_T_DEFINED#ifdef _WIN64typedef unsigned __int64 size_t;#elsetypedef _W64 unsigned int size_t;#endif#define _SIZE_T_DEFINED#endif image processing toolkits | batch image processing
Please Sign up or sign in to vote.
23 Feb 2010
Eugen Podsypalnikov
Why should it be impossible ? :)class B;class A{...public: A(B* pB);...--When you will have to transport class instances by an interface -you could define a function like TakeData(IStream* pStream) :) The caller could create an IStream associated with...
Please Sign up or sign in to vote.
3 Apr 2010
Rod Kemp
To learn how to create plug-ins for Windows Media Player, see the Windows Media Player SDK[^].This should outline what you can and can't do with a plug-in in WMP.
Please Sign up or sign in to vote.
27 May 2010
Aescleal
If you're programming in C, then:strncpy( q, p, 499 );q[499] = '\0';will do the trick and work however long the string is. If you'd like to obfuscate things a bit more then you can combine the two lines into one by exploiting the return value of strncpy:strncpy( q, p, 499 )[ 499 ]...
Please Sign up or sign in to vote.
31 May 2010
Anu Koshy
if it is a text control, set "No Prefix" as True.That should solve the problem. :)
Please Sign up or sign in to vote.
14 Jun 2010
Paul Heil
Using the RAPI2 interface safely and effectively.
Please Sign up or sign in to vote.
3 Aug 2010
Jörgen Sigvardsson
You need to marshal calls across threads/apartments. See this[^] article for different ways to perform cross thread marshalling. CoMarshalInterThreadInterfaceInStream() would probably be the easiest approach. Look it up in the MSDN documentation. It's quite easy to use.
Please Sign up or sign in to vote.
28 Jul 2011
Manjuke Fernando
Using Update Cursors in SQL Server
Please Sign up or sign in to vote.
5 Aug 2012
Anna-Jayne Metcalfe
Theme support in Visual Studio 2012
Please Sign up or sign in to vote.
17 Jan 2000
Shaun Wilde
A wizard that allows you to create an ATL Property Page or Context Menu extensions
Please Sign up or sign in to vote.
24 Feb 2000
Len Holgate
A simplified method to enumerate a collection of objects.
Please Sign up or sign in to vote.
13 Jun 2002
Wictor Wilén
How to use the IDirectoryObject interface instead of using the IADs(IDispatch) objects
Please Sign up or sign in to vote.
4 Jul 2009
Kannan Ramanathan
One more req I have to worry abt: The 64bit local server should be able to implement connection points (32bit client being the sink)...is this possible? Thanks.
Please Sign up or sign in to vote.
28 Jul 2008
sashoalm
MFC has issues with multiple threads and possibly also with dlls. In this case GetParentFrame() is the culprit as it makes an internal call to CWnd::FromHandle which looks like this:CWnd* PASCAL CWnd::FromHandle(HWND hWnd){ CHandleMap* pMap =...
Please Sign up or sign in to vote.
8 Aug 2008
Naveen
"_$h@nky_" wrote:HTREEITEM item = tc.GetSelectedItem(); Because you are setting the image of selected item. Use pnmtv->itemNew.hItemHTREEITEM item = pnmtv->itemNew.hItem; nave[OpenedFileFinder]
Please Sign up or sign in to vote.
5 Sep 2008
Ben Burnett
2 alternatives  
I was wondering if anyone knew of a straight forward way of calling (non-exported) functions in an executable from a DLL. We are building a, for lack of a better name, private plug-in system that will grant the plug-in access to all of a...
Please Sign up or sign in to vote.
5 Sep 2008
Garth J Lancaster
oohhh .. thats a hard one. Unless your executable exposes some sort of API I think you'd have to resort to using injection/hooking from the dll (which I presume is in another process) to access the functions in the executable, even then ......
Please Sign up or sign in to vote.
10 Oct 2008
DSPCottage
4 alternatives  
Dear AllIn visual C++ 2005 I want to change a CString file to char* I used following codeBut fopen needs a char* for its first parameterPlease let me know what to doRegards char...
Please Sign up or sign in to vote.
10 Oct 2008
super_ttd
It should do.So, what's wrong ? Do you get an error ?CString has an inner cast Operator (LPCTSTR) which converts the CString object to a const char* (if compiling ANSI) of const wchar_t* (if building unicode), so you should not have to do any...
Please Sign up or sign in to vote.
23 Dec 2008
CPallini
Merry Christmas to you, Iain (an anonymous fan ).Iain Clarke wrote:To those regulars who post great answers, thanks for educating me.To those posting interesting questions - thanks for helping me educate myself!BTW it looks like you missed the...
Please Sign up or sign in to vote.
8 Jan 2009
Iain Clarke, Warrior Programmer
Not quite sure where the question is here. It sounds like you're telling us about your day.Assuming you're needing some help with this...http://www.codeproject.com/KB/static/pphtmlstatic.aspx[^] should be of some help to you.Iain. Codeproject MVP...
Please Sign up or sign in to vote.
27 Jan 2009
arad.moradi
1 alternative  
i don't know what is the reason of of error.i write it with c++ & i send what is it about.it is the code:#include #include #include using namespace std;class cart{public: cart(char a[2]="paq"){ cout
Please Sign up or sign in to vote.
29 Jan 2009
calducciano
1 alternative  
Hi, I have a quick question. (well, hopefully the answer is as quick as my question as I'm sure I'm doing something dumb.)I have a direct sound application that runs just fine as a windows console app which makes sense because there is nothing...
Please Sign up or sign in to vote.
29 Jan 2009
Stuart Dootson
calducciano wrote:I know about MsgWaitForMultipleObjects but it just falls throughBut with what return code? That's what tells you if you a) have a message to process, or b) one of your handles has been signalled!For something like audio, I'd...
Please Sign up or sign in to vote.
29 May 2009
Madan Chauhan
1 alternative  
Hi all,My application is for windows Vista and XP. There are more than on Hard drive connected to my machine. I need to get Drive Letters of the Hard drive from which my system is booting. By using GetLogicalDriveStrings Function I can get the...
Please Sign up or sign in to vote.
2 Jun 2009
agetina
1 alternative  
I can read the prototypes for windows.h in the include folder (I have installed dev c++) but i want a list of explained functions. I don't know for what to use each of them.Thank you! modified on Wednesday, June 3, 2009 4:29 AM
Please Sign up or sign in to vote.
2 Jun 2009
CPallini
Well, usually you don't need to read the explanations of all Win32 API functions in order to be a developer. Anyway (you know) you may find help for each and every function online, for instance searching for EncodePointer (the first function I...
Please Sign up or sign in to vote.
22 Jun 2009
Ivan Ivanov 83
3 alternatives  
Hi AllI'm developing my own CString class. With the idea to make it "much" faster than the standard CString, easily upgradeable, and to include into it some non-standard parsing functions I often use in my work, those will be much better to be...
Please Sign up or sign in to vote.
22 Jun 2009
Skippums
Without knowing the logic behind the standard implementation, it is impossible to know why your algorithm is being beat. Perhaps the standard string stores data about specific searches so that, in your loop, it loads known results instead of...
Please Sign up or sign in to vote.
22 Jun 2009
Roger Stoltz
I think Stuart's advice to use the C runtime in this case is the best alternative.An algorithm can be optimized for different purposes and can also be better or worse in some scenarios. I guess the standard C runtime implementation is rather...
Please Sign up or sign in to vote.
6 Jul 2009
samvaidy
1 alternative  
can any body help me for, showing pop up window in taskbar..like the way windows media players shows songs and visualisation in minibar(when its minimised).
Please Sign up or sign in to vote.
6 Jul 2009
«_Superman_»
What you need is a Deskband.There are 4 types of deskband objects.3 of them reside inside internet explorer.The last one is on the desktop.Look at the second image in the article Implementing Shell Desk Band and Internet Explorer Bars[^]...
Please Sign up or sign in to vote.
13 Jul 2009
ksaw123
6 alternatives  
Hi allcan you help?part of my code i need to do this const char * p= "ddddd";char q[500];I want to copy the sting in p to q[]?
Please Sign up or sign in to vote.
20 Jul 2009
errdy
1 alternative  
hey guys,i hav being trying for a very long time to design a c++ programme that solves second order differential equations as a final year proj. I got some codes from the resource material i have been working with; i keep getting errors compiling...
Please Sign up or sign in to vote.
20 Jul 2009
Randor
At the top of your code you declare:extern double parse(CString,int,double [],int []);Where is this function implemented at? The linker does not know where it is. Check this resource material you mention and see if perhaps you missed copying a...
Please Sign up or sign in to vote.
24 Jul 2009
echo_yao
1 alternative  
[id(0x60060001...
Please Sign up or sign in to vote.
24 Jul 2009
«_Superman_»
In the IDL file it should be [in, out] SAFEARRAY(VARIANT)* oAxisComponentsArrayIn the .h and .cpp files it should be SAFEARRAY** oAxisComponentsArray «_Superman_»I love work. It gives me something to do between weekends.
Please Sign up or sign in to vote.
1 Aug 2009
japcrword
1 alternative  
Is there an easy way to find out what type of GDI object is referenced by HGDIOBJ handle i.e. is it a pen, brush, bitmap, font or region? I can't find WINAPI that does the job. Of course, I can always go the tricky way to determine the type of...
Please Sign up or sign in to vote.
1 Aug 2009
ForNow
1 alternative  
When Create controls for a Modless DialogDurning which message is it best to do SoOnInitdialog or OnCreateI meant which virtual functions ??
Please Sign up or sign in to vote.
13 Aug 2009
sashoalm
2 alternatives  
I'm automating Word and when I call a function that doesn't return for a long time (for example a call to app.Run(_T("FilePrint"));) it tends to freeze the UI of my app until it returns from the call, so I tried to run this code from a worker...
Please Sign up or sign in to vote.
13 Aug 2009
Baltoro
You definitely need to have a Window Proc to recieve your message, because it is associated specifically with a registered Windows class. The documentation over at MSDN should show you how. See this: Windows Procedures Overview[^]You can also...
Please Sign up or sign in to vote.
25 Aug 2009
Member 3911643
1 alternative  
What is the C++ syntax for "typeof(string)"? I'm patterning after the following line from SourceGrid sample #14. SourceGrid.Cells.Editors.ComboBox cbEditor = new SourceGrid.Cells.Editors.ComboBox(typeof(string));I'm trying to setup a SourceGrid text editor in C++. I don't know how to make the co
Please Sign up or sign in to vote.
15 Aug 2009
Hristo-Bojilov
Into C++/CLI typeof(Something) goes to Something::typeid.You should post this kind of questions into Managed/ C++ CLI forum.It's native coding forum. Life is a stage and we are all actors!
Please Sign up or sign in to vote.
25 Aug 2009
sharp_k
1 alternative  
Do I have to use advance loops? I thought about it for quite a while but could not figure it out. Example:int numbs[4][4] = [1,2,3,4 5,6,7,8 9,10,11,12 13,14,15,16];When i print it, it should print like this. 1 2 3 4, then 8, 12,16, 15,14,13,9,5,67,11,10, (ie clockwise direction).The fu
Please Sign up or sign in to vote.
16 Aug 2009
Ahmed Charfeddine
1 alternative  
?Thanks. Easy Profiler : a compile-time profiler for C++www.potatosoftware.commodified on Sunday, August 16, 2009 5:41 PM
Please Sign up or sign in to vote.
25 Aug 2009
paolosh
1 alternative  
Hi all, I have a class, say GeneralBuilding, which could be one of the classes SmallBuilding, MediumBuilding, LargeBuilding, etc...., depending on the parameters passed to the Building constructor. SmallBuilding, MediumBuilding, and LargeBuilding have a common base class Building. Is it poss
Please Sign up or sign in to vote.
20 Dec 2006
pvn g
1 alternative  
i am preparing application to test sound at different speaker configuration for Windows vista and Windows XP.for doing this i am using API SetSpeakerConfig() to set the different configuration and API GetSpeakerConfig()for getting same...
Please Sign up or sign in to vote.
2 Jul 2008
subramanyeswari
1 alternative  
Hi,How to read a manifest file from executable using either vc++ or sdk?Regards
Please Sign up or sign in to vote.
2 Jul 2008
Nibu babu thomas
subramanyeswar...
Please Sign up or sign in to vote.
15 Jul 2008
George_George
4 alternatives  
Hello everyone,Two questions after readnig this article,http://www.microsoft.com/msj/0298/hood0298.aspx1.why using LEA to do multiplication is faster than using MUL?"Using "LEA EAX,[EAX*4+EAX]" turns out to be faster than the MUL...
Please Sign up or sign in to vote.
15 Jul 2008
Stephen Hewitt
George_George wrote:why using LEA to do multiplication is faster than using MUL?You'd have to know about the internal architecture and circuitry of the CPU to answer that; I don't and I doubt there would be many people except for people that work...
Please Sign up or sign in to vote.
15 Jul 2008
Rajesh R Subramanian
Some more read material: Pentium Optimization Cross-Reference[^].From the page: LEA is better than SHL on the Pentium because it pairs in both pipes, SHL pairs only in the U pipe.Also, as CPallini pointed out, the document states that lea can be...
Please Sign up or sign in to vote.
8 Feb 2009
Member 3375334
1 alternative  
Hello everyone,i am new to MFC and VC++ programming in general. What i am trying to do right now is write a program that will allow me to draw lines based on a Gupta-Sproull midpoint algorithm. There is Bresenham algorithm but it's different. I...
Please Sign up or sign in to vote.
8 Feb 2009
Stuart Dootson
I'd just draw on a plain dialog surface. Create a dialog-based MFC application. Draw your lines and things in the dialog's OnPaint handler. Add button click handlers for the dialog.
Please Sign up or sign in to vote.
21 Feb 2009
Gary R. Wheeler
First question: Was pDict allocated as an array, i.e.pDict = new pDictType[size];You are using the array delete syntax (delete []pDict). If pDict is a simple pointer, then using the array delete will Do Bad Things.Other than that, the general...
Please Sign up or sign in to vote.
23 Feb 2009
hemlat
1 alternative  
Hi,I want to add Picture control Programmatically.Can any one suggest how to do it.Meanwhile I will also search. I am using following code for creating static control in MFC Dialog.CStatic * myStatic = new CStatic;myStatic->Create( _T("my...
Please Sign up or sign in to vote.
23 Feb 2009
Chandrasekharan P
Try using this piece of code. CStatic * myStatic = new CStatic;myStatic->Create(_T("my static"), WS_CHILD|WS_VISIBLE|SS_CENTER, CRect(10,10,150,50), this,1);
Please Sign up or sign in to vote.
3 Apr 2009
_8086
3 alternatives  
union u{ char ch[2]; int i;};int main(){ union u x={0,2}; cout
Please Sign up or sign in to vote.
3 Apr 2009
CPallini
Is doing politely what you asked with your code.The character array and the integer share the same memory space (at least the first two bytes), hence assigning one of the two will affect the other (you know that: it is a union, after all......
Please Sign up or sign in to vote.
3 Apr 2009
Iain Clarke, Warrior Programmer
Unions are powerful things, but until you realise that the parts share the same memory, you'll struggle. David's picture and Carlo's talk both help, I hope.They are very powerful in their limited way. Here's a sample of my code (no real secrets...
Please Sign up or sign in to vote.
25 Aug 2009
kumar sanghvi
2 alternatives  
If I have the following code: int* p;int w=10;p=&10;Will the memory allocation for both w and p will be on stack only? Please correct me if im wrong as I'm a newbie to C++, and please let me know when it is really useful to allocate memory dynamically using a pointer rather than allo
Please Sign up or sign in to vote.
23 Aug 2009
harold aptroot
kumar sanghvi wrote:int* p; //declared pointer to int (statement does nothing)int w=10; //declares and initializes an int to 10, but it won't exist unless you use itp=&10; //this is an error, you probably meant p=&w? p=&w would do, assuming p is...
Please Sign up or sign in to vote.
28 Feb 2009
Stuart Dootson
Here's a solution from Mr C++ himself[^]. Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
Please Sign up or sign in to vote.
13 Feb 2009
Nuri Ismail
You can use InternetGetConnectedState() by including wininet.h and using the following snippet:#pragma comment(lib,"wininet.lib") if (InternetGetConnectedState(INTERNET_CONNECTION_LAN | INTERNET_CONNECTION_MODEM,0) == FALSE){ // Not...
Please Sign up or sign in to vote.
14 Feb 2009
David Crow
See here. "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." -...
Please Sign up or sign in to vote.
14 Feb 2009
«_Superman_»
Check out the IsNetworkAlive API «_Superman_»
Please Sign up or sign in to vote.
14 Feb 2009
Hamid_RT
How To Detecting If You Have a Connection to the Internet[^]. Of one Essence is the human racethus has Creation put the baseOne Limb impacted is sufficientFor all Others to feel the Mace(Saadi )
Please Sign up or sign in to vote.
8 Feb 2009
simon alec smith
Hello, There are various good books that you can get from the big book stores that can take you right from the beginning to the end, that assumes you have no knowledge. then you can pick up the pieces from this site if you want to...
Please Sign up or sign in to vote.
15 Jul 2008
CPallini
Shouting will not help you. If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.This is going on my arrogant...
Please Sign up or sign in to vote.
8 Oct 2008
led mike
George_George wrote:I have searched for RTTI tutorials for 15 minutes, but find none. Wow 15 minutes! I suppose you want a medal? I spent several hours over several days looking for one specific thing just this week. led mike
Please Sign up or sign in to vote.
13 Oct 2009
Jörgen Sigvardsson
Don't start processes by simulating behaviors of the user, such as double clicking shortcuts. You never know what the shortcut points to!Also, insanity lives down that road. Sooner or later you'll be opening the control panel applet by simulating mouse clicks on the start menu...
Please Sign up or sign in to vote.
17 Nov 2009
Lim Bio Liong
Look up the API GetPrivateProfileSection().Bio.
Please Sign up or sign in to vote.
11 Dec 2009
GangaSungar
1 alternative  
Hello Everyone,I am trying to create a .DLL using VS 2005. While linking, I am getting the following error;-----------------------------------------------------------------------error LNK2001: unresolved external symbol "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)"...
Please Sign up or sign in to vote.
9 Jan 2010
Ajay Vijayvargiya
Since Windows Vista supports "India' English", and has the following definition:0x4009 India (IN) 0x10 SUBLANG_ENGLISH_INDIA Visual Studio takes this as the project's language.While creating new project, one should select 'English (US)' as 'Resource Language' in Project Wizard.
Please Sign up or sign in to vote.
21 Jan 2010
Avi Berger
I'm going to try to synthesis three other answers which each have an important point.There are situations where seemingly useless parenthesis are necessary for correctness in a macro definition. («_Superman_») In the cases that you have highlighted, however, they have no significant impact...
Please Sign up or sign in to vote.
2 Feb 2010
«_Superman_»
This tutorial may help you on how to write chrome extensions - http://code.google.com/chrome/extensions/getstarted.html[^]
Please Sign up or sign in to vote.
3 May 2010
Michel Godfroid
Yes, that won't work. Have a look at at the Yahoo messenger API[^]
Please Sign up or sign in to vote.
8 Jun 2010
enowy
1 alternative  
Hi everyone.I have plan to make new desktop application based on ATL/WTL. From now on I want to use DHTML UI in this project (for example like CDHtmlDialog of MFC).How to use DHTML UI in this project (I can not use MFC in this project).Thank you.
Please Sign up or sign in to vote.
12 Jul 2010
TheyCallMeMrJames
You can find more information here: ATL and here: COMMore specific questions will yield more specific answers.Cheers.
Please Sign up or sign in to vote.
12 Aug 2010
Merwan Hade
3 alternatives  
I am facing issues with a project called ServiceConfigurationManager, using Visual Studio 2010. To be more specific, when I try to execute the following line of code in a file called ServiceConfugrationManagerModule.h: class CServiceConfigurationManagerModule : public CAtlServiceModuleT...
Please Sign up or sign in to vote.
15 Oct 2010
Niklas L
Static code analysis tools like Lint and the the one that ships with VS2010 Ultimate, might help you there, but I would say experience is your best friend. With experience you know which constructs to avoid, and which needs extra care. Format specifiers floating around inside a string of...
Please Sign up or sign in to vote.
27 Jan 2011
Ryan Zahra
Your problem is that IGreet2 is not inherited from IGreet. You must inherit IGreet in IGreet2. In the QueryInterface of IGreet2, you must create an instance of IGreet.HRESULT __stdcall Greet2::QueryInterface(REFIID riid, void **ppObj){ if(riid == IID_IUnknown || riid ==...
Please Sign up or sign in to vote.
25 Mar 2011
Eugen Podsypalnikov
Try to start here[^] :)
Please Sign up or sign in to vote.
25 Mar 2011
Richard MacCutchan
TCHAR is defined as char in a non-Unicode project, and as WCHAR (16 bit character) in a Unicode project. This allows the same code to be ported from non-Unicode to Unicode fairly easily.
Please Sign up or sign in to vote.
16 Apr 2011
Aschratt
1 alternative  
Hi everyone,I am writing a library using C++ and want to make it portable and accessable in other languages (like .NET languages). This is why I decided to wrap the library inside an COM DLL, using ATL.Now my problem is that I am unable to pass ANSI strings from the library through the...
Please Sign up or sign in to vote.
17 Apr 2011
mbue
Usually COM is using BSTR for marshalled strings. Allocated by SysAllocString and freed by SysFreeString.Regards.
Please Sign up or sign in to vote.
21 Apr 2011
Smitha Nishant
This article shows how to do that (as well as other similar conversions):Guide to BSTR and C String Conversions[^]Another (perhaps better) article that shows how to do this:http://www.flounder.com/cstring.htm[^]
Please Sign up or sign in to vote.
26 May 2011
Joan M
Well,If you close the dialog and open it again, the changes made won't be reflected in the newly opened dialog unless you make it possible... you should edit the OnInitDialog function in order to update the contents of your controls at the beginning.Notice that I think that after...
Please Sign up or sign in to vote.
27 May 2011
Joan M
I would say that it is normal that it don't work...Keep in mind that once you've closed the dialog (property page) everything there gets destroyed.So you must keep the property values stored in variables (or containers) that keep them. You should update the values of those containers...
Please Sign up or sign in to vote.
10 Jun 2011
Graham Shanks
I don't quite understand what the problem is. IShellFolder is part of theWindows SDK, not part of MFC or of ATL.The File Operations sample[^] is one of a number of Microsoft samples that show you how to use it
Please Sign up or sign in to vote.
15 Jul 2011
stebain
2 alternatives  
Good day.Environment: Visual Studio 2008. Language: C++(This is evolving into a two part question, I hope that's permitted...)I have an ATL Project that I am working to replace an existing tool developed in an older version (VC++6, I believe, although nobody seems terribly...
Please Sign up or sign in to vote.
13 Aug 2011
neumanndn
1 alternative  
Hello, I've done a bunch of googling and have not found an answer to this.I need to write a SNMP agent in C++ (actually add it to an atl dcom server) that broadcasts status information via SNMP trap messages. Then I need to write a C# application to monitor these SNMP trap (status) messages...
Please Sign up or sign in to vote.
24 Oct 2011
Prerak Patel
I found this article on wstring memory issue. You may find it helpful.http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1241618944/12[^]
Please Sign up or sign in to vote.
24 Oct 2011
CPallini
You haven't: wstring releases memory whenever goes out of scope.
Please Sign up or sign in to vote.
28 Nov 2011
Paul M Watt
What language do you want to make the call from a global function?If you mean VB6, you will need to reference your new COM object in your VB6 project, and create an instance of the COM object like this: Dim objA as New YourATLComObjectName objA.YourFunction()If you...
Please Sign up or sign in to vote.
12 Dec 2011
Richard MacCutchan
A WCHAR is a 16 bit character and your CString needs to be the same type. If your program is not being compiled for Unicode then you should use CStringW to ensure it is compatible with the source.
Please Sign up or sign in to vote.
5 Aug 2012
armagedescu
As suggestions. If you return bool then you have to return false/true instead of FALSE/TRUE, because you are not using BOOL. Second, don't name the class Handle. Instead of CConnectionHandle use CConnection name, or even better CDatabase. Instead ir CStatementHandle use CStatement or CQuery, and...
Please Sign up or sign in to vote.
8 Oct 2012
Briti Sundar
This work for me and i get value after thread exit. Compare your code with me , you can understand your problem. Another thing CreateThread can not call a member function, so you must need a static function for this.,#include "stdafx.h"#include #include #include #include class...
Please Sign up or sign in to vote.
19 Dec 2012
armagedescu
It is easy.//ATL ActiveX wnd for the nested control, best place is as a class memberCAxWindow wndAnimationWnd; //best in OnCreate:wndAnimationWnd.Create(hWndOfYourControl, //hwnd of outer control &rect_ForEmbededAnimation, //client coordinates inside the outer control ...
Please Sign up or sign in to vote.
12 Dec 2012
Keyhole Software
Node Application Server with CouchDB
Please Sign up or sign in to vote.
1 Jan 2013
H.Brydon
Here are three good references, all found with a simple Google query:One[^]Two[^]Three[^]HTH!
Please Sign up or sign in to vote.
26 Feb 2013
Leo Chapiro
Short question, short answer: http://blogs.msdn.com/b/calvin_hsia/archive/2006/08/28/729165.aspx[^]Take a look at this article (Create an ActiveX control using ATL that you can use from Fox, Excel, VB6, VB.Net).
Please Sign up or sign in to vote.
18 Apr 2013
skydger
It depends on architecture of your application.Any COM method accepts only "known" parameters in its methods which are primitive datatypes, VARIANT-based or user defined interfaces. So if you want to invoke some method in its implementation it must be defined in some other interface. And your...
Please Sign up or sign in to vote.
5 Jul 2013
BinaryAngel
Hi,I am looking for a sample of atl simple object which uses free thread model,I found few articles about it.Can any one provide a sample or document;Thank's in advance.
Please Sign up or sign in to vote.
22 Oct 2013
Pablo Aliskevicius
I think you should start a survey, not ask a question.A few years ago, I used MFC a couple of times, until I stumbled upon WTL (in 2002 or 2003). I started to use WTL exclusively, and never looked back. In those early days, WTL looked much better (e.g., icons in the menus), and performed...
Please Sign up or sign in to vote.
24 Dec 2013
Sergey Alexandrovich Kryukov
The question makes no sense: "this" parameter is the pointer to the instance passed to the method. It cannot be supported or not supported (for instance methods); this is a feature of C++ and other OO languages.The code sample also makes no sense, as "this" depends on the context. This is...
Please Sign up or sign in to vote.
28 Aug 2014
KarstenK
If you use Nelek receipt you already have found the solution. ElseHere is a nice tutorial right for you: Create ActiveX in .NET Step by Step.This one looks like for newbies: How to develop and deploy ActiveX control in C#
Please Sign up or sign in to vote.
11 Aug 2015
Member 11899075
One possibility...VB (script) might be complaining about the type LONG* for an out/retvalYou don't show your idl, so I can't see how the method is declaredBut it might be worth using a variant for the result, e.g.[out, retval] VARIANT* retval
Please Sign up or sign in to vote.
16 Apr 2019
sumangvs
1 alternative  
We have a MMC Snap In Code built on VS 2005. The snap in has few property pages derived from CSnapInPropertyPageImpl Here is the code snippet for the class definition class TTreeConfigPage02 : public CSnapInPropertyPageImpl Here is the code snippet which works fine...
Please Sign up or sign in to vote.
30 May 2021
KarstenK
Your starting point should be OLE DB Providers Overview from Microsoft. But I think that your efforts to "ride a dead horse" arent the best investment of time and money. Consider changing the data connection of VFP to the database. My best guess...
Please Sign up or sign in to vote.
2 Nov 2005
Jerry Edens & Doug Eveland
A framework for performing unit tests.
Please Sign up or sign in to vote.
8 Sep 2000
Paul E. Bible
Non-MFC Date Routines in an ATL Component.
Please Sign up or sign in to vote.
30 Apr 2001
Paul E. Bible
Non-MFC ByteArray Class for an ATL Component
Please Sign up or sign in to vote.
3 Apr 2001
Maxime Labelle
A wizard to help getting started with PropertySheet Shell Extensions
Please Sign up or sign in to vote.
16 Jul 2001
Fabian von Romberg
Dereferincing and resolving Variants and IDispatch
Please Sign up or sign in to vote.
8 Oct 2001
Ivan Tsygulev
extending existing property browser with OLE DB common dialogs
Please Sign up or sign in to vote.
6 Mar 2007
James, Lu Zuheng
An XML Web Service using ATL Server and Called by MFC Client
Please Sign up or sign in to vote.
4 Dec 2009
Emilio Garavaglia
In the most of the cases, if you're running more than 256 colors, it will be 32 bits (one processor word, even if the color itself is represented by 3 bytes of the four). Otherwise, for 256 colors, 1 byte;and for 16 colors 1 bit of four different bytes (one per color plane, also named RGBI)
Please Sign up or sign in to vote.
8 Dec 2009
samitriani
2 alternatives  
Hi All,I'm working on an ATL ActiveX component which is composed by a controller class and a DialogBox class. I'm trying to create the dialogbox in the controller but it doesn't work. I'll put here the interesting parts of the code.CAxTestControl class:class ATL_NO_VTABLE...
Please Sign up or sign in to vote.
8 Dec 2009
«_Superman_»
Call GetLastError for the error code.
Please Sign up or sign in to vote.
8 Dec 2009
samitriani
I've done that followed by FormatMessage and the message is "Invalid handle".Now I've resolved the problem. I had a RichEdit in my DialogBox, the fact that I remove it makes the Create work !!! I still don't understand why the hell it doesn't work !
Please Sign up or sign in to vote.
20 Dec 2009
manoharmind
2 alternatives  
Hi All,It is possible to create custom Search Criteria and implement on Explorer 'Search Companion' when user select that Search Criteria it will search data and shows it as Normal procedure.I read some articles ex. complete idiot's guide' and some more andI feel its possible.I hope...
Please Sign up or sign in to vote.
21 Dec 2009
Nemanja Trifunovic
I think you are looking for Extending the Windows Search Index[^]. There is a relatively good sample code for that in the Windows SDK. Oh, and a piece of advice: if there is a possibility of *not* supporting Windows XP, do that by all means; it will save you lots of headaches.
Please Sign up or sign in to vote.
23 Dec 2009
crezgd
1 alternative  
Hello !I am using VC6/ATL to develop a word2003 addd-in.I am facing the following problem.I can't understand the difference between ApplicationEvents and IApplicationEvents.Who could help me? By the way, both ApplicationEvents and IApplicationEvents are dual interface,they are generated...
Please Sign up or sign in to vote.
24 Dec 2009
manoharmind
Thanks Nemanja TrifunovicBut i want in Explorer my OS is XP.You gave me link which is working for Windows 7 only.I need Shell Extension code.Pl pl Help me out.
Please Sign up or sign in to vote.
27 Dec 2009
Athar Raza Faridi
please refer to this MSDN page: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.word(office.11).aspx. In these pages, it indicates that this interface supports the .NET Framework infrastructure and is not intended to be used directly from your code.
Please Sign up or sign in to vote.
8 Jan 2010
amihar1727
1 alternative  
how to implement event sink to enable the developed application to listen to event made by this three browsers: Internet explorer, mozilla firefox and google chrome? the application is a stand-alone application running in a network..thanks!^^>>sample events: simple events like when...
Please Sign up or sign in to vote.
8 Jan 2010
Christian Graus
One would assume that the three browers would impliment exposing of events differently, assuming they do it at all. What events do you want to listen to, and have you done research to ensure they are exposed by these browsers ?
Please Sign up or sign in to vote.
21 Jan 2010
«_Superman_»
Go through the following links -http://everything2.com/title/Seemingly+useless+parenthesis+in+%2523define+macros[^]http://docs.freebsd.org/info/cpp/cpp.info.Macro_Parentheses.html[^]http://www.cprogramming.com/tutorial/cpreprocessor.html[^]
Please Sign up or sign in to vote.
2 Feb 2010
amihar1727
1 alternative  
can anyone help me on how to connect to google chrome. i would like to build a standalone c++ application(probably a dll) that would list events done by the browser.Probably like the BHO implementation of IE.can anyone give the first thing or steps to do about it?!thanks alot:) help much...
Please Sign up or sign in to vote.
13 Feb 2010
peterchen
You are still using MFC, but don't link to it.The easiest way I found is to recreate the Project as ATL project, tick "MFC support" in the wizard and re-add / merge the files.btw. it would be more reader-friendly if you wouldn't just dump the linker output but listed what you...
Please Sign up or sign in to vote.
16 Feb 2010
Adeel Mirza
Hi Allen,I am using an existing MS Office Addin developed in ATL COM.I want to provide this kind of print and print preview functionality to it. Now MFC Extension DLL can't be used in an ATL COM Application, so is it possible to create an MFC Regular DLL and then call it from my ATL COM...
Please Sign up or sign in to vote.
18 Feb 2010
Adeel Mirza
This project already has 100s of files, resources. Creating a new ATL Project and adding all these files is not gonna be fun. These erroes comes if my active build is Debug mode, In Release mode I just receive 2 errors1>uafxcw.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined...
Please Sign up or sign in to vote.
22 Feb 2010
bltfr
2 alternatives  
hi,i have an ATL dll project and two classes (classA,classB) in it. ClassA takes the classB as parameter. In ATL is it possible and how?
Please Sign up or sign in to vote.
23 Feb 2010
bltfr
Thank you for your answer Eugen
Please Sign up or sign in to vote.
24 Feb 2010
chandrakar ashish
1 alternative  
i have beginners on ATL programming.i created a example program TipServer as per suggested in Inside ATL book. but while running my program its give runtime erroractually its not finding interface provided by component.my clint program is also in VC++ and i am properlly registered my...
Please Sign up or sign in to vote.
23 Feb 2010
Richard MacCutchan
ahmed34 wrote:i m student of electronics enggThen you probably have the answer to this question; if it is a question.
Please Sign up or sign in to vote.
3 Mar 2010
bltfr
20 alternatives  
hi,i have a native C++ dll and a virtual class("mycert") in it.I have an ATL dll project and i included the native dll into the ATL and create an interface for the 'mycert' .In mycert interface i have a function :STDMETHODIMP Cmycert::setSignature(BYTE* data, SHORT size){ cert...
Please Sign up or sign in to vote.
25 Feb 2010
Eugen Podsypalnikov
Can you call your functionif it returns S_OK only ? :)
Please Sign up or sign in to vote.
25 Feb 2010
bltfr
yes i can call it. I am calling the functions of the other interfaces but only this interface doesn't work.
Please Sign up or sign in to vote.
25 Feb 2010
Eugen Podsypalnikov
OK, it is not just a bit :) Could you explainwhy do you need a new mycert()or what would you like to have in your function ? :)
Please Sign up or sign in to vote.
25 Feb 2010
bltfr
mycert is the class in my native c++ dll so i should create an instance of it to use the functions of it . I don't create the instance of the mycertclass in the ATL with "new mycert()" code. ByteArray and ASN1BitString classes are also in the native dll and i can do operations with them, there...
Please Sign up or sign in to vote.
25 Feb 2010
Eugen Podsypalnikov
Could you post the definition of the mycert class ? :)
Please Sign up or sign in to vote.
25 Feb 2010
bltfr
#ifdef dll_EXPORTS#define dll_API __declspec(dllexport)#else#define dll_API __declspec(dllimport)#endifclass dll_API mycert : public Sequence{ public: mycert(void); mycert(string name); ~mycert(); void setTCert(TCert* tCertVal); ...
Please Sign up or sign in to vote.
25 Feb 2010
Eugen Podsypalnikov
It does not look to be a virtual class... :) Is there an errorwhen you reduce the interface function to ? :{ mycert cert; return S_OK;}If you will get no error -please read the documentation of mycert::setSignature(..)(may be there is a limitation by the data length or...
Please Sign up or sign in to vote.
25 Feb 2010
bltfr
I got no error with that code.I change the code :STDMETHODIMP Cmycert::setSignature(BYTE* data, SHORT size){ cert = new mycert(); ByteArray barray; for(int i=0;i
Please Sign up or sign in to vote.
25 Feb 2010
Eugen Podsypalnikov
You could also place an AfxMessageBox(_T("#"));after each line in this function to determinate the error source approximately :)
Please Sign up or sign in to vote.
25 Feb 2010
bltfr
I put the line AfxMessageBox(_T("#")) ,it gives the following error:"fatal error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d] c:\Program Files\Microsoft Visual Studio...
Please Sign up or sign in to vote.
25 Feb 2010
Eugen Podsypalnikov
:) ...then MessageBox(NULL, _T("Line #"), _T("We are inside :)"), MB_OK);
Please Sign up or sign in to vote.
25 Feb 2010
bltfr
It worked. Thanks Eugen! There is a problem inside the for loop, but i can't understand ,same loop works correctly in other functions.
Please Sign up or sign in to vote.
25 Feb 2010
Eugen Podsypalnikov
OK :) Please try this body:{ BYTE byTest = data[1]; return S_OK;}
Please Sign up or sign in to vote.
25 Feb 2010
bltfr
it is working, what should i do?
Please Sign up or sign in to vote.
25 Feb 2010
Eugen Podsypalnikov
May be you should use ByteArray::Add(..) and not [..] ? :)
Please Sign up or sign in to vote.
25 Feb 2010
bltfr
there is no Add function, there is an init function but it is protected.
Please Sign up or sign in to vote.
25 Feb 2010
Eugen Podsypalnikov
Could you post the definition of the class ? :)
Please Sign up or sign in to vote.
25 Feb 2010
bltfr
class dll_API ByteArray{ public: ByteArray(int sz = 0); ByteArray(const ByteArray&); ~ByteArray(); ByteArray& operator=(const ByteArray&); unsigned char& operator[](int) throw (RangeException); string getHexString(bool); string...
Please Sign up or sign in to vote.
25 Feb 2010
Eugen Podsypalnikov
OK :) Try to construct your instance as following:{... ByteArray arTemp(size); // pass the second parameter here :) // The loop...}
Please Sign up or sign in to vote.
25 Feb 2010
bltfr
;) it works, Eugen you are perfect. i am very thankful to you