|
try to open the exe in dependency viewer and note all the dlls used by that exe. On another pc all these dlls need to be present..
dependency viewer is available in vc++ 6 tools
|
|
|
|
|
Yes. Its placed inside the tools folder, it's the first time I encountered this application. Thank you for the help and time!
|
|
|
|
|
Llasus wrote: Please help me with this, I just need to create the .exe file for another PC without VS.
Microsoft has some information with links here[^]
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
Thank you for the article. I'm still new with VC++ and this is very helpful. Thank you for the help!
|
|
|
|
|
Hi
STL string class "substr" method allocates on the heap? I was watching memory window that seems to be true - that the returned string has an entirely different address (relative to input string)
<br />
string str("Hello");<br />
...<br />
str.substr(lastPos, pos - lastPos)<br />
Thanks!
|
|
|
|
|
From MSDN substr() page ...
Return Value
A substring object that is a copy of elements of the string operand beginning at the position specified by the first argument.
It IS a copy. Different implementations of the STL handle allocating memory for strings differntly but there is a good chance its allocating memory on the heap.
With most versions of Visual Studio you get the full source code for the STL so you could easily answer this yourself with some investigation
|
|
|
|
|
Does anyone know what API I can use to determine the CPU time used by a process? This is not the same as elapsed time!
Yours Truly, The One and Only!
|
|
|
|
|
Alright it seem the GetProcessTimes API does what I was looking for
Yours Truly, The One and Only!
|
|
|
|
|
You can also use PDH library for this.
AJay
|
|
|
|
|
Great! Thanks Ajay, I will keep this in mind for future uses.
Yours Truly, The One and Only!
|
|
|
|
|
Hi,
I'm using a C++(native) in VS2005. And when I manually add some member variables or methods the intellisence can't handle this and when I'm trying to build the application(MFC executable) it crushes the VS2005 IDE.
After that I've to manually delete the intellisence database file (*.ncb) and open solution for compilation again.
The question is:
- Is there any way (some hot key or IDE macro) to enforce manually intellisence update from the VS2005 IDE?
This would solve my problem.
Thanks,
Oleg.
|
|
|
|
|
Hey Friends
I rememeber we had a way by which we can monitor changes in a folder.
I even implemented it long time back.
i do not remember anything about it now
Any idea of the api / way ?
Regards
|
|
|
|
|
Check out FindFirstChangeNotification() and ReadDirectoryChangesW()
|
|
|
|
|
Brilliant
Thanks
|
|
|
|
|
vikrant kpr wrote: I rememeber we had a way by which we can monitor changes in a folder.
ReadDirectoryChangeW[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
|
Hello,
I have to find how change the menu background color (menubar and menuitems), but nothing yet.
On true, I want to change my dialog based app background color (I am using SetDialogBkColor() method), but the menu (I have a menu in the dialog too) continue with the default system background color.
So, I only want to change the menu background color (same color of my dialog background).
Could anybody help me?
Thanks,
Cris.
|
|
|
|
|
Cris wrote: SetDialogBkColor
... is obsolete. Handling WM_CTLCOLOR is a better choice into the future.
For the menus, maybe take a look at deriving a class from CMenu and making the menu owner drawn.
See here[^] for lots of examples.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
Hi,
I need to convert TCHAR to char*.
TCHAR buff[512]={NULL};
char tempBuff[512]={NULL};
CString strTemp;
_stprintf(buff, _T("Hello World"));
strTemp = buff;
buff = strTemp.GetBuffer(strTemp.GetLength());
but buff seems to be null.
I'm unable to convert from TCHAR to char*. Using VC++6.0/MFC. UNICODE VERSION.
Thanks in Advance.
Rajesh
|
|
|
|
|
Rajesh_Parameswaran wrote: buff = strTemp.GetBuffer(strTemp.GetLength());
You can't convert a TCHAR* to a TCHAR[512] so that assignment won't work.
What are you trying to do? Do you need to convert the contents of the
TCHAR array to an array of char or just cast the pointer to the array to a different type?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I didn't notice your tempBuff variable, so I assume you want something like this:
TCHAR buff[512]={NULL};
char tempBuff[512]={NULL};
_stprintf(buff, _T("Hello World"));
strcpy(tempBuff, CT2CA(buff)); Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Use an ATL conversion macro:
CString s = _T("Hello world!");
const char* p = T2CA(LPCTSTR(s)); More here[^] and here[^]
|
|
|
|
|
Mike,
That doesn't work on VS 2005 which is why I coded my example like I did (besides
trying to fit the OP's code).
How does one force the macros to work old-style like you've shown?
Thanks,
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
What about it doesn't work in VC8? Does CT2CA work instead?
|
|
|
|