summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2005-04-17 00:34:01 +0000
committerIan C <ianc@noddybox.co.uk>2005-04-17 00:34:01 +0000
commit7740ebb87b8aa440f10095a77fea5d781844dd97 (patch)
tree29c43f23bcb957d3177db1282d8db5e44b79dee9 /src/test
parentba88028c9e6f7a2da0b9bc31e86ca9633613745e (diff)
Added Registry class and default message box titles
Diffstat (limited to 'src/test')
-rw-r--r--src/test/w32dtst.cpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/test/w32dtst.cpp b/src/test/w32dtst.cpp
index 6d579cc..bc5e6a6 100644
--- a/src/test/w32dtst.cpp
+++ b/src/test/w32dtst.cpp
@@ -334,6 +334,40 @@ private:
}
};
+static void ReadInt(const char *mode, W32DLib::Registry& r, const char *name)
+{
+ unsigned i;
+ bool res=r.Read(name,i);
+
+ std::cout << "ReadInt(mode=" << mode
+ << ") res=" << res << " val=" << i << std::endl;
+}
+
+static void ReadStr(const char *mode, W32DLib::Registry& r, const char *name)
+{
+ std::string i;
+ bool res=r.Read(name,i);
+
+ std::cout << "ReadStr(mode=" << mode
+ << ") res=" << res << " val=" << i << std::endl;
+}
+
+static void WriteInt(const char *mode, W32DLib::Registry& r, const char *name)
+{
+ unsigned i=666;
+ bool res=r.Write(name,i);
+
+ std::cout << "WriteInt(mode=" << mode << ") res=" << res << std::endl;
+}
+
+static void WriteStr(const char *mode, W32DLib::Registry& r, const char *name)
+{
+ std::string i("Hello World");
+ bool res=r.Write(name,i);
+
+ std::cout << "WriteInt(mode=" << mode << ") res=" << res << std::endl;
+}
+
int WINAPI WinMain (HINSTANCE hInstance,
HINSTANCE hPrevInstance,
PSTR szCmdLine,
@@ -348,6 +382,18 @@ int WINAPI WinMain (HINSTANCE hInstance,
std::cout << "DATAX_TEST enabled" << std::endl;
#endif
+ W32DLib::Registry rw(HKEY_CURRENT_USER,"Software\\Noddybox\\w32dlibtest",false);
+ W32DLib::Registry rd(HKEY_CURRENT_USER,"Software\\Noddybox\\w32dlibtest");
+
+ ReadInt("rw",rw,"int");
+ ReadStr("rw",rw,"str");
+ ReadInt("ro",rd,"int");
+ ReadStr("ro",rd,"str");
+ WriteInt("rw",rw,"int");
+ WriteStr("rw",rw,"str");
+ WriteInt("ro",rd,"int");
+ WriteStr("ro",rd,"str");
+
i=t.ShowModal(hInstance,NULL);
if (i==IDOK)