Thread View: borland.public.cppbuilder.nativeapi
7 messages
7 total messages
Started by PaoloItaly
Fri, 20 Jun 2008 15:28
windows taskbar button
Author: PaoloItaly
Date: Fri, 20 Jun 2008 15:28
Date: Fri, 20 Jun 2008 15:28
3 lines
953 bytes
953 bytes
How to add/remove buttons on windows taskbar? Thanks in advance
Re: windows taskbar button
Author: Remy Lebeau (TeamB)
Date: Fri, 20 Jun 2008 16:28
Date: Fri, 20 Jun 2008 16:28
14 lines
1296 bytes
1296 bytes
"PaoloItaly" <paolot@sirius-es.it> wrote in message news:485bccb4$1@newsgroups.borland.com... > How to add/remove buttons on windows taskbar? The only way is to create/destroy top-level, unowned, WS_EX_APPWINDOW windows. You need to be a little more specific about your needs if you want more help. Gambit
Re: windows taskbar button
Author: PaoloItaly
Date: Mon, 23 Jun 2008 08:32
Date: Mon, 23 Jun 2008 08:32
45 lines
2110 bytes
2110 bytes
> The only way is to create/destroy top-level, unowned, WS_EX_APPWINDOW
> windows.
My code:
void __fastcall TFormShowWindow::CreateParams(TCreateParams &Params)
{
TForm::CreateParams(Params);
Params.ExStyle |= WS_EX_APPWINDOW;
}
void __fastcall TFormShowWindow::NewWindowProc(TMessage &Msg)
{
switch(Msg.Msg)
{
case WM_EXITSIZEMOVE:
if (Parent == parent)
{
BorderStyle = bsSizeable;
Parent = NULL;
Top = ptCurrent.y;
Left = ptCurrent.x;
Width = Width - 20;
Height = Height - 20;
}
else
{
BorderStyle = bsToolWindow;
Top = parent->ClientRect.Top;
Left = parent->ClientRect.Left;
Width = parent->ClientRect.Right;
Height = parent->ClientRect.Bottom;
Parent = parent;
}
break;
}
}
The problem is that when i set Parent to NULL, the taskbar is updated but
the
ALT-TAB selection i can't find it, and the main form can't raise to the top.
Thanks for Your help
Ciao
Re: windows taskbar button
Author: Remy Lebeau (TeamB)
Date: Mon, 23 Jun 2008 16:40
Date: Mon, 23 Jun 2008 16:40
22 lines
1699 bytes
1699 bytes
"PaoloItaly" <paolot@sirius-es.it> wrote in message
news:485f5fb8$1@newsgroups.borland.com...
> void __fastcall TFormShowWindow::CreateParams(TCreateParams &Params)
> {
> TForm::CreateParams(Params);
> Params.ExStyle |= WS_EX_APPWINDOW;
> }
In order for such a window to appear on the Taskbar, you need to change the
parent window to be the Desktop as well, ie:
void __fastcall TFormShowWindow::CreateParams(TCreateParams &Params)
{
TForm::CreateParams(Params);
Params.ExStyle |= WS_EX_APPWINDOW;
Params.WndParent = ::GetDesktopWindow(); // <-- add this
}
Gambit
Re: windows taskbar button
Author: PaoloItaly
Date: Tue, 24 Jun 2008 10:47
Date: Tue, 24 Jun 2008 10:47
15 lines
1744 bytes
1744 bytes
> In order for such a window to appear on the Taskbar, you need to change
> the parent window to be the Desktop as well, ie:
>
> void __fastcall TFormShowWindow::CreateParams(TCreateParams &Params)
> {
> TForm::CreateParams(Params);
> Params.ExStyle |= WS_EX_APPWINDOW;
> Params.WndParent = ::GetDesktopWindow(); // <-- add this
> }
>
I'm trying to undock/dock a form on a tabsheet, with messages
WM_ENTERSIZEMOVE, WM_EXITSIZEMOVE.
I succescfully undock/dock the form, but if i push the taskbar button of
MainForm, MainForm don't bring to front, i've to click the caption bar
or minimize undocked form to have focus.
Re: windows taskbar button
Author: Remy Lebeau (TeamB)
Date: Tue, 24 Jun 2008 16:19
Date: Tue, 24 Jun 2008 16:19
12 lines
1520 bytes
1520 bytes
"PaoloItaly" <paolot@sirius-es.it> wrote in message news:4860d0ea@newsgroups.borland.com... > I'm trying to undock/dock a form on a tabsheet I suggest using a TFrame for that instead. Put all of your controls onto a TFrame, and then put the TFrame onto a blank TForm when floating, and destroy the TForm and move the TFrame to the tabheet when docked. Gambit
Re: windows taskbar button
Author: PaoloItaly
Date: Wed, 25 Jun 2008 06:43
Date: Wed, 25 Jun 2008 06:43
8 lines
1400 bytes
1400 bytes
> I suggest using a TFrame for that instead. Put all of your controls onto > a TFrame, and then put the TFrame onto a blank TForm when floating, and > destroy the TForm and move the TFrame to the tabheet when docked. > > > Gambit Thanks
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