ShellExecute(0, "open", TEXT("MMPC.html"), 0, 0, SW_SHOWNORMAL)
The TEXT macro either does nothing to the string literal, or prepends L to make it a wide string literal. The errors suggest, that in your setup, a wide string literal is expected. Now, you could just explicitly make the literal wide:
ShellExecute(0, "open", L"MMPC.html", 0, 0, SW_SHOWNORMAL)
But then it would fail for a setup where a narrow string literal is expected.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
It sounds like a configuration issue with Visual Studio 2005. Play around with any settings that suggest wchar_t or Unicode.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
First off, your response has nothing to do with the OP's problem.
Secondly, don't resurrect two year old threads unless you have something amazingly earthshaking to contribute.
Duoas
Postaholic
2,043 posts since Oct 2007
Reputation Points: 1,140
Solved Threads: 229
I'm sorry you took my response that way, but you are the one being arrogantly rude.
Since you are new to the forum you might want to take some time to read the Forum Announcements .
Those of us who like to take the time to help people here don't like it when some newbie shows up and in his second post starts doing things universally considered obnoxious. Please take the kind hint.
Had Narue or WaltP or Salem or someone else like them (who are all very knowledgeable and very helpful) responded, you might have gotten a much less friendly response --as they have dealt with a lot more snot than I have, and have a much lower tolerance for it.
If you plan to behave and be nice, welcome. Remember, words online are easily misinterpreted whereas in direct conversation they wouldn't be. Don't assume the worst.
Also, don't assume the OP and Narue are blindingly stupid. They were both well beyond including and linking errors. The question was answered.
I give you this by way of welcome and advice. Take it as you will.
Duoas
Postaholic
2,043 posts since Oct 2007
Reputation Points: 1,140
Solved Threads: 229
I've had my bad moments too. I'm fairly new myself, and on my second or third post I managed to offend several people who disagreed with me about something...
Alas.
:-/ :)
Duoas
Postaholic
2,043 posts since Oct 2007
Reputation Points: 1,140
Solved Threads: 229