Skip to content

Commit

Permalink
minidriver: change the icon of the pinpad dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
vletoux authored and viktorTarasov committed May 10, 2015
1 parent ac82a96 commit 8ec000e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/minidriver/minidriver.c
Expand Up @@ -106,6 +106,7 @@ HINSTANCE g_inst;

/* defined twice: in versioninfo-minidriver.rc.in and in minidriver.c */
#define IDD_PINPAD 101
#define IDI_LOGO 102
#define IDC_PINPAD_TEXT 1001
#define IDC_PINPAD_ICON 1000

Expand Down Expand Up @@ -2277,6 +2278,13 @@ static INT_PTR CALLBACK md_dialog_proc(HWND hWnd, UINT message, WPARAM wParam, L
/* load the information icon */
hIcon = (HICON) LoadImage(0, IDI_INFORMATION, IMAGE_ICON, 0, 0, LR_SHARED);
SendMessage(GetDlgItem(hWnd, IDC_PINPAD_ICON),STM_SETIMAGE,IMAGE_ICON, (LPARAM) hIcon);
/* change the icon */
hIcon = LoadIcon(g_inst, MAKEINTRESOURCE(IDI_LOGO));
if (hIcon)
{
SendMessage(hWnd, WM_SETICON, ICON_SMALL, (LPARAM) hIcon);
SendMessage(hWnd, WM_SETICON, ICON_BIG, (LPARAM) hIcon);
}
/* launch the function in another thread context store the thread handle */
((LONG_PTR*)lParam)[9] = (LONG_PTR) hWnd;
((LONG_PTR*)lParam)[8] = (LONG_PTR) CreateThread(NULL, 0, md_dialog_perform_pin_operation_thread, (PVOID) lParam, 0, NULL);
Expand Down
2 changes: 2 additions & 0 deletions src/minidriver/versioninfo-minidriver.rc.in
Expand Up @@ -3,6 +3,7 @@
#define IDC_STATIC -1
/* defined twice: in versioninfo-minidriver.rc.in and in minidriver.c */
#define IDD_PINPAD 101
#define IDI_LOGO 102
#define IDC_PINPAD_TEXT 1001
#define IDC_PINPAD_ICON 1000

Expand Down Expand Up @@ -52,3 +53,4 @@ BEGIN
LTEXT "This window will be closed automatically after the PIN has been submitted on the PINPAD or if the PINPAD timeout occurs (in general 30 seconds).",IDC_STATIC,7,46,298,19
END

IDI_LOGO ICON "..\\..\\win32\\OpenSC.ico"

0 comments on commit 8ec000e

Please sign in to comment.