J
jgctr4
I'm trying to use the Graphics::MeasureString method,
which gives two out parameters. Apparently these out
parameters are an invention of C#, but the docs still
show a syntax for C++ (below). However, when I try to
compile, I get "error C2059: syntax error: '['".
Can someone enlighten me on using the out parameter in
C++ .net 2003 (such as an example)? I couldn't find any
more info on this. The MIDL also says the same syntax.
My code:
gfx->MeasureString(labHx, printFont, rectText.Size, new
StringFormat(), [out] int * charsPerLine, [out] int *
linesFilled);
Documentation:
public: SizeF MeasureString(
String* text,
Font* font,
SizeF layoutArea,
StringFormat* stringFormat,
[
Out
] int* charactersFitted,
[
Out
] int* linesFilled
);
which gives two out parameters. Apparently these out
parameters are an invention of C#, but the docs still
show a syntax for C++ (below). However, when I try to
compile, I get "error C2059: syntax error: '['".
Can someone enlighten me on using the out parameter in
C++ .net 2003 (such as an example)? I couldn't find any
more info on this. The MIDL also says the same syntax.
My code:
gfx->MeasureString(labHx, printFont, rectText.Size, new
StringFormat(), [out] int * charsPerLine, [out] int *
linesFilled);
Documentation:
public: SizeF MeasureString(
String* text,
Font* font,
SizeF layoutArea,
StringFormat* stringFormat,
[
Out
] int* charactersFitted,
[
Out
] int* linesFilled
);