🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
11 messages
11 total messages Started by bar Sat, 09 Jun 2007 17:02
AppBar
#1945
Author: bar
Date: Sat, 09 Jun 2007 17:02
25 lines
1668 bytes
Hello all
I created a AppBar under BCB 6.0

in private section of header file
        APPBARDATA abd;
================
        abd.cbSize = sizeof(abd);
        abd.hWnd = Handle;
        abd.uCallbackMessage = WM_ABNOTIFY;

        SHAppBarMessage(ABM_NEW, &abd);

        abd.uEdge=ABE_TOP;

        SetRect(&abd.rc,0,0,Screen->Width,Screen->Height);
        SHAppBarMessage(ABM_QUERYPOS,&abd);
        abd.rc.bottom=abd.rc.top+30;
        SHAppBarMessage(ABM_SETPOS,&abd);

        SetWindowPos(abd.hWnd,HWND_TOPMOST,abd.rc.left,abd.rc.top,
            abd.rc.right-abd.rc.left,abd.rc.bottom-abd.rc.top,
            SWP_NOMOVE | SWP_NOSIZE);

I placed a form in this area.
How can i implement the auto hide functionality to this form. 
Re: AppBar
#1820
Author: Remy Lebeau (TeamB)
Date: Mon, 11 Jun 2007 16:41
10 lines
1029 bytes
"bar" <shaikakbar250281@yahoo.co.in> wrote in message
news:466add0d@newsgroups.borland.com...

> How can i implement the auto hide functionality to this form.

Look at the ABM_SETAUTOHIDEBAR appbar message.


Gambit
Re: AppBar
#1824
Author: bar
Date: Tue, 12 Jun 2007 09:58
16 lines
1150 bytes
Hello Remy

In the HIDE button i placed the code.

abd.cbSize = sizeof(abd);
abd.hWnd = frmMain->Handle;
abd.uEdge=ABE_TOP;
abd.lParam = true;

SHAppBarMessage(ABM_SETAUTOHIDEBAR, &abd)

Any wrong with this code.
The function is returning true but no output.

Thanks
SA 
Re: AppBar
#1832
Author: Bob Gonder
Date: Tue, 12 Jun 2007 15:38
15 lines
1464 bytes
bar wrote:

>SHAppBarMessage(ABM_SETAUTOHIDEBAR, &abd)
>
>Any wrong with this code.

Are you also doing all the functions in your first message?

>The function is returning true but no output.

What "output" were you expecting?

I would also point out (this shouldn't be a problem) 
>abd.lParam = true;
that "true" is a C++ value while "TRUE" is a WinApi value.
Re: AppBar
#1838
Author: bar
Date: Tue, 12 Jun 2007 17:50
20 lines
1512 bytes
Hello Bob Gonder
> Are you also doing all the functions in your first message?

yes

>>The function is returning true but no output.
>
> What "output" were you expecting?

The space occupied by appbar is not going to the screen edge, the form is 
still visible completely.

> I would also point out (this shouldn't be a problem)
>>abd.lParam = true;
> that "true" is a C++ value while "TRUE" is a WinApi value.

I tried by assigning TRUE but no result.

Thanks
SA 
Re: AppBar
#1840
Author: Bob Gonder
Date: Wed, 13 Jun 2007 16:33
19 lines
1764 bytes
bar wrote:

>> What "output" were you expecting?
>
>The space occupied by appbar is not going to the screen edge, the form is 
>still visible completely.

Well, you are telling it to be top-most with your setwindowpos
MS says to use MoveWindow during the startup code, and SetWinfowPos in
response to hiding/showing.
You might try changing to MoveWindow, if that doesn;t work, maybe
using HWND_BOTTOM for the inital position.

Using Application Desktop Toolbars
http://msdn2.microsoft.com/en-us/library/aa969323.aspx

Are you processing the windows messages WM_ABNOTIFY and checking for
the sub-messages?
Also  WM_ACTIVATE   WM_WINDOWPOSCHANGED 
Re: AppBar
#1775
Author: bar
Date: Sun, 17 Jun 2007 17:09
27 lines
1977 bytes
> Well, you are telling it to be top-most with your setwindowpos
> MS says to use MoveWindow during the startup code, and SetWinfowPos in
> response to hiding/showing.
> You might try changing to MoveWindow, if that doesn;t work, maybe
> using HWND_BOTTOM for the inital position.
>
> Using Application Desktop Toolbars
> http://msdn2.microsoft.com/en-us/library/aa969323.aspx

Hello Bob Gonder thanks for the reply.

In the intial startup code i have

SetWindowPos(abd.hWnd,HWND_BOTTOM,abd.rc.left,abd.rc.top,
            abd.rc.right-abd.rc.left,abd.rc.bottom-abd.rc.top,
            SWP_NOMOVE | SWP_NOSIZE);

        MoveWindow(abd.hWnd,abd.rc.left,abd.rc.top,
                                abd.rc.right-abd.rc.left,
                                abd.rc.bottom-abd.rc.top,TRUE);


> Are you processing the windows messages WM_ABNOTIFY and checking for
> the sub-messages?
> Also  WM_ACTIVATE   WM_WINDOWPOSCHANGED
>
No. 
Re: AppBar
#1776
Author: Bob Gonder
Date: Sun, 17 Jun 2007 22:26
17 lines
1806 bytes
bar wrote:

>> Using Application Desktop Toolbars
>> http://msdn2.microsoft.com/en-us/library/aa969323.aspx
>
>SetWindowPos(abd.hWnd,HWND_BOTTOM,abd.rc.left,abd.rc.top,
>            abd.rc.right-abd.rc.left,abd.rc.bottom-abd.rc.top,
>            SWP_NOMOVE | SWP_NOSIZE);

That's an awful lot of code just to set the z order.

I think you should just start over with the code shown in the link I
gave last time.
The first 2 routines show how to set it up.

The last 2 are probably for non-autohide bars, but you might add those
in as well.
Re: AppBar
#1777
Author: bar
Date: Mon, 18 Jun 2007 08:08
6 lines
1266 bytes
> The last 2 are probably for non-autohide bars, but you might add those
> in as well.

Can you pls give detail about the routines or a snip of code.
Thanks
SA 
Re: AppBar
#1780
Author: Bob Gonder
Date: Mon, 18 Jun 2007 22:18
12 lines
1550 bytes
bar wrote:

>Can you pls give detail about the routines

What detail do you need?
The code is commented.
The documentation for the calls and parameters are only a few clicks
away.

> or a snip of code.

The code is in the link
Re: AppBar
#1784
Author: bar
Date: Tue, 19 Jun 2007 15:35
12 lines
1585 bytes
The code used to hide the appbar.

                abd.uEdge = ABE_TOP;
                abd.lParam = TRUE;
                abd.cbSize = sizeof(abd);
                abd.hWnd = frmMain->Handle;

                SHAppBarMessage(ABM_SETAUTOHIDEBAR, &abd);

The function is returning true but appbar is still visible.
Thanks
SA 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads