|
waldermort wrote: enum Keys
{
classesRoot = HKEY_CLASSES_ROOT,
};
If you don't really need an enum type, it might be better to turn those into static const members, which you can init in the header file:
class CFoo
{
public:
static const HKEY classesRoot = HKEY_CLASSES_ROOT;
}; That also has the advantage of preserving the type-safety of classesRoot .
|
|
|
|
|
RE: Problem #2.
Your old code worked because previous versions of the stl implemented iterators as C++ pointers.
In the latest implementation you can no longer assume that iterators and pointers are equivalent.
tiles.erase( ( tiles.begin() + p2 ) ) shoule work fine assuming that p2 is the index of the element you want to remove.
|
|
|
|
|
I wish to display a help file (*.chm) in a VC++ 6.0 MFC Application .
I've created the CHM file using a software and I just want to display the chm file when the Help button is clicked.
It's better if u can give a sample code.
Your help is highly appreciated.
Thanks in Advance
TDK
ENTC
UoM
|
|
|
|
|
|
Dhananjayak02 wrote: ve created the CHM file using a software and I just want to display the chm file when the Help button is clicked.
associate the help chm with the help id!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief And you
|
|
|
|
|
When a release build dies with "the instruction at location xyz..." how do I find out the where in the source that was? If I choose to see the stack dump, can that tell me (assuming no stack corruption) what my calling path is?
I assume you need some kind of separate debug info file (with address to function lookups or something) generated at build time.. but I'm not sure what debug info I need to generate, and then how I would tie up the stack and instrucion addresses to functions?
Thnx in advance.
|
|
|
|
|
you need a "Map" file. it'll give you the addresses of all the funcitons in your EXE.
there's a checkbox, somewhere in the linker options, to turn this on.
|
|
|
|
|
|
See if this article helps.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thanks for the help guys. Much appreciated!
|
|
|
|
|
Does VC6 support the __FUNCTION__ macro? If so, where is it defined? If it doesn't exist, can anybody recomend a similar method of getting the function name?
|
|
|
|
|
Wouldn't "__LINE__ of __FILE__ " suffice?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Normally yes, but in this instance I really need to get a hold of the function name.
|
|
|
|
|
No, that was added in VC7 (or maybe 7.1, I forget). There's no simple way to do it in 6.
|
|
|
|
|
please check my thread on the c# forum, any idea ?
(thread: "Bizzare question")
http://www.codeproject.com/script/comments/forums.asp?forumid=1649&select=1697316&df=100#xx1697316xx
thanks,
Liron
|
|
|
|
|
Liron Hirsch wrote: please check my thread on the c# forum, any idea ?
Why, are you wanting a VC++ answer?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
it might help me too, a guy in the C# forum replied and said I might find the answer in c++
|
|
|
|
|
If you have a question C++ you can ask on this forum not shift to another forum
|
|
|
|
|
Your response would be valid had he asked here first and then asked in a separate forum. In reality, he first asked in the C# forum and was then redirected here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Liron Hirsch wrote: please check my thread on the c# forum, any idea ?
(thread: "Bizzare question")
http://www.codeproject.com/script/comments/forums.asp?forumid=1649&select=1697316&df=100#xx1697316xx
really it's impossible mission for VC++ guys...
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief And you
|
|
|
|
|
hi
how to validate a given directory path ( in a remote machine whether the path is valid or not) in vc++?
and also how to execute a dos command in MFC?
|
|
|
|
|
Gokul_md wrote: how to validate a given directory path ( is valid or not) in vc++?
How about PathIsDirectory() ?
Gokul_md wrote: how to execute a dos command in MFC?
Like you would anything else, use CreateProcess() or ShellExecute() . However, some DOS commands have an equivalent API (e.g., dir, copy).
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi
This is only working for local directories. Not for remote shared path validation. how to check the remote machine shared directory path is valid or not?
|
|
|
|
|
Is PathIsUNC() any better?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Gokul_md wrote: This is only working for local directories. Not for remote shared path validation. how to check the remote machine shared directory path is valid or not?
PathFileExist
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief And you
|
|
|
|