Skip to content

Commit

Permalink
minor change, no affect
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Tang <[email protected]>
  • Loading branch information
neuks committed Jul 12, 2016
1 parent 82c2f41 commit 79af818
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
8 changes: 4 additions & 4 deletions CApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ CApp::~CApp()
UnregisterClass("WINDOW", GetModuleHandle(NULL));
}

int CApp::Run()
int CApp::OnExec()
{
MSG msg;

this->OnInit();

while(::GetMessage(&msg, 0, 0, 0)) {
::TranslateMessage(&msg);
::DispatchMessage(&msg);
while(GetMessage(&msg, 0, 0, 0)) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}

this->OnExit();
Expand Down
6 changes: 2 additions & 4 deletions CApp.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ struct CApp
CApp();
~CApp();

// Operator Functions
int Run();

// Message Handlers
// Virtual Handlers
virtual void OnInit() {};
virtual int OnExec();
virtual void OnExit() {};
};

Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

# Configurations
INCLUDE=-DDEBUG
ASFLAGS=$(INCLUDE) -g
CCFLAGS=$(INCLUDE) -g
CXFLAGS=$(INCLUDE) -g
FCFLAGS=$(INCLUDE) -g
ASFLAGS=$(INCLUDE) -O2
CCFLAGS=$(INCLUDE) -O2
CXFLAGS=$(INCLUDE) -O2
FCFLAGS=$(INCLUDE) -O2
LDFLAGS=

# Objectives
Expand Down
2 changes: 1 addition & 1 deletion afx.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
extern appClass theApp;

#define IMPLEMENT_APP(appClass) \
appClass theApp; int main() { return theApp.Run(); }
appClass theApp; int main() { return theApp.Exec(); }

HWND LoadToolbar(HINSTANCE hInstance, DWORD dwStyle, WORD wID, HWND hParent);

Expand Down

0 comments on commit 79af818

Please sign in to comment.