πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
8 messages
8 total messages Started by Anders Johansen Sat, 18 Mar 2006 05:08
Disable hints on border icons - is that possible?
#4120
Author: Anders Johansen
Date: Sat, 18 Mar 2006 05:08
11 lines
1096 bytes
Hi,

I wonder if it is possible to disable hints on the "close", "minimize" etc. buttons
in the title bar of my app's window. 

I have experimented with various settings, and done quite a bit of googeling, but found
no solution so far. 

Sincerely,
  Anders 
Re: Disable hints on border icons - is that possible?
#4121
Author: Remy Lebeau (TeamB)
Date: Sat, 18 Mar 2006 08:52
12 lines
1257 bytes
"Anders Johansen" <home@dduck.dk> wrote in message
news:441ba3d9$1@newsgroups.borland.com...

> I wonder if it is possible to disable hints on the "close",
> "minimize" etc. buttons in the title bar of my app's window.

Doubtful.  Those buttons are created by, and controlled by, the OS itself,
not the application.


Gambit
Re: Disable hints on border icons - is that possible?
#4122
Author: Bob Gonder
Date: Sat, 18 Mar 2006 15:19
9 lines
1335 bytes
Anders Johansen wrote:

>I wonder if it is possible to disable hints on the "close", "minimize" etc. buttons
>in the title bar of my app's window. 

Is this a VCL application?
Do you want any hints in your application?
Can you turn off hints for the form(s)?
And just turn on hints for the items you want hinted?
Re: Disable hints on border icons - is that possible?
#4123
Author: Anders Johansen
Date: Sat, 18 Mar 2006 17:37
19 lines
1451 bytes
Bob Gonder <notbg@notmindspring.invalid> wrote:
>Anders Johansen wrote:
>
>>I wonder if it is possible to disable hints on the "close", "minimize" etc. buttons
>>in the title bar of my app's window. 
>
>Is this a VCL application?
>Do you want any hints in your application?
>Can you turn off hints for the form(s)?
>And just turn on hints for the items you want hinted?

Well, as Gambit comments I am talking abut the OS-managed buttons (maximize,
minimize, close), and I fear he might be correct that one can't get rid
of them :(

I'd love to be proven wrong though...

A
Re: Disable hints on border icons - is that possible?
#4124
Author: Bob Gonder
Date: Sun, 19 Mar 2006 19:13
10 lines
1382 bytes
Anders Johansen wrote:

>Well, as Gambit comments I am talking abut the OS-managed buttons (maximize,
>minimize, close), and I fear he might be correct that one can't get rid
>of them :(
>
>I'd love to be proven wrong though...

Do all applications (not just yours) on your computer have those
hints? None on mine do.
Re: Disable hints on border icons - is that possible?
#4127
Author: Regis St-Gelais
Date: Mon, 20 Mar 2006 12:35
16 lines
1560 bytes
"Anders Johansen" <home@dduck.dk> a οΏ½crit dans le message de news: 
441ba3d9$1@newsgroups.borland.com...
>
> I wonder if it is possible to disable hints on the "close", "minimize" 
> etc. buttons
> in the title bar of my app's window.
>

With OWL and OwlNext, you can do that by overriding EvNCHitTest

See http://personal.sirma.bg/Jogy/bcerrwow.html
Its a example of code that desable the tooltips for the system buttons.

-- 
Regis St-Gelais
www.laubrass.com 
Re: Disable hints on border icons - is that possible?
#4129
Author: Remy Lebeau (TeamB)
Date: Mon, 20 Mar 2006 18:57
98 lines
4215 bytes
"Regis St-Gelais" <regis.st-gelais@NOSPAMlaubrass.com> wrote in message
news:441ea195@newsgroups.borland.com...

> With OWL and OwlNext, you can do that by overriding EvNCHitTest

The equivilent in Win32 VCL would be to intercept the WM_NCHITTEST,
WM_NCLBUTTONUP, and WM_NCLBUTTONDOWN messages, ie:

    private:
        bool hitOK;
        int iLastHit;
        TPoint tpSave;

    void __fastcall TForm1::WndProc(TMessage &Message)
    {
        switch( Message.Msg )
        {
            case WM_NCHITTEST:
            {
                TForm::WndProc(Message);
                if( !hitOK )
                {
                    iLastHit = Message.Result;
                    tpSave = Point(LOWORD(Message.LParam),
HIWORD(Message.LParam));

                    if( (Message.Result == HTMAXBUTTON) || (Message.Result
== HTMINBUTTON) || (Message.Result == HTCLOSE) )
                    {
                        Message.Result = 32;
                        // 32 is a value that is not normally
                        // supported by Windows (0-21 are Windows values)
                        // Using it prevents the Windows tooltips from
displaying
                    }
                }
                break;
            }

            case WM_NCLBUTTONUP:
            {
                if( Message.WParam == 32 ) // If we hit one of the system
menu button
                {
                    //  We have been trapping hit test return values,
                    //  but now we need to activate one of the system menu
button
                    //  So, resend the last sequence of messages with hitOK
set to true
                    //  so the messages are processed normally
                    hitOK = true;
                    LPARAM lP = MAKELPARAM(tpSave.x, tpSave.y);
                    Perform(WM_NCHITTEST, 0, lP);
                    Perform(WM_NCMOUSEMOVE, iLastHit, lP);
                    Perform(WM_NCLBUTTONUP, iLastHit, lP);
                    hitOK = false;
                }
                else // Process normaly
                    TForm::WndProc(Message);

                break;
            }

            case WM_NCLBUTTONDOWN:
            {
                if( Message.WParam == 32) // If we hit one of the system
menu button
                {
                    //  We have been trapping hit test return values,
                    //  but now we need to activate one of the system menu
button
                    //  So, resend the last sequence of messages with hitOK
set to true
                    //  so the messages are processed normally
                    hitOK = true;
                    LPARAM lP = MAKELPARAM(tpSave.x, tpSave.y);
                    Perform(WM_NCHITTEST, 0, lP);
                    Perform(WM_NCMOUSEMOVE, iLastHit, lP);
                    PostMessage(Handle, WM_NCLBUTTONDOWN, iLastHit, lP);
                    hitOK = false;
                }
                else // Process normaly
                    TForm::WndProc(Message);

                break;
            }

            default:
            {
                TForm::WndProc(Message);
                break;
            }
        }
    }


Gambit
Re: Disable hints on border icons - is that possible?
#4069
Author: Anders Johansen
Date: Sat, 25 Mar 2006 14:23
19 lines
1432 bytes
"Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> wrote:
>
>"Regis St-Gelais" <regis.st-gelais@NOSPAMlaubrass.com> wrote in message
>news:441ea195@newsgroups.borland.com...
>
>> With OWL and OwlNext, you can do that by overriding EvNCHitTest
>
>The equivilent in Win32 VCL would be to intercept the WM_NCHITTEST,
>WM_NCLBUTTONUP, and WM_NCLBUTTONDOWN messages, ie:
>

Hi Gambit,

Once again you saved the day! I am continually astounded by your
capacity to pull this kind of thing off <:O

Sincerely,
  Anders
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