• Welcome to PlanetSquires Forums.
 

AfxStrParseCount

Started by Petrus Vorster, June 16, 2023, 04:02:12 PM

Previous topic - Next topic

Petrus Vorster

Hi All

I want to put all available printers into a combobox.
I can easily get the list of printers using José's Cprint class, but unlike Powerbasic the list is not comma delimited, but a carriage return.

How would I do a AfxStrParseCount on that string?
Or are there other means to populate the combobox other than a little loop extracting the delimited CWSTR?

Regards,

Peter
-Regards
Peter

Petrus Vorster

O, nevermind.
Chr$(13) as delimiter seem to work just fine.

-Peter
-Regards
Peter

José Roca

They are separated by a carriage return and a line feed. Therefore, the correct use is to pass CHR(13, 10). CHR, not CHR$ (this is not PowerBasic).

Petrus Vorster

Thank you José.

Correction made!

-Peter
-Regards
Peter