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
); 2 4287
> 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);
Get rid of the '[out]' fragments - they are only for informational purposes
in documentation (they are relevant in MIDL, but illegal in C++).
So it should look like this:
gfx->MeasureString(labHx, printFont, rectText.Size, new
StringFormat(), &charsPerLine, &linesFilled);
--
pozdrawia qb****@zdnet.pl
Anything was possible last night. That was the trouble
with last nights. They were always followed by this mornings.
- Terry Pratchett, "Small Gods"
Great. That worked. Thanks very much for your quick
reply. -----Original Message----- 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); Get rid of the '[out]' fragments - they are only for
informational purposesin documentation (they are relevant in MIDL, but illegal
in C++).So it should look like this: gfx->MeasureString(labHx, printFont, rectText.Size, new StringFormat(), &charsPerLine, &linesFilled);
-- pozdrawia qb****@zdnet.pl Anything was possible last night. That was the trouble with last nights. They were always followed by this
mornings. - Terry Pratchett, "Small
Gods" . This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Birgit Rahm |
last post by:
Hallo Newsgroup,
I have the following problem:
I work with Python 2.2 and invoke functions via CORBA ( I use
onmiORB/omniORBpy) on a server.
The server provides me a function, where the 3...
|
by: flycast |
last post by:
I am trying to retrieve the Parameters first or second (0, 1 ,2) node from
the following XML file:
<?xml version="1.0" encoding="utf-8" ?>
<Robot xmlns="http://tempuri.org/RobotDefaults.xsd">...
|
by: Jerry Houston |
last post by:
In a winform application, I use worker threads to perform asynchronous tasks
(e.g., mail merge with Word). The thread procs need to gather some user
options from controls in the UI, and I know...
|
by: Dave Veeneman |
last post by:
Can I pass a method pass one of its out parameters to another method? C# is
telling me I can't.
Let's say I have two methods, FooManager and FooWorker. FooManager is part
of a class that acts as...
|
by: C# Learner |
last post by:
Note
----
Please use a fixed-width font to view this, such as Courier New.
Problem
|
by: Michi Henning |
last post by:
Hi,
I'm generating both VB and C# code from language-independent interface
definitions, which is why I'm raising this issue. (The problem apppears
to be somewhat esoteric, but it is real in my...
|
by: stic |
last post by:
Hi,
I'm in a middle of writing something like 'exception handler wraper'
for a set of different methodes.
The case is that I have ca. 40 methods form web servicem, with
different return values...
|
by: Todd Perkins |
last post by:
Hello all, surprisingly enough, this is my first newsgroup post, I usually
rely on google. So I hope I have enough info contained. Thank you in
advance for any help!
Problem:
I am getting...
|
by: Extremest |
last post by:
Here is the code I have so far. It connects to a db and grabs headers.
It then sorts them into groups and then puts all the complete ones
into another table. Problem I am having is that for some...
|
by: =?Utf-8?B?ZGF2aWQ=?= |
last post by:
I have the following function for a web services method (6 parameters where 5
of them need to pass out values):
public void GetPatientPara(out string patientID, out string LastName, out
string...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |