mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-11-22 08:03:27 -05:00
Fix windows crash handler compilation when using Qt 5.
This commit is contained in:
parent
00eb1a5b8b
commit
cf3bca07f5
@ -127,7 +127,7 @@ static LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARA
|
|||||||
|
|
||||||
case IDC_GITHUB_BUTTON:
|
case IDC_GITHUB_BUTTON:
|
||||||
// Open SDRangel GitHub issues page in web browser
|
// Open SDRangel GitHub issues page in web browser
|
||||||
ShellExecute(NULL, L"open", L"https://github.com/f4exb/sdrangel/issues", NULL, NULL, SW_SHOWNORMAL);
|
ShellExecute(NULL, TEXT("open"), TEXT("https://github.com/f4exb/sdrangel/issues"), NULL, NULL, SW_SHOWNORMAL);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IDC_COPY_BUTTON:
|
case IDC_COPY_BUTTON:
|
||||||
@ -141,7 +141,7 @@ static LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARA
|
|||||||
void *text = GlobalLock(hMem);
|
void *text = GlobalLock(hMem);
|
||||||
if (text)
|
if (text)
|
||||||
{
|
{
|
||||||
GetWindowText(hEdit, (LPWSTR) text, len);
|
GetWindowText(hEdit, (LPTSTR) text, len);
|
||||||
GlobalUnlock(hMem);
|
GlobalUnlock(hMem);
|
||||||
OpenClipboard(0);
|
OpenClipboard(0);
|
||||||
EmptyClipboard();
|
EmptyClipboard();
|
||||||
@ -163,8 +163,8 @@ static LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARA
|
|||||||
HINSTANCE hInst = (HINSTANCE) GetWindowLongPtr(hWnd, GWLP_HINSTANCE);
|
HINSTANCE hInst = (HINSTANCE) GetWindowLongPtr(hWnd, GWLP_HINSTANCE);
|
||||||
LPCREATESTRUCT cs = (LPCREATESTRUCT) lParam;
|
LPCREATESTRUCT cs = (LPCREATESTRUCT) lParam;
|
||||||
|
|
||||||
hLabel = CreateWindow(L"Static",
|
hLabel = CreateWindow(TEXT("Static"),
|
||||||
L"SDRangel has crashed.\r\n\r\nPlease consider opening a bug report on GitHub, copying the text below and a screenshot.",
|
TEXT("SDRangel has crashed.\r\n\r\nPlease consider opening a bug report on GitHub, copying the text below and a screenshot."),
|
||||||
WS_CHILD | WS_VISIBLE,
|
WS_CHILD | WS_VISIBLE,
|
||||||
0, 0, 0, 0,
|
0, 0, 0, 0,
|
||||||
hWnd,
|
hWnd,
|
||||||
@ -172,8 +172,8 @@ static LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARA
|
|||||||
hInst,
|
hInst,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
hEdit = CreateWindowA("EDIT",
|
hEdit = CreateWindow(TEXT("EDIT"),
|
||||||
(LPCSTR) cs->lpCreateParams,
|
(LPTSTR) cs->lpCreateParams,
|
||||||
WS_BORDER | WS_CHILD | WS_VISIBLE | WS_VSCROLL | ES_LEFT | ES_MULTILINE | ES_AUTOVSCROLL,
|
WS_BORDER | WS_CHILD | WS_VISIBLE | WS_VSCROLL | ES_LEFT | ES_MULTILINE | ES_AUTOVSCROLL,
|
||||||
0, 0, 0, 0,
|
0, 0, 0, 0,
|
||||||
hWnd,
|
hWnd,
|
||||||
@ -182,8 +182,8 @@ static LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARA
|
|||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
hGithubButton = CreateWindow(
|
hGithubButton = CreateWindow(
|
||||||
L"BUTTON",
|
TEXT("BUTTON"),
|
||||||
L"Open Github...",
|
TEXT("Open Github..."),
|
||||||
WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON,
|
WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON,
|
||||||
0, 0, 0, 0,
|
0, 0, 0, 0,
|
||||||
hWnd,
|
hWnd,
|
||||||
@ -192,8 +192,8 @@ static LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARA
|
|||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
hCopyButton = CreateWindow(
|
hCopyButton = CreateWindow(
|
||||||
L"BUTTON",
|
TEXT("BUTTON"),
|
||||||
L"Copy text",
|
TEXT("Copy text"),
|
||||||
WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON,
|
WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON,
|
||||||
0, 0, 0, 0,
|
0, 0, 0, 0,
|
||||||
hWnd,
|
hWnd,
|
||||||
@ -202,8 +202,8 @@ static LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARA
|
|||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
hExitButton = CreateWindow(
|
hExitButton = CreateWindow(
|
||||||
L"BUTTON",
|
TEXT("BUTTON"),
|
||||||
L"Exit SDRangel",
|
TEXT("Exit SDRangel"),
|
||||||
WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON,
|
WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON,
|
||||||
0, 0, 0, 0,
|
0, 0, 0, 0,
|
||||||
hWnd,
|
hWnd,
|
||||||
@ -373,7 +373,7 @@ static LONG crashHandler(struct _EXCEPTION_POINTERS *ExceptionInfo)
|
|||||||
|
|
||||||
SetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT_SYSTEM_AWARE); // Needed, otherwise GetDpiForWindow always returns 96, rather than the actual value
|
SetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT_SYSTEM_AWARE); // Needed, otherwise GetDpiForWindow always returns 96, rather than the actual value
|
||||||
|
|
||||||
wchar_t windowClass[] = L"SDRangel Crash Window Class";
|
TCHAR windowClass[] = TEXT("SDRangel Crash Window Class");
|
||||||
HMODULE hInstance = GetModuleHandle(NULL);
|
HMODULE hInstance = GetModuleHandle(NULL);
|
||||||
WNDCLASSEX wc = { };
|
WNDCLASSEX wc = { };
|
||||||
|
|
||||||
@ -386,7 +386,7 @@ static LONG crashHandler(struct _EXCEPTION_POINTERS *ExceptionInfo)
|
|||||||
|
|
||||||
RegisterClassEx(&wc);
|
RegisterClassEx(&wc);
|
||||||
|
|
||||||
hWindow = CreateWindow(windowClass, L"SDRangel Crash", WS_OVERLAPPEDWINDOW,
|
hWindow = CreateWindow(windowClass, TEXT("SDRangel Crash"), WS_OVERLAPPEDWINDOW,
|
||||||
CW_USEDEFAULT, 0, 640, 500,
|
CW_USEDEFAULT, 0, 640, 500,
|
||||||
NULL, NULL, hInstance, (LPVOID) reportBuffer
|
NULL, NULL, hInstance, (LPVOID) reportBuffer
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user