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

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

some updates, added simple readme, about dialog

File size: 1.4 KB
Line 
1#define INCL_DOS
2#define INCL_WIN
3#include <os2.h>
4
5#include <stdio.h>
6
7#include "lucide.h"
8#include "luutils.h"
9#include "lucide_res.h"
10
11void setLinkPointer( HPOINTER hp );
12void toLink( HWND hwnd );
13
14static HWND hWndFrame = NULLHANDLE;
15
16static MRESULT EXPENTRY AboutProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 )
17{
18    switch ( msg )
19    {
20        case WM_INITDLG:
21            {
22                localizeDialog( hwnd );
23                centerWindow( hWndFrame, hwnd );
24
25                char buf[ 256 ];
26                snprintf( buf, sizeof buf, "%s %s", appName, appVersion );
27                WinSetDlgItemText( hwnd, IDT_LUCIDEVERSION, buf );
28
29                HPOINTER p = WinLoadPointer( HWND_DESKTOP, NULLHANDLE, IDP_HAND );
30                setLinkPointer( p );
31
32                toLink( WinWindowFromID( hwnd, IDC_NETLABSURL ) );
33
34                LONG cpr_clrback = SYSCLR_DIALOGBACKGROUND;
35                WinSetPresParam( WinWindowFromID( hwnd, IDC_COPYRIGHTS ),
36                                 PP_BACKGROUNDCOLORINDEX,
37                                 sizeof( cpr_clrback ), (PVOID)&cpr_clrback );
38            }
39            return (MRESULT)FALSE;
40    }
41    return WinDefDlgProc( hwnd, msg, mp1, mp2 );
42}
43
44
45void AboutBox( HWND _hWndFrame )
46{
47    hWndFrame = _hWndFrame;
48    WinDlgBox( HWND_DESKTOP, hWndFrame, AboutProc,
49               NULLHANDLE, IDD_ABOUT, NULL );
50}
51
52
53
Note: See TracBrowser for help on using the repository browser.