Skip to content

Commit ecac069

Browse files
committed
Source upload part 1
1 parent 30b83a1 commit ecac069

File tree

7,571 files changed

+1564986
-65
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

7,571 files changed

+1564986
-65
lines changed

.gitattributes

Lines changed: 0 additions & 22 deletions
This file was deleted.

.gitignore

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
/*
2+
* This is a part of the BugTrap package.
3+
* Copyright (c) 2005-2007 IntelleSoft.
4+
* All rights reserved.
5+
*
6+
* Description: About dialog.
7+
* Author: Maksim Pyatkovskiy.
8+
*
9+
* This source code is only intended as a supplement to the
10+
* BugTrap package reference and related electronic documentation
11+
* provided with the product. See these sources for detailed
12+
* information regarding the BugTrap package.
13+
*/
14+
15+
#include "StdAfx.h"
16+
#include "resource.h"
17+
#include "AboutDlg.h"
18+
#include "BugTrapUI.h"
19+
#include "BugTrapUtils.h"
20+
#include "Globals.h"
21+
22+
#ifdef _DEBUG
23+
#define new DEBUG_NEW
24+
#endif
25+
26+
/**
27+
* @addtogroup BugTrapUI BugTrap Graphical User Interface
28+
* @{
29+
*/
30+
31+
/// E-mail hyper-link control.
32+
static CHyperLink g_hlEMail;
33+
34+
/**
35+
* @brief WM_COMMAND handler of About dialog.
36+
* @param hwnd - window handle.
37+
* @param id - control ID.
38+
* @param hwndCtl - control handle.
39+
* @param codeNotify - notification code.
40+
*/
41+
static void AboutDlg_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify)
42+
{
43+
codeNotify; hwndCtl;
44+
switch (id)
45+
{
46+
case IDOK:
47+
case IDCANCEL:
48+
EndDialog(hwnd, FALSE);
49+
break;
50+
}
51+
}
52+
53+
/**
54+
* @brief WM_INITDIALOG handler of About dialog.
55+
* @param hwnd - window handle.
56+
* @param hwndFocus - system-defined focus window.
57+
* @param lParam - user-defined parameter.
58+
* @return true to setup focus to system-defined control.
59+
*/
60+
static BOOL AboutDlg_OnInitDialog(HWND hwnd, HWND hwndFocus, LPARAM lParam)
61+
{
62+
lParam; hwndFocus;
63+
64+
CenterWindow(hwnd, GetParent(hwnd));
65+
HWND hwndCtl = GetDlgItem(hwnd, IDCANCEL);
66+
SetFocus(hwndCtl);
67+
68+
hwndCtl = GetDlgItem(hwnd, IDC_EMAIL);
69+
TCHAR szLinkURL[MAX_PATH] = _T("mailto:");
70+
int nLinkPrefixLen = _tcslen(szLinkURL);
71+
GetWindowText(hwndCtl, szLinkURL + nLinkPrefixLen, countof(szLinkURL) - nLinkPrefixLen);
72+
g_hlEMail.SetLinkURL(szLinkURL);
73+
g_hlEMail.Attach(hwndCtl);
74+
75+
return FALSE;
76+
}
77+
78+
/**
79+
* @brief WM_DESTROY handler of About dialog.
80+
* @param hwnd - window handle.
81+
*/
82+
static void AboutDlg_OnDestroy(HWND hwnd)
83+
{
84+
hwnd;
85+
g_hlEMail.Detach();
86+
}
87+
88+
/**
89+
* @brief Dialog procedure of About dialog.
90+
* @param hwndDlg - window handle.
91+
* @param uMsg - message identifier.
92+
* @param wParam - 1st message parameter.
93+
* @param lParam - 2nd message parameter.
94+
* @return message result.
95+
*/
96+
INT_PTR CALLBACK AboutDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
97+
{
98+
switch (uMsg)
99+
{
100+
HANDLE_MSG(hwndDlg, WM_INITDIALOG, AboutDlg_OnInitDialog);
101+
HANDLE_MSG(hwndDlg, WM_COMMAND, AboutDlg_OnCommand);
102+
HANDLE_MSG(hwndDlg, WM_DESTROY, AboutDlg_OnDestroy);
103+
default: return FALSE;
104+
}
105+
}
106+
107+
/** @} */
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* This is a part of the BugTrap package.
3+
* Copyright (c) 2005-2007 IntelleSoft.
4+
* All rights reserved.
5+
*
6+
* Description: About dialog.
7+
* Author: Maksim Pyatkovskiy.
8+
*
9+
* This source code is only intended as a supplement to the
10+
* BugTrap package reference and related electronic documentation
11+
* provided with the product. See these sources for detailed
12+
* information regarding the BugTrap package.
13+
*/
14+
15+
#pragma once
16+
17+
INT_PTR CALLBACK AboutDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);

0 commit comments

Comments
 (0)