|
Does GetModuleFilename fit your needs?
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
[My articles]
|
|
|
|
|
Also take a look at SHGetFolderPath(). Writing to files in the install directory can be problematic. (access rights and such)
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
OK, I'll take a look: Who knows? someday maybe it will be useful...
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
[My articles]
|
|
|
|
|
Hi All,
I need to get the item,which is double clicked in ListBox.I need sample code.
Thanks & Regards,
Anitha
|
|
|
|
|
Handle the LBN_DBLCLK notification.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
AnithaSubramani wrote: I need sample code.
Documentation [^] isn't enough?
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
[My articles]
|
|
|
|
|
And this Simple Tutorial[^] too, which explains how to handle double click event for listbox.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Hello everyone,
Since one of my .h file is included by multiple cpp files, and I want to track the compile process, so I want to have output during compiling phase each time when a cpp file which includes the .h file is compiled. And I also want to dump the compiled cpp file name.
For example, foo.cpp and goo.cpp includes common.h, when compiling foo.cpp, I want to output "foo.cpp is compiling" and when compiling goo.cpp, I want to output "goo.cpp is compiling".
I think I should use #pragma in common.h, but not an expert about this. Any ideas?
thanks in advance,
George
|
|
|
|
|
You can use like this,
#pragma message ("Compiling HelloWorld.cpp" )
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Thanks Jijo,
Put it in .cpp files or in the .h file?
regards,
George
|
|
|
|
|
What is your guess?
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
[My articles]
|
|
|
|
|
Thanks CPallini,
I think it means adding information to each cpp file. It is not a good solution since it means I need to modify all source files which need to include the header file.
Any better ideas or comments?
regards,
George
|
|
|
|
|
The guess is right: you should put it into the header file.
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
[My articles]
|
|
|
|
|
Put what information? Could you clarify please? There is some context missing here.
regards,
George
|
|
|
|
|
Well, I was wrong (I took literally the documentation [^]
__FILE__
The name of the current source file.
but a little test clearified my misunderstanding ).
Hence, I suppose __FILE__ is of little help. As workaround, you may compile the source file with the /E switch and look at the generated output.
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
[My articles]
|
|
|
|
|
Thanks CPallini,
My confusion is put __FILE__ into header file will output the value of .h file other than .cpp file. This is not I want.
I want to know which cpp file (that includes the .h file) is compiling currect. Any comments or ideas?
regards,
George
|
|
|
|
|
Can be in .h as well as in .cpp. It depends your need.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Thanks Jijo,
I am confused about the discussion context. You mean put what information in .h file which could monitor which cpp file (that includes the .h file) is compiling?
regards,
George
|
|
|
|
|
Possibly
#pragma message("Compiling " __FILE__ )
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
[My articles]
|
|
|
|
|
Indeed. Seems I need a coffee.
And 5 points to gryffindor.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
No, Jijo!
It will display the .h file name other than the .cpp file name if you put the statement into header file. Have you tried?
regards,
George
|
|
|
|
|
No, CPallini!
It will display the .h file name other than the .cpp file name if you put the statement into header file.
regards,
George
|
|
|
|
|
You're right, see my reply above [^].
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
[My articles]
|
|
|
|
|
|
George_George wrote: ...when compiling foo.cpp, I want to output "foo.cpp is compiling" and when compiling goo.cpp, I want to output "goo.cpp is compiling".
Doesn't this information get displayed by the compiler by default?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|