aboutsummaryrefslogtreecommitdiff
path: root/Src/pfc/string.cpp
diff options
context:
space:
mode:
authorJef <jef@targetspot.com>2024-09-24 08:54:57 -0400
committerJef <jef@targetspot.com>2024-09-24 08:54:57 -0400
commit20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch)
tree12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/pfc/string.cpp
parent537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff)
downloadwinamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz
Initial community commit
Diffstat (limited to 'Src/pfc/string.cpp')
-rw-r--r--Src/pfc/string.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/Src/pfc/string.cpp b/Src/pfc/string.cpp
new file mode 100644
index 00000000..bdf79607
--- /dev/null
+++ b/Src/pfc/string.cpp
@@ -0,0 +1,34 @@
+#define STRICT
+#include <windows.h>
+#include <stdio.h>
+#include "string_unicode.h"
+
+void string_a::s_GetWindowText(HWND w)
+{
+ reset();
+ int len=GetWindowTextLengthA(w)+1;
+ GetWindowTextA(w,string_buffer_a(*this,len),len);
+
+}
+
+void string_a::s_SetWindowText(HWND w)
+{
+ SetWindowTextA(w,*this);
+}
+
+
+/*bool string_a::reg_read(HKEY hk,const char * name)
+{
+ DWORD sz=0,t=0;
+ if (RegQueryValueExA(hk,name,0,&t,0,&sz)!=ERROR_SUCCESS) return 0;
+ if (sz==0 || t!=REG_SZ) return 0;
+ RegQueryValueExA(hk,name,0,0,(BYTE*)buffer_get(sz),&sz);
+ buffer_done();
+ return 1;
+}
+
+void string_a::reg_write(HKEY hk,const char * name)
+{
+ RegSetValueExA(hk,name,0,REG_SZ,(const BYTE*)(const char*)*this,(length()+1));
+}
+*/ \ No newline at end of file