隐藏一个函数不暴露在.h中

This commit is contained in:
HuYingzhuo 2019-04-30 19:46:49 +08:00
parent c0b98e73d3
commit 67eac6173a
2 changed files with 22 additions and 23 deletions

View File

@ -2,14 +2,13 @@
namespace hgl
{
LRESULT CALLBACK WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
namespace
{
constexpr wchar_t WIN_CLASS_NAME[] = L"CMGameEngine/ULRE Window Class";
}
LRESULT CALLBACK WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
bool WinWindow::Registry()
bool RegistryWinClass(HINSTANCE hInstance)
{
WNDCLASSEXW win_class;
@ -30,6 +29,7 @@ namespace hgl
return RegisterClassExW(&win_class);
}
}//namespace
bool WinWindow::Create()
{
@ -99,7 +99,7 @@ namespace hgl
hInstance = GetModuleHandleW(nullptr);
if (!Registry())
if (!RegistryWinClass(hInstance))
return(false);
if(!Create())

View File

@ -17,7 +17,6 @@ namespace hgl
protected:
bool Registry();
bool Create();
void OnClose() override{Close();}