Update-Installer/external/win32cpp/WCE samples/Simple/View.cpp
Robert Knight d16da069e9 Add Win++ library to external
This is a thin wrapper around the Win32 API used in the Win32
Updater Dialog implementation.
2011-08-23 19:54:52 +01:00

38 lines
930 B
C++

#include "view.h"
#include "resource.h"
void CView::OnDraw(CDC* pDC)
{
// Define a rectangle to contain some text
CRect rc = GetClientRect();
rc.bottom = rc.bottom/2;
// Draw some text in our rectangle
LPCTSTR szString = TEXT("Use Debug mode. Click here");
pDC->DrawText(szString, lstrlen(szString), rc, DT_SINGLELINE | DT_VCENTER | DT_CENTER);
}
LRESULT CView::WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg)
{
case WM_DESTROY:
// Terminate the application.
::PostQuitMessage(0);
return 0;
case WM_LBUTTONDOWN:
// NOTE: You must be in debug mode to see the trace output
TRACE(TEXT("Left mouse button down message\n"));
break;
case WM_LBUTTONUP:
// NOTE: You must be in debug mode to see the trace output
TRACE(TEXT("Left mouse button up message\n"));
break;
}
// Pass unhandled messages on for default processing
return WndProcDefault(uMsg, wParam, lParam);
}