Hi again, I have been trying to make the application Instance truly global
(ie declaring it in my applications main header file for use in seperate C++
files). It works fine the way tha app is initially set up with it being made
global only to the C++ file that is initially created but when i try to make
it truly global I get the compilation error :
StdAfx.obj : error LNK2005: "struct HINSTANCE__ * g_hInst"
(?g_hInst@@3PAUHINSTANCE__@@A) already defined in mclient.obj
stdafx.h is included from both dlgprocs.cpp and mclient.cpp, the two C++
files I wish to use it from at present, and stdafx.h includes the file
mclient.h (the header file containing the global definition of g_hInst). I
believe this may be a problem regarding the way C++ handles includes
differently to C ? I haven't done much C++ before and my application is
basically written in C as this is what I am used to and I am not at all
familiar with the C++ standard, if anyone could point out how this could be
solved or point me in the right direction of any help it would be greatly
appreciated!
Thanks in advance.
Matt