隐藏一个函数不暴露在.h中
This commit is contained in:
parent
c0b98e73d3
commit
67eac6173a
@ -2,14 +2,13 @@
|
|||||||
|
|
||||||
namespace hgl
|
namespace hgl
|
||||||
{
|
{
|
||||||
|
LRESULT CALLBACK WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
constexpr wchar_t WIN_CLASS_NAME[] = L"CMGameEngine/ULRE Window Class";
|
constexpr wchar_t WIN_CLASS_NAME[] = L"CMGameEngine/ULRE Window Class";
|
||||||
}
|
|
||||||
|
|
||||||
LRESULT CALLBACK WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
bool RegistryWinClass(HINSTANCE hInstance)
|
||||||
|
|
||||||
bool WinWindow::Registry()
|
|
||||||
{
|
{
|
||||||
WNDCLASSEXW win_class;
|
WNDCLASSEXW win_class;
|
||||||
|
|
||||||
@ -30,6 +29,7 @@ namespace hgl
|
|||||||
|
|
||||||
return RegisterClassExW(&win_class);
|
return RegisterClassExW(&win_class);
|
||||||
}
|
}
|
||||||
|
}//namespace
|
||||||
|
|
||||||
bool WinWindow::Create()
|
bool WinWindow::Create()
|
||||||
{
|
{
|
||||||
@ -99,7 +99,7 @@ namespace hgl
|
|||||||
|
|
||||||
hInstance = GetModuleHandleW(nullptr);
|
hInstance = GetModuleHandleW(nullptr);
|
||||||
|
|
||||||
if (!Registry())
|
if (!RegistryWinClass(hInstance))
|
||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
if(!Create())
|
if(!Create())
|
||||||
|
@ -17,7 +17,6 @@ namespace hgl
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
bool Registry();
|
|
||||||
bool Create();
|
bool Create();
|
||||||
|
|
||||||
void OnClose() override{Close();}
|
void OnClose() override{Close();}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user