Skip to content

Commit

Permalink
Fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
eschan145 committed Nov 3, 2024
1 parent 82f96cb commit a83472f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ class Application {
const char CLASS_NAME[] = "DieKnow";

WNDCLASS wc = {};
wc.lpfnWndProc = WindowProc;
wc.lpfnWndProc = Application::WindowProc;
wc.hInstance = GetModuleHandle(NULL);
wc.lpszClassName = CLASS_NAME;

Expand Down Expand Up @@ -284,7 +284,7 @@ class Application {
}
}

LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
static LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
switch (uMsg) {
case WM_COMMAND:
if (LOWORD(wParam) == Widgets::RUNNING) {
Expand Down Expand Up @@ -338,8 +338,9 @@ class Application {
SendMessage(widgets[Widgets::DIRECTORY], LB_ADDSTRING, 0, (LPARAM)file_name.c_str());
}
}
}
};

void create_window() {
Application* application = Application();
}
Application* application = new Application();
delete application;
}

0 comments on commit a83472f

Please sign in to comment.