]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/utils.h
Compilation fixes for old SDKs (VC6) after recent commit.
[wxWidgets.git] / include / wx / utils.h
index 18fb41564046e254b4ab0df9b53bdeb30f899fcb..32bed656c30d6c3e25f1d22ca964b21ce05b4f88 100644 (file)
@@ -252,6 +252,25 @@ WXDLLIMPEXP_BASE long wxNewId();
 // Convert 2-digit hex number to decimal
 WXDLLIMPEXP_BASE int wxHexToDec(const wxString& buf);
 
+// Convert 2-digit hex number to decimal
+inline int wxHexToDec(const char* buf)
+{
+    int firstDigit, secondDigit;
+
+    if (buf[0] >= 'A')
+        firstDigit = buf[0] - 'A' + 10;
+    else
+        firstDigit = buf[0] - '0';
+
+    if (buf[1] >= 'A')
+        secondDigit = buf[1] - 'A' + 10;
+    else
+        secondDigit = buf[1] - '0';
+
+    return (firstDigit & 0xF) * 16 + (secondDigit & 0xF );
+}
+
+
 // Convert decimal integer to 2-character hex string
 WXDLLIMPEXP_BASE void wxDecToHex(int dec, wxChar *buf);
 WXDLLIMPEXP_BASE void wxDecToHex(int dec, char* ch1, char* ch2);
@@ -737,7 +756,8 @@ WXDLLIMPEXP_CORE bool wxYieldIfNeeded();
     wxLoadUserResource(const void **outData,
                        size_t *outLen,
                        const wxString& resourceName,
-                       const wxString& resourceType = wxUserResourceStr);
+                       const wxString& resourceType = wxUserResourceStr,
+                       WXHINSTANCE module = 0);
 
     // This function allocates a new buffer and makes a copy of the resource
     // data, remember to delete[] the buffer. And avoid using it entirely if
@@ -747,7 +767,8 @@ WXDLLIMPEXP_CORE bool wxYieldIfNeeded();
     WXDLLIMPEXP_BASE char*
     wxLoadUserResource(const wxString& resourceName,
                        const wxString& resourceType = wxUserResourceStr,
-                       int* pLen = NULL);
+                       int* pLen = NULL,
+                       WXHINSTANCE module = 0);
 #endif // MSW
 
 #endif