source: trunk/Lucide/SOURCE/gui/aboutDlg.cpp @ 51

Last change on this file since 51 was 35, checked in by Eugene Romanenko, 16 years ago

added licence block to source files

File size: 2.9 KB
Line 
1/* ***** BEGIN LICENSE BLOCK *****
2 * Version: CDDL 1.0/LGPL 2.1
3 *
4 * The contents of this file are subject to the COMMON DEVELOPMENT AND
5 * DISTRIBUTION LICENSE (CDDL) Version 1.0 (the "License"); you may not use
6 * this file except in compliance with the License. You may obtain a copy of
7 * the License at http://www.sun.com/cddl/
8 *
9 * Software distributed under the License is distributed on an "AS IS" basis,
10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 * for the specific language governing rights and limitations under the
12 * License.
13 *
14 * The Initial Developer of the Original Code is
15 * Eugene Romanenko, netlabs.org.
16 * Portions created by the Initial Developer are Copyright (C) 2006
17 * the Initial Developer. All Rights Reserved.
18 *
19 * Contributor(s):
20 *
21 * Alternatively, the contents of this file may be used under the terms of
22 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
23 * in which case the provisions of the LGPL are applicable instead of those
24 * above. If you wish to allow use of your version of this file only under the
25 * terms of the LGPL, and not to allow others to use your version of this file
26 * under the terms of the CDDL, indicate your decision by deleting the
27 * provisions above and replace them with the notice and other provisions
28 * required by the LGPL. If you do not delete the provisions above, a recipient
29 * may use your version of this file under the terms of any one of the CDDL
30 * or the LGPL.
31 *
32 * ***** END LICENSE BLOCK ***** */
33
34
35#define INCL_DOS
36#define INCL_WIN
37#include <os2.h>
38
39#include <stdio.h>
40
41#include "lucide.h"
42#include "luutils.h"
43#include "lucide_res.h"
44
45void setLinkPointer( HPOINTER hp );
46void toLink( HWND hwnd );
47
48static HWND hWndFrame = NULLHANDLE;
49
50static MRESULT EXPENTRY AboutProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 )
51{
52    switch ( msg )
53    {
54        case WM_INITDLG:
55            {
56                localizeDialog( hwnd );
57                centerWindow( hWndFrame, hwnd );
58
59                char buf[ 256 ];
60                snprintf( buf, sizeof buf, "%s %s", appName, appVersion );
61                WinSetDlgItemText( hwnd, IDT_LUCIDEVERSION, buf );
62
63                HPOINTER p = WinLoadPointer( HWND_DESKTOP, NULLHANDLE, IDP_HAND );
64                setLinkPointer( p );
65
66                toLink( WinWindowFromID( hwnd, IDC_NETLABSURL ) );
67
68                LONG cpr_clrback = SYSCLR_DIALOGBACKGROUND;
69                WinSetPresParam( WinWindowFromID( hwnd, IDC_COPYRIGHTS ),
70                                 PP_BACKGROUNDCOLORINDEX,
71                                 sizeof( cpr_clrback ), (PVOID)&cpr_clrback );
72            }
73            return (MRESULT)FALSE;
74    }
75    return WinDefDlgProc( hwnd, msg, mp1, mp2 );
76}
77
78
79void AboutBox( HWND _hWndFrame )
80{
81    hWndFrame = _hWndFrame;
82    WinDlgBox( HWND_DESKTOP, hWndFrame, AboutProc,
83               NULLHANDLE, IDD_ABOUT, NULL );
84}
85
86
87
Note: See TracBrowser for help on using the repository browser.