Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » does exist a HtmlToColor?
does exist a HtmlToColor? [message #10307] Sun, 01 July 2007 13:20 Go to next message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
Hello,

with ColorToHtml() I obtain a color string usuful while I create html page.
I would like to know if there is something that works in the opposite direction i.e. from code "FFFFFF" to Color(r,g,b). In fact I've such strings and I need to feed ColorPushers.
Even a HexToInt would be enough if exist, otherwise I'll write it.

Thanks,
Luigi

[Updated on: Sun, 01 July 2007 15:18]

Report message to a moderator

Re: does exist a HtmlToColor? [message #10308 is a reply to message #10307] Sun, 01 July 2007 16:57 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Routines you can use to convert from hex text string:

unsigned      stou(const char *ptr, void *endptr = NULL, unsigned base = 10);
inline unsigned stou(const byte *ptr, void *endptr = NULL, unsigned base = 10) { return stou((const char *)ptr, endptr, base); }
unsigned      stou(const wchar *ptr, void *endptr = NULL, unsigned base = 10);

uint64        stou64(const char *s, void *endptr = NULL, unsigned base = 10);

int           ScanInt(const char *ptr, const char **endptr = NULL, int radix = 10);
int           ScanInt(const wchar *ptr, const wchar **endptr = NULL, int radix = 10);


(Use 16 instead of 10...)
Previous Topic: Problem with FullScreen and PopUp
Next Topic: Howto add dynamic ctrls to topwindow
Goto Forum:
  


Current Time: Sun May 05 14:34:12 CEST 2024

Total time taken to generate the page: 0.02507 seconds