Use wxGetInstance() instead of wxhInstance in wxMSW code.

No real changes, just use an accessor function instead of directly accessing
the global variable.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-02-25 00:03:59 +00:00
parent 2856f57b37
commit 5431e4a684
3 changed files with 13 additions and 13 deletions

View File

@@ -62,6 +62,13 @@ extern WXDLLIMPEXP_DATA_CORE(HFONT) wxSTATUS_LINE_FONT;
extern WXDLLIMPEXP_DATA_BASE(HINSTANCE) wxhInstance;
extern "C"
{
WXDLLIMPEXP_BASE HINSTANCE wxGetInstance();
}
WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
// ---------------------------------------------------------------------------
// define things missing from some compilers' headers
// ---------------------------------------------------------------------------
@@ -769,7 +776,7 @@ public:
{
if ( IsRegistered() )
{
if ( !::UnregisterClass(m_clsname.wx_str(), wxhInstance) )
if ( !::UnregisterClass(m_clsname.wx_str(), wxGetInstance()) )
{
wxLogLastError(wxT("UnregisterClass"));
}
@@ -839,13 +846,6 @@ private:
// global functions
// ---------------------------------------------------------------------------
extern "C"
{
WXDLLIMPEXP_BASE HINSTANCE wxGetInstance();
}
WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
// return the full path of the given module
inline wxString wxGetFullModuleName(HMODULE hmod)
{