RE: ATL::CString doesn't have conversion operator for LPTSTR...

"Anna-Jayne Metcalfe" <[email protected]> Thu, 9 Jun 2011 23:52:30 +0100
Newsgroups gmane.comp.windows.wtl
Message-ID <!&!AAAAAAAAAAAYAAAAAAAAAL2iBC0xSJNOku7A7WfPBB1CgQAAEAAAAPrxWS6VE8pNlVCiITuSkpMBAAAAAA==@annasplace.me.uk>
Hi Richard,

> While playing around with DDX and WTL, I got a compilation error for the 
DDX_TEXT macro saying "cannot convert parameter 2 from 'ATL::CString' to 
'LPTSTR'".

> I would prefer to keep using ATL's CString, and modifying atlstr.h to 
add a LPTSTR conversion operator is obviously not ideal, so any ideas on 
how best to handle this ?

I've not seen this with DDX.

Without digging through the code I can't be sure, but surely with LPTSTR
being a non-const type adding a conversion operator would be dangerous at
best.

operator LPCTSTR() is of course a different beast entirely. That's
definitely there - I use it all the time.

Or am I missing something? (possible - it's nearly midnight and I'm about to
crash).


Kind Regards,

                Anna-Jayne Metcalfe
                Product Manager,
                Riverblade Limited

                http://www.riverblade.co.uk


Riverblade Limited, 3 Wellington Road, Bournemouth, Dorset BH8 8JQ, United
Kingdom
Registered in England no. 5187132. VAT Registration no. 847 0045 38
Please direct general enquiries to enquiries-Ql1sqIwY9iDiUBgd2R2O9eG/[email protected]

ACCU 2012 - http://www.accu.org/conference - 24-28th April 2012, Oxford UK.



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/wtl/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/wtl/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/