Skip to content

Commit

Permalink
Merge pull request #8 from sesom42/master
Browse files Browse the repository at this point in the history
* Try to get icon from executable. If the message loop of the app is faulty, the icon can not be determined with WM_GETICON.
* typo in solution file for VS8
* show BugTrap window above the active window
* more translation adjustments (German)
  • Loading branch information
bchavez committed Oct 2, 2015
2 parents 623d23f + dd130b6 commit e1403ea
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 9 deletions.
2 changes: 1 addition & 1 deletion source/BugTrap.8.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BugTrap", "BugTrap.2005.vcproj", "{E8CF1ADA-264A-4127-86C2-FD7057D3792C}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BugTrap", "BugTrap.8.vcproj", "{E8CF1ADA-264A-4127-86C2-FD7057D3792C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
8 changes: 4 additions & 4 deletions source/BugTrap.rc
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ CAPTION "
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
ICON IDI_BUG,IDC_STATIC,7,7,20,20,WS_GROUP
LTEXT "BugTrap - softwarefehler berichterstattung\nVersion 1.3",IDC_VERSION_STRING,34,7,146,16
LTEXT "BugTrap - Softwarefehler Berichterstattung\nVersion 1.3",IDC_VERSION_STRING,34,7,146,16
LTEXT "Copyright � 2005-2009 IntelleSoft",IDC_STATIC,7,32,113,8
LTEXT "http://www.intellesoft.net",IDC_URL,7,42,72,10,WS_TABSTOP
LTEXT " GUI design basierend auf Jim Crafton's BlackBox library",IDC_PORTIONS_COPYRIGHT,7,59,228,10,SS_NOPREFIX | SS_SUNKEN
Expand Down Expand Up @@ -128,7 +128,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
GROUPBOX "Laufende Prozesse beim Absturz",IDC_PROCESS_LIST_FRAME,7,7,250,97,WS_GROUP,WS_EX_TRANSPARENT
CONTROL "",IDC_PROCESS_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,12,17,239,80
GROUPBOX "Vom Gew�hlten Prozess Geladene Module",IDC_PROCESS_MODULES_LIST_FRAME,7,107,250,108,WS_GROUP,WS_EX_TRANSPARENT
GROUPBOX "Vom gew�hlten Prozess geladene Module",IDC_PROCESS_MODULES_LIST_FRAME,7,107,250,108,WS_GROUP,WS_EX_TRANSPARENT
CONTROL "",IDC_PROCESS_MODULES_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,12,117,239,92
DEFPUSHBUTTON "Schlie�en",IDCANCEL,264,11,51,14,WS_GROUP
END
Expand Down Expand Up @@ -409,8 +409,8 @@ BEGIN
CONTROL "",IDC_FILESLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | LVS_ALIGNLEFT | WS_BORDER | WS_GROUP | WS_TABSTOP,3,3,336,55
CONTROL "",IDC_FILEVIEW,"Static",SS_GRAYRECT | WS_BORDER | WS_GROUP | WS_TABSTOP,3,61,336,125
CONTROL "",IDC_FILEFORMAT_FRAME,"Static",SS_ETCHEDFRAME | NOT WS_VISIBLE | WS_GROUP,3,190,122,18,WS_EX_TRANSPARENT
CONTROL "&Textblick",IDC_TEXTVIEW,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE | WS_GROUP | WS_TABSTOP,13,194,44,10
CONTROL "&Hexblick",IDC_HEXVIEW,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,68,194,42,10
CONTROL "&Text",IDC_TEXTVIEW,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE | WS_GROUP | WS_TABSTOP,13,194,44,10
CONTROL "&Hex",IDC_HEXVIEW,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,68,194,42,10
CONTROL "",IDC_IMAGE_COMMANDS,"ToolbarWindow32",NOT WS_VISIBLE | 0x4c,3,191,121,16
DEFPUSHBUTTON "Close",IDCANCEL,284,192,50,14,WS_GROUP
END
Expand Down
2 changes: 1 addition & 1 deletion source/BugTrapUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,7 @@ static void ExecuteHandlerAction(void)
{
if (g_dwFlags & BTF_SHOWADVANCEDUI)
DialogBox(g_hInstance, MAKEINTRESOURCE(IDD_MAIN_DLG), NULL, MainDlgProc);
else if (DialogBox(g_hInstance, MAKEINTRESOURCE(IDD_SIMPLE_DLG), NULL, SimpleDlgProc) == TRUE)
else if (DialogBox(g_hInstance, MAKEINTRESOURCE(IDD_SIMPLE_DLG), GetForegroundWindow(), SimpleDlgProc) == TRUE)
DialogBox(g_hInstance, MAKEINTRESOURCE(IDD_MAIN_DLG), NULL, MainDlgProc);
}
break;
Expand Down
22 changes: 19 additions & 3 deletions source/ResManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,30 @@ CResManager::CResManager(HWND hwndParent)
if (m_hSmallAppIcon == NULL)
{
m_bDestroySmallAppIcon = true;;
m_hSmallAppIcon = (HICON)LoadImage(g_hInstance, MAKEINTRESOURCE(IDI_BUG), IMAGE_ICON, nCXSmallIcon, nCYSmallIcon, LR_DEFAULTCOLOR);
TCHAR szModuleFileName[MAX_PATH];
if (GetModuleFileName(NULL, szModuleFileName, countof(szModuleFileName)))
{
ExtractIconEx(szModuleFileName, 0, NULL, &m_hSmallAppIcon, 1);
}
if (m_hSmallAppIcon == NULL)
{
m_hSmallAppIcon = (HICON)LoadImage(g_hInstance, MAKEINTRESOURCE(IDI_BUG), IMAGE_ICON, nCXSmallIcon, nCYSmallIcon, LR_DEFAULTCOLOR);
}
}
int nCXIcon = GetSystemMetrics(SM_CXICON);
int nCYIcon = GetSystemMetrics(SM_CYICON);
if (m_hBigAppIcon == NULL)
{
m_bDestroyBigAppIcon = true;;
m_hBigAppIcon = (HICON)LoadImage(g_hInstance, MAKEINTRESOURCE(IDI_BUG), IMAGE_ICON, nCXIcon, nCYIcon, LR_DEFAULTCOLOR);
m_bDestroyBigAppIcon = true;
TCHAR szModuleFileName[MAX_PATH];
if (GetModuleFileName(NULL, szModuleFileName, countof(szModuleFileName)))
{
ExtractIconEx(szModuleFileName, 0, &m_hBigAppIcon, NULL, 1);
}
if (m_hBigAppIcon == NULL)
{
m_hBigAppIcon = (HICON)LoadImage(g_hInstance, MAKEINTRESOURCE(IDI_BUG), IMAGE_ICON, nCXIcon, nCYIcon, LR_DEFAULTCOLOR);
}
}
if (m_hBigAppIcon != NULL)
{
Expand Down

0 comments on commit e1403ea

Please sign in to comment.