Functions | Variables

taskbar.cpp File Reference

#include <precomp.h>
#include "taskbar.h"
#include "traynotify.h"
Include dependency graph for taskbar.cpp:

Go to the source code of this file.

Functions

HICON get_window_icon_small (HWND hwnd)
 retrieve icon from window
HICON get_window_icon_big (HWND hwnd, bool allow_from_class)

Variables

DynamicFct< BOOL(WINAPI
*)(HWND hwnd)> 
g_SetTaskmanWindow (TEXT("user32"),"SetTaskmanWindow")
DynamicFct< BOOL(WINAPI
*)(HWND hwnd)> 
g_RegisterShellHookWindow (TEXT("user32"),"RegisterShellHookWindow")
DynamicFct< BOOL(WINAPI
*)(HWND hwnd)> 
g_DeregisterShellHookWindow (TEXT("user32"),"DeregisterShellHookWindow")

Function Documentation

HICON get_window_icon_big ( HWND  hwnd,
bool  allow_from_class 
)

Definition at line 347 of file taskbar.cpp.

{
    HICON hIcon = 0;

    SendMessageTimeout(hwnd, WM_GETICON, ICON_BIG, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon);

    if (!hIcon)
        SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL2, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon);

    if (!hIcon)
        SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon);

    if (allow_from_class) {
        if (!hIcon)
            hIcon = (HICON)GetClassLong(hwnd, GCL_HICON);

        if (!hIcon)
            hIcon = (HICON)GetClassLong(hwnd, GCL_HICONSM);
    }

    if (!hIcon)
        SendMessageTimeout(hwnd, WM_QUERYDRAGICON, 0, 0, 0, 1000, (LPDWORD)&hIcon);

    return hIcon;
}
HICON get_window_icon_small ( HWND  hwnd )

retrieve icon from window

Definition at line 323 of file taskbar.cpp.

Referenced by TaskBar::EnumWndProc().

{
    HICON hIcon = 0;

    SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL2, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon);

    if (!hIcon)
        SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon);

    if (!hIcon)
        SendMessageTimeout(hwnd, WM_GETICON, ICON_BIG, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon);

    if (!hIcon)
        hIcon = (HICON)GetClassLong(hwnd, GCL_HICONSM);

    if (!hIcon)
        hIcon = (HICON)GetClassLong(hwnd, GCL_HICON);

    if (!hIcon)
        SendMessageTimeout(hwnd, WM_QUERYDRAGICON, 0, 0, 0, 1000, (LPDWORD)&hIcon);

    return hIcon;
}

Here is the caller graph for this function:


Variable Documentation

DynamicFct<BOOL (WINAPI*)(HWND hwnd)> g_DeregisterShellHookWindow(TEXT("user32"),"DeregisterShellHookWindow")

Definition at line 37 of file taskbar.cpp.

Referenced by TaskBar::~TaskBar().

DynamicFct<BOOL (WINAPI*)(HWND hwnd)> g_RegisterShellHookWindow(TEXT("user32"),"RegisterShellHookWindow")

Definition at line 36 of file taskbar.cpp.

Referenced by TaskBar::Init().

DynamicFct<BOOL (WINAPI*)(HWND hwnd)> g_SetTaskmanWindow(TEXT("user32"),"SetTaskmanWindow")

Definition at line 35 of file taskbar.cpp.

Referenced by TaskBar::Init(), and TaskBar::~TaskBar().


ROS Explorer Source Code Documentation
generated on 02.01.2013 by doxygen

ROS Explorer Homepage