PlanetSquires Forums

Support Forums => WinFBX - Windows Framework for FreeBASIC => Topic started by: Petrus Vorster on June 16, 2023, 04:02:12 PM

Title: AfxStrParseCount
Post by: Petrus Vorster on June 16, 2023, 04:02:12 PM
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
Title: Re: AfxStrParseCount
Post by: Petrus Vorster on June 16, 2023, 04:11:31 PM
O, nevermind.
Chr$(13) as delimiter seem to work just fine.

-Peter
Title: Re: AfxStrParseCount
Post by: José Roca on June 16, 2023, 04:53:32 PM
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).
Title: Re: AfxStrParseCount
Post by: Petrus Vorster on June 17, 2023, 01:15:23 AM
Thank you José.

Correction made!

-Peter