Click here to Skip to main content
15,913,773 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralSetting a Custom Background for the Main Menu Bar Pin
Steve Thresher23-Jun-04 9:13
Steve Thresher23-Jun-04 9:13 
GeneralWant help in learning Unicode Usage Pin
Member 119592223-Jun-04 8:53
Member 119592223-Jun-04 8:53 
GeneralString formatting question Pin
Nick Parker23-Jun-04 8:49
protectorNick Parker23-Jun-04 8:49 
GeneralRe: String formatting question Pin
palbano23-Jun-04 8:59
palbano23-Jun-04 8:59 
GeneralRe: String formatting question Pin
Nick Parker23-Jun-04 9:17
protectorNick Parker23-Jun-04 9:17 
GeneralRe: String formatting question Pin
PJ Arends23-Jun-04 10:34
professionalPJ Arends23-Jun-04 10:34 
GeneralRe: String formatting question Pin
cmk23-Jun-04 10:28
cmk23-Jun-04 10:28 
GeneralRe: String formatting question Pin
Michael Dunn23-Jun-04 13:57
sitebuilderMichael Dunn23-Jun-04 13:57 
You're misusing the BSTR. wsprintf() prints into a TCHAR array, but a BSTR is not an array.
BSTR path = NULL;
CString s;
int num = 1;
  
  s.Format ( _T("//errors/error[@id='%i']"), num );
  path = s.AllocSysString();
If you can't/don't want to use CString, alloc a TCHAR buffer instead and make sure it's big enough, then use the T2BSTR conversion macro to convert it to a BSTR.

Check out this article[^] if you need more details on converting between string types.

--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ

----
There is a saying in statistics that a million monkeys pounding on typewriters would eventually create a work of Shakespeare. Thanks to the Internet, we now know that this is not true.
QuestionWhat is SetModifiedFlag() In SDI Project Pin
jerry1211a23-Jun-04 8:42
jerry1211a23-Jun-04 8:42 
AnswerRe: What is SetModifiedFlag() In SDI Project Pin
palbano23-Jun-04 9:04
palbano23-Jun-04 9:04 
AnswerRe: What is SetModifiedFlag() In SDI Project Pin
Blake Miller23-Jun-04 9:06
Blake Miller23-Jun-04 9:06 
GeneralProb with Visual Studio Pin
Anonymous23-Jun-04 8:39
Anonymous23-Jun-04 8:39 
GeneralRe: Prob with Visual Studio Pin
PJ Arends23-Jun-04 10:30
professionalPJ Arends23-Jun-04 10:30 
QuestionVCToolkit and DevStudio 6? Pin
yurig23-Jun-04 8:27
yurig23-Jun-04 8:27 
AnswerRe: VCToolkit and DevStudio 6? Pin
Ryan Binns23-Jun-04 18:15
Ryan Binns23-Jun-04 18:15 
GeneralRe: VCToolkit and DevStudio 6? Pin
Yuri Gershanov24-Jun-04 14:22
Yuri Gershanov24-Jun-04 14:22 
GeneralCustom background for application Pin
suiram4023-Jun-04 7:33
suiram4023-Jun-04 7:33 
GeneralRe: Custom background for application Pin
PJ Arends23-Jun-04 10:28
professionalPJ Arends23-Jun-04 10:28 
GeneralProblem during compilation of EchoServer Pin
Member 119565823-Jun-04 6:54
Member 119565823-Jun-04 6:54 
GeneralRe: Problem during compilation of EchoServer Pin
jmkhael23-Jun-04 7:05
jmkhael23-Jun-04 7:05 
GeneralRe: Problem during compilation of EchoServer Pin
Member 119565823-Jun-04 8:09
Member 119565823-Jun-04 8:09 
GeneralCan't create a DLL dialog box object Pin
King Coffee23-Jun-04 6:39
King Coffee23-Jun-04 6:39 
GeneralRe: Can't create a DLL dialog box object Pin
suiram4023-Jun-04 7:58
suiram4023-Jun-04 7:58 
GeneralRe: Can't create a DLL dialog box object Pin
King Coffee23-Jun-04 14:30
King Coffee23-Jun-04 14:30 
GeneralUDP-protcol in C Pin
Member 119572023-Jun-04 6:06
Member 119572023-Jun-04 6:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.