[6a7162]: PWDialog.cpp  Maximize  Restore  History

Download this file

47 lines (42 with data), 1.5 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
* Copyright (c) 2003-2008 Rony Shapiro <ronys@users.sourceforge.net>.
* All rights reserved. Use of the code is allowed under the
* Artistic License 2.0 terms, as specified in the LICENSE file
* distributed with this code, or available from
* http://www.opensource.org/licenses/artistic-license-2.0.php
*/
#include "PWDialog.h"
#include "DboxMain.h"
#if defined(POCKET_PC)
#error "TBD - define proper Dialog base class for PPC"
#endif
IMPLEMENT_DYNAMIC(CPWDialog, CDialog)
LRESULT CPWDialog::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
// list of all the events that signify actual user activity, as opposed
// to Windows internal events...
if (message == WM_KEYDOWN ||
message == WM_COMMAND ||
message == WM_SYSCOMMAND ||
message == WM_MOUSEMOVE ||
message == WM_MOVE ||
message == WM_LBUTTONDOWN ||
message == WM_LBUTTONDBLCLK ||
message == WM_CONTEXTMENU ||
message == WM_MENUSELECT ||
message == WM_VSCROLL ||
message == WM_HSCROLL) {
CWnd *p = GetParent();
while (p != NULL) {
DboxMain *pDbx = dynamic_cast<DboxMain *>(p);
if (pDbx != NULL) {
pDbx->ResetIdleLockCounter();
break;
} else
p = p->GetParent();
}
if (p == NULL)
TRACE(_T("CPWDialog::WindowProc - couldn't find DboxMain ancestor\n"));
}
return CDialog::WindowProc(message, wParam, lParam);
}

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks