예제 #1
0
// --------------------------------------------
void Desk_Init(void)
{
    if (Settings_disableDesk)
        ;
    else
    if (Settings_desktopHook)
    {
        if (load_imp(&pSetHooks, deskhook_dll, "SetHooks"))
            pSetHooks(BBhwnd, g_underExplorer);
        else
            BBMessageBox(MB_OK, NLS2("$Error_DesktopHook$",
                "Error: %s not found!"), deskhook_dll);
    }
    else
    {
        BBRegisterClass(szDesktopName, Desk_WndProc, BBCS_VISIBLE);
        CreateWindowEx(
            WS_EX_TOOLWINDOW,
            szDesktopName,
            NULL,
            WS_CHILD|WS_VISIBLE|WS_CLIPCHILDREN|WS_CLIPSIBLINGS,
            0,0,0,0,
            GetDesktopWindow(),
            NULL,
            hMainInstance,
            NULL
            );
    }
    Desk_new_background(NULL);
}
예제 #2
0
BOOL BBRegisterClass (WNDCLASS *pWC)
{
	if (RegisterClass(pWC)) return 1;
	BBMessageBox(MB_OK, NLS2("$BBError_RegisterClass$",
							 "Error: Could not register \"%s\" window class."), pWC->lpszClassName);
	return 0;
}
예제 #3
0
BOOL BBRegisterClass (const char *classname, WNDPROC wndproc, int flags)
{
    WNDCLASS wc;
    memset(&wc, 0, sizeof(wc));
    wc.hInstance = hMainInstance;
    wc.lpszClassName = classname;
    wc.lpfnWndProc = wndproc;
    if (flags & BBCS_VISIBLE) {
        wc.hCursor = LoadCursor(NULL, IDC_ARROW);
        wc.style |= CS_DBLCLKS;
    }
    if ((flags & BBCS_DROPSHADOW) && usingXP)
        wc.style |= CS_DROPSHADOW;
    if (flags & BBCS_EXTRA)
        wc.cbWndExtra = sizeof(void*);
    if (RegisterClass(&wc))
        return 1;
    BBMessageBox(MB_OK, NLS2("$Error_RegisterClass$",
        "Error: Could not register \"%s\" window class."), classname);
    return 0;
}
예제 #4
0
// --------------------------------------------
void Desk_Init(void)
{
    set_focus_model(Settings_focusModel);

    if (Settings_desktopHook || dont_hide_explorer)
    {
        DestopHookInstance = LoadLibrary("DesktopHook");
        *(FARPROC*)&pSetDesktopMouseHook = GetProcAddress(DestopHookInstance, "SetDesktopMouseHook" );
        *(FARPROC*)&pUnsetDesktopMouseHook = GetProcAddress(DestopHookInstance, "UnsetDesktopMouseHook" );
        if (pSetDesktopMouseHook)
            pSetDesktopMouseHook(BBhwnd, underExplorer);
        else
            BBMessageBox(MB_OK, NLS2("$BBError_DesktopHook$",
                "Error: DesktopHook.dll not found!"));
    }
    else
    {
        WNDCLASS wc;
        ZeroMemory(&wc, sizeof(wc));
        wc.hInstance = hMainInstance;
        wc.lpfnWndProc = Desk_WndProc;
        wc.lpszClassName = szDesktopName;
        wc.hCursor = LoadCursor(NULL, IDC_ARROW);
        wc.style = CS_DBLCLKS;

        BBRegisterClass(&wc);
        CreateWindowEx(
            WS_EX_TOOLWINDOW,
            szDesktopName,
            NULL,
            WS_CHILD|WS_VISIBLE|WS_CLIPCHILDREN|WS_CLIPSIBLINGS,
            0,0,0,0,
            GetDesktopWindow(),
            NULL,
            hMainInstance,
            NULL
            );
    }
    Desk_new_background();
}