From f3ed8d376f743968a824819e9110272288607da4 Mon Sep 17 00:00:00 2001 From: Ian C Date: Mon, 11 Apr 2005 23:00:49 +0000 Subject: Added Common::Initalise() and updated libraries --- src/common.cpp | 9 +++++++++ src/install.sh | 2 +- src/test/GNUmakefile | 4 ++-- src/test/w32dtst.cpp | 2 ++ src/w32dlib/common.h | 5 +++++ 5 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/common.cpp b/src/common.cpp index 9f5296c..d0b94a6 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -25,6 +25,15 @@ namespace W32DLib { +// ------------------------------------------------------------ +// +void Common::Initialise() +{ + InitCommonControls(); + CoInitialize(NULL); +} + + // ------------------------------------------------------------ // void Common::Message(HWND parent, const char *msg) diff --git a/src/install.sh b/src/install.sh index 54afb53..732b4e6 100644 --- a/src/install.sh +++ b/src/install.sh @@ -31,7 +31,7 @@ if [ $mkinfo == "1" ] ; then #!/bin/sh if [ "\$1" == "--libs" ] ; then - echo -L$libdir -mwindows -lw32dlib + echo -L$libdir -mwindows -lw32dlib -lcomctl32 -lcomdlg32 -lole32 elif [ "\$1" == "--cflags" ] ; then echo -I$incbase elif [ "\$1" == "--archive" ] ; then diff --git a/src/test/GNUmakefile b/src/test/GNUmakefile index fe28cb0..db4a121 100644 --- a/src/test/GNUmakefile +++ b/src/test/GNUmakefile @@ -18,7 +18,7 @@ # # ------------------------------------------------------------------------- # -# $Id: GNUmakefile,v 1.2 2005-04-05 01:01:58 ianc Exp $ +# $Id: GNUmakefile,v 1.3 2005-04-11 23:00:49 ianc Exp $ # @@ -26,7 +26,7 @@ TARGET = w32dtst.exe SOURCES = w32dtst.cpp -LIB = -L.. -lw32dlib +LIB = -L.. -lw32dlib -lcomctl32 -lcomdlg32 -lole32 RES = dialog diff --git a/src/test/w32dtst.cpp b/src/test/w32dtst.cpp index 94245ba..6d579cc 100644 --- a/src/test/w32dtst.cpp +++ b/src/test/w32dtst.cpp @@ -342,6 +342,8 @@ int WINAPI WinMain (HINSTANCE hInstance, Test t; INT_PTR i; + W32DLib::Common::Initialise(); + #ifdef DATAX_TEST std::cout << "DATAX_TEST enabled" << std::endl; #endif diff --git a/src/w32dlib/common.h b/src/w32dlib/common.h index 8fd4b14..7c0482c 100644 --- a/src/w32dlib/common.h +++ b/src/w32dlib/common.h @@ -35,6 +35,11 @@ namespace W32DLib { public: + /// \brief Initialises any Windows APIs required by W32DLib. + /// + static void Initialise(); + + /// \brief Displays a message box. /// /// \param parent Parent window (NULL for none) -- cgit v1.2.3