/[winpt]/trunk/Src/wptDateDlg.cpp
ViewVC logotype

Annotation of /trunk/Src/wptDateDlg.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 256 - (hide annotations)
Sat Aug 5 10:31:06 2006 UTC (18 years, 6 months ago) by twoaday
File size: 1850 byte(s)
1.0.0pre3 release.


1 werner 36 /* wptDateDlg.cpp - Universal dialog to ask for a date
2 twoaday 256 * Copyright (C) 2001, 2002, 2003, 2006 Timo Schulz
3 werner 36 *
4     * This file is part of WinPT.
5     *
6     * WinPT is free software; you can redistribute it and/or modify
7     * it under the terms of the GNU General Public License as published by
8     * the Free Software Foundation; either version 2 of the License, or
9     * (at your option) any later version.
10     *
11     * WinPT is distributed in the hope that it will be useful,
12     * but WITHOUT ANY WARRANTY; without even the implied warranty of
13     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14     * GNU General Public License for more details.
15     *
16     * You should have received a copy of the GNU General Public License
17     * along with WinPT; if not, write to the Free Software Foundation,
18     * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
19     */
20     #ifdef HAVE_CONFIG_H
21     #include <config.h>
22     #endif
23    
24     #include <windows.h>
25     #include <commctrl.h>
26    
27     #include "gpgme.h"
28 werner 47 #include "resource.h"
29 werner 36 #include "wptCommonCtl.h"
30     #include "wptContext.h"
31     #include "wptDlgs.h"
32     #include "wptTypes.h"
33    
34    
35 twoaday 256 /* Dialog box procedure to select a date. */
36 werner 36 BOOL CALLBACK
37     date_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
38     {
39     static date_s *udd;
40    
41     switch( msg ) {
42     case WM_INITDIALOG:
43     udd = (date_s *)lparam;
44 twoaday 256 if (!udd)
45     BUG (0);
46     if (udd->text)
47     SetWindowText (dlg, udd->text);
48     SetForegroundWindow (dlg);
49     return TRUE;
50 werner 36
51     case WM_COMMAND:
52 twoaday 256 switch (LOWORD (wparam)) {
53     case IDCANCEL:
54     udd->cancel = 1;
55     EndDialog (dlg, FALSE);
56     return TRUE;
57    
58 werner 36 case IDOK:
59 twoaday 256 DateTime_GetSystemtime (GetDlgItem (dlg, IDC_DATE_DTP), &udd->st);
60 werner 36 udd->cancel = 0;
61 twoaday 256 EndDialog (dlg, TRUE);
62 werner 36 return TRUE;
63     }
64     break;
65     }
66    
67     return FALSE;
68 twoaday 32 }

Properties

Name Value
svn:eol-style native

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26