|
Hi ,
Actually i created Add-in for adding signature to all the .cpp and .h files.
but the problem with that was , if u r having any third party class in workspace.
There also it is adding my signature .
but it should not , so i thought of creating tool which will add my signature while creating new classes thru Project->Add Class menu.
Anyway ,i will try to read the documentation.
if you found anyother way ,let me know.
Thanks,
Karthi
|
|
|
|
|
Hi all,
I am trying to convert my vc6 code to vc2005.
In my vc code i have used api like:-
FindResource
LoadResource
LockResource
so i wanted to know that in vc2005 we have some aletrnate api for these api or we use same....
Thanks in advance....
|
|
|
|
|
|
Also, those are Windows APIs - they have nothing to do with the
programming language version you are using.
Those APIs haven't changed in way over a decade (possibly since the beginning of
Windows' existence).
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi all,
i m new in vc++2005.
i load a bitmap or icon on button.
i want when mouse indicate on purticular button then name of button show.
like on webpage when we indicate on stop button then it shows STOP on mouse tail in yellow box,or same in case of refresh..etc.
i dont know how can do it.
please help me for this.
Thanks in advance.
|
|
|
|
|
|
thanks
i chekout this but there is an error "'static_cast' : cannot convert from 'void (__thiscall CToolTipRessourceButton::* )(WPARAM,LPARAM)' to 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'"
please help me.
|
|
|
|
|
Hi,
When the error is happening?
You tried which? Please provide more info.
As James R. Twine said, try adding TrackMouseEvent() handler for your button and show the Tooltip control inside that function.
If you have problems, please let us know.
Best Regards,
Suman
|
|
|
|
|
3 easy steps:
1: Use the TrackMouseEvent(...) on the controls in question or capture mouse movement messages to see when the mouse is over the control.
2: When the time is right, use the ToolTip control to cause an immediate tooltip to appear.
3: When the mouse moves off of the control, pop the tooltip.
1 easier step:
1: Use the tooltip control - it was designed for this kind of thing. Check the docs for the tooltip control.
Peace!
-=- James Please rate this message - let me know if I helped or not!<hr></hr> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
|
hi
How to typecast BSTR to CString?
give me example
*****THANKS N ADVANCE****
Mathen.K
(I WILL TRY MY LEVEL BEST )
|
|
|
|
|
You cannot typecast it - but you may have to convert it.
If you are in a Unicode build, both the BSTR and the CString are of the same character type, so you can just assign the BSTR to the CString (or use to construct one).
If not, you need to use a conversion function or macro: W2T(...) , MultibyteToWideChar(...) , etc. Although CString may have a conversion constructor...?
Peace!
-=- James Please rate this message - let me know if I helped or not!<hr></hr> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
|
I created the .ini file manually in C:\ drive and added following
[Section]
a=1
b=2
CWinApp *pApp = AfxGetApp();<br />
free((void*)pApp->m_pszProfileName);<br />
pApp->m_pszProfileName = _tcsdup("C:\\myfile.ini");<br />
<br />
pApp->GetProfileInt("Section", "a", 0);
But GetProfileInt() returns 0 instead of 1.
I went through the registry. There was NO entry of ini section and entry, since i have created ini file manually.
Whether GetProfileInt reads only registry or both registry and ini file?
|
|
|
|
|
You should use GetPrivateProfileInt [^].
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. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
|
Where could i find CxImage class... I am working on a sample of BMP to DCM... This sample provided by CodeProject uses a class CxImage.. So the project could not get compiled with Visual C++... How to compile it?
|
|
|
|
|
Hi,
Is this[^] are you looking for ?
Regards,
Paresh.
|
|
|
|
|
If you want to work with image files you ca use of CImage class.
|
|
|
|
|
In my appication i need to connect to windows machine remotely to perform some opetrations . In the case i need to first authenticate the user with the windows machine username/password (The machine need to remotely connected) . How to achieve this ???
vineesh
|
|
|
|
|
Have you looked into functions like LogonUser() and ImpersonateLoggedOnUser() ?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hello everyone,
In COM STA model, a hidden Window will be created with synchronized message pump operation. I have seen and debugged a couple of samples. My quesitons are,
1. Who (which party) is responsible for generating code to create the hidden Window and generate message pump (retrieve message one-by-one from message queue so that all processing to the component is synchronized)? Generated by COM Runtime (I suspect it generated by COM Runtime, because I have seen no code in the samples I studied to explicitly create the hidden Window)?
2. If it is created by the COM Runtime? When such code is generated? During call to CoInitializeEx and when specifiying parameter value for dwCoInit (COINIT_APARTMENTTHREADED or COINIT_MULTITHREADED)?
3. Where is the generated binary code? Injected by linker in the result COM DLL or EXE?
thanks in advance,
George
|
|
|
|
|
I believe that the COM subsystem (meaning Windows proper) is responsible for creation of this Window and the message pump, but the pump only runs (i.e. is triggered) when you make a COM call<sup>1</sup> ). I am not certain if your application runs the pump, or if the COM subsystem does, but I bet that the COM subsystem does.
I believe it is created at initialization. You may be able to confirm this by using Spy++ and enumerating all windows.
I do not believe that any injection takes place, this code is part of the COM subsystem (DLLs?).
I may be wrong - I do not have my copy of Essential COM with me here...
<sup>1</sup> Which explains why STA COM reentrancy only happens when you call into the COM subsystem - you do not get interrupted while in the middle of something else.
Peace!
-=- James Please rate this message - let me know if I helped or not!<hr></hr> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Thanks James,
1.
I have seen a couple of samples of STA model. No explicit code for pumping message to somewhere. Just jobs like, like CoCreateInstance, QueryInterface, and method call by the interface public method.
So, I think the function call through public method of interface (retrieved from QueryInterface) is translated into message pump. Is that correct?
2.
How does message pump work? Like enqueue a message into a double ended queue, one end is the function call, the other end is the component itself?
regards,
George
|
|
|
|
|
Yes, any call into the interface (method, property, etc.) are translated into a message and placed onto the queue (if the call crosses apartment - is crossing application boundaries). Not sure if connection points work the same way (and I rarely used them because of undesirable side-effects). When the message pump runs, the message is dispatched to the COM message handler which takes over handing of the call.
The message pump is a standard windows message queue (which is why the hidden window is required).
One correction for my above post: The message pump is run by the thread that created/owns the COM object - I remember this because I had worker threads using COM in STA that needed to run a PeekMessage /GetMessage loop for things to work. This also means that while COM creates the hidden window, it is owned by the calling thread because threads have to pump messages for their own windows.
Peace!
-=- James Please rate this message - let me know if I helped or not!<hr></hr> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|