line 6 does nothing -- delete it.
>>problem is that CButton needs to be a const char
No, it needs to be const wchar_t* because you are calling the UNICODE version of ShellExecute. You will have to convert c_str() to wchar_t* which requires another function to make that conversion.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
in that case just change line 9 to pass CButton.c_str() and it will compile ok.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343