How is a window like the MS OFFICE Suite Tools Bar created?

This is a discussion on How is a window like the MS OFFICE Suite Tools Bar created? within the Windows Programming forums, part of the Platform Specific Boards category; Hi There, How is a window like the MS OFFICE Suite Tools Bar created at the right side of the ...

  1. #1
    wow
    wow is offline
    Registered User
    Join Date
    Oct 2005
    Posts
    42

    How is a window like the MS OFFICE Suite Tools Bar created?

    Hi There,

    How is a window like the MS OFFICE Suite Tools Bar created at the right side of the windows desktop? For this kind of window, all other windows always are laid out side by side with it even if other windows are maximized. It keeps not overlapped by them.
    This kind of windows not just defines its own behaviours, but also changes other windows' too. It likes very much the windows TASK BAR.

    Thanks,

  2. #2
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544

  3. #3
    wow
    wow is offline
    Registered User
    Join Date
    Oct 2005
    Posts
    42
    Yes, It is. Thanks a lot.
    When I read the article, I find it is a little difficult to follow. I copy the example in it below.
    1. How is APPBAR_CALLBACK defined?
    // Provide an identifier for notification messages.
    abd.uCallbackMessage = APPBAR_CALLBACK;
    Can somebody show an example?
    Or is another fragment AppBarCallback in the article the one? But when I compile it, I got the following error:

    error C2440: '=' : cannot convert from 'void (__cdecl *)(struct HWND__ *,unsigned int,long)' to 'unsigned int'

    2. Is hwndAccessBar IN parameter or OUT?
    3. Where are the following variables defined?
    UINT g_uSide ?
    BOOL g_fAppRegistered?

    Code:
    // RegisterAccessBar - registers or unregisters an appbar. 
    // Returns TRUE if successful, or FALSE otherwise. 
    // hwndAccessBar - handle to the appbar 
    // fRegister - register and unregister flag 
    // 
    // Global variables 
    //     g_uSide - screen edge (defaults to ABE_TOP) 
    //     g_fAppRegistered - flag indicating whether the bar is registered 
    
    BOOL RegisterAccessBar(HWND hwndAccessBar, BOOL fRegister) 
    { 
        APPBARDATA abd; 
    
        // Specify the structure size and handle to the appbar. 
        abd.cbSize = sizeof(APPBARDATA); 
        abd.hWnd = hwndAccessBar; 
    
        if (fRegister) { 
    
            // Provide an identifier for notification messages. 
            abd.uCallbackMessage = APPBAR_CALLBACK; 
    
            // Register the appbar. 
            if (!SHAppBarMessage(ABM_NEW, &abd)) 
                return FALSE; 
    
            g_uSide = ABE_TOP;       // default edge 
            g_fAppRegistered = TRUE; 
    
        } else { 
    
            // Unregister the appbar. 
            SHAppBarMessage(ABM_REMOVE, &abd); 
            g_fAppRegistered = FALSE; 
        } 
    
        return TRUE; 
    
    }
    Thanks,

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. docking bar for window desktop screen
    By sgh in forum Windows Programming
    Replies: 3
    Last Post: 04-29-2008, 02:14 AM
  2. Adding buttons, edit boxes, etc to the window
    By rainmanddw in forum Windows Programming
    Replies: 1
    Last Post: 04-10-2006, 03:07 PM
  3. Why only 32x32? (OpenGL) [Please help]
    By Queatrix in forum Game Programming
    Replies: 2
    Last Post: 01-23-2006, 01:39 PM
  4. Outputting String arrays in windows
    By Xterria in forum Game Programming
    Replies: 11
    Last Post: 11-13-2001, 06:35 PM
  5. Status bar covering parent window....by the way, thanks Ward
    By Unregistered in forum Windows Programming
    Replies: 1
    Last Post: 10-02-2001, 08:16 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21