New Forum | Previous | Next | (P-PDF) Beginners
Topic: cannot convert from 'const char ' to 'ASText
Conf: (P-PDF) Beginners, Msg: 156976
Date: 12/18/2006 04:52 PM
I'm creating a plug-in using C++ and the acrobat api that prints "uncontrolled copy" on a printed page. My error comes when I try to set srcText & sysFontName of the PDDocWatermarkTextParams -
struct1.srcText = "Uncontrolled Copy";
struct1.sysFontName = "Helvetica-Bold";
I searched through the api reference and forund ASAtomFromString -
struct1.sysFontName = ASAtomFromString("Helvetica-Bold");
the second error goes away but I was wondering if that is the correct way? Also what function do I have to use for the ASText error?
error C2440: '=' : cannot convert from 'const char ' to 'ASText'
error C2440: '=' : cannot convert from 'const char ' to 'ASAtom' This conversion requires a reinterpret_cast, a C-style cast or function-style cast