Exemple #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);
}
Exemple #2
0
//===========================================================================
int beginToolbar(HINSTANCE hi)
{
    if (Toolbar_hwnd)
        return 1;

    memset(&Toolbar_Button[0], 0, sizeof(Toolbar_Button));
    Toolbar_ShowingExternalLabel = false;
    Toolbar_CurrentWindow[0] =
    Toolbar_CurrentTime[0] =
    Toolbar_WorkspaceName[0] = 0;

    memset(&TBInfo, 0, sizeof TBInfo);
    if (false == Settings_toolbar.enabled)
    {
        Toolbar_UpdatePosition();
        return 0;
    }

    BBRegisterClass(Toolbar_ClassName, Toolbar_WndProc, BBCS_VISIBLE);
    CreateWindowEx(
        WS_EX_TOOLWINDOW,
        Toolbar_ClassName,      // window class name
        NULL, //"BBToolbar",    // window title
        WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
        0,0,0,0,
        NULL,                   // parent window
        NULL,                   // no menu
        hMainInstance,          // module handle
        NULL                    // init params
        );
    return 0;
}
Exemple #3
0
//===========================================================================
int beginToolbar(HINSTANCE hi)
{
	if (Toolbar_hwnd) return 1;

	ZeroMemory(&Toolbar_Button[0], sizeof(Toolbar_Button));
	Toolbar_ShowingExternalLabel = false;
	Toolbar_CurrentWindow[0] =
		Toolbar_CurrentTime[0] =
			Toolbar_WorkspaceName[0] = 0;

	ZeroMemory(&TBInfo, sizeof TBInfo);
	if (false == Settings_toolbarEnabled)
	{
		Toolbar_UpdatePosition();
		return 0;
	}

	WNDCLASSEX wc;
	// Register our window class
	ZeroMemory(&wc,sizeof(wc));
	wc.lpfnWndProc      = Toolbar_WndProc;
	wc.hInstance        = hMainInstance;
	wc.lpszClassName    = Toolbar_ClassName;
	wc.hCursor          = LoadCursor(NULL, IDC_ARROW);
	wc.style            = CS_DBLCLKS;

	if (!BBRegisterClass(&wc))
		return 1;

	CreateWindowEx(
		WS_EX_TOOLWINDOW,//|WS_EX_ACCEPTFILES, // exstyles
		Toolbar_ClassName,              // window class name
		NULL, //_T("BBToolbar"),                    // window title
		WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
		0,0,0,0,
		NULL,                           // parent window
		NULL,                           // no menu
		hMainInstance,                  // module handle
		NULL                            // init params
		);

	return 0;
}
Exemple #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();
}