Article View: comp.os.ms-windows.programmer.tools.mfc
Article #114Re: how to convert COleVariant into int ?
From: Timo Hartmann
Date: Mon, 15 Jan 2001 16:21
Date: Mon, 15 Jan 2001 16:21
45 lines
2455 bytes
2455 bytes
hi fred,
take a look at the tagVARIANT struct and check the VARTYPE vt first:
here is the code for an integer (for other values check the struct!!)
int f(COleVariant v)
{
if (v.vt == VT_INT) return v.intVal;
else return 0;
}
hope this helps
Timo
"Fr�d�ric VIALLET" wrote:
>
> hi,
>
> thanks for your help.
> How to do the same but into an INT (or other) ?
> Where can i find a list of convertion functions like B_STRT ?
>
> Thanks !
>
> Fred
>
> "Jeff Partch" <airborne@airmail.net> a �crit dans le message news:
> usq92uufAHA.1308@tkmsftngp05...
> > Hi!
> >
> > Here's one way: Use the V_BSTRT macro declared in afxdisp.h...
> >
> > CString str = V_BSTRT(&var);
> >
> > HTH,
> >
> > Jeff...
> > --
> > Please post all follow-ups to the newsgroup only.
> >
> >
> >
Technical Details
Message-ID:
<3A632385.BA6C5210@stud.tu-muenchen.de>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!falcon.america.net!sunqbc.risq.qc.ca!newsfeeds.belnet.be!news.belnet.be!uni-erlangen.de!lrz.de!not-for-mailReferences:
<93um25$rfp$1@s1.read.news.oleane.net> <usq92uufAHA.1308@tkmsftngp05> <93v420$5lm$1@s1.read.news.oleane.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 1138df,ff3e18dc4524ede7 X-Google-Attributes: gid1138df,public X-Google-Thread: f7a51,ff3e18dc4524ede7 X-Google-Attributes: gidf7a51,public X-Google-Thread: 104d65,ff3e18dc4524ede7 X-Google-Attributes: gid104d65,public X-Google-Thread: fdcad,ff3e18dc4524ede7 X-Google-Attributes: gidfdcad,public X-Google-Thread: 104971,ff3e18dc4524ede7 X-Google-Attributes: gid104971,public X-Google-ArrivalTime: 2001-01-15 08:15:40 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!falcon.america.net!sunqbc.risq.qc.ca!newsfeeds.belnet.be!news.belnet.be!uni-erlangen.de!lrz.de!not-for-mail From: Timo Hartmann <timo.hartmann@stud.tu-muenchen.de> Newsgroups: comp.os.ms-windows.programmer.tools.mfc,fr.comp.lang.c++,microsoft.public.vc.language,microsoft.public.vc.mfc,microsoft.public.vc.mfc.docview Subject: Re: how to convert COleVariant into int ? Date: Mon, 15 Jan 2001 17:21:25 +0100 Organization: [posted via] Leibniz-Rechenzentrum, Muenchen (Germany) Lines: 45 Message-ID: <3A632385.BA6C5210@stud.tu-muenchen.de> References: <93um25$rfp$1@s1.read.news.oleane.net> <usq92uufAHA.1308@tkmsftngp05> <93v420$5lm$1@s1.read.news.oleane.net> NNTP-Posting-Host: celsius400.inf.bauwesen.tu-muenchen.de Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: wsc10.lrz-muenchen.de 979575225 15202 129.187.126.189 (15 Jan 2001 16:13:45 GMT) X-Complaints-To: news@lrz-muenchen.de NNTP-Posting-Date: 15 Jan 2001 16:13:45 GMT X-Mailer: Mozilla 4.74 [en] (WinNT; U) X-Accept-Language: en