🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #8876

Re: How to disable Autoplay progammatically

#8876
From: Paolo Borlandi
Date: Tue, 14 Sep 2004 11:22
78 lines
2892 bytes
Sorry the  TForm::WndProc(Message); function call must be inserted in the
ELSE clause of previous IF.

Right version:

void __fastcall TFMain::WndProc(Messages::TMessage &Message)
{
UINT g_uQueryCancelAutoPlay = 0;

switch ( Message.Msg )
    {
    default:
        if (!g_uQueryCancelAutoPlay)
            {
            g_uQueryCancelAutoPlay =
RegisterWindowMessage(TEXT("QueryCancelAutoPlay"));
            }
        if ( Message.Msg && Message.Msg == g_uQueryCancelAutoPlay )
            {
            Message.Result = 1; // Disabilita Autoplay
            }
        else
            {
            TForm::WndProc(Message);
            }
        break;
    }
}



"Paolo Borlandi" <pborlandi@virgilio.it> ha scritto nel messaggio
news:4146d550@newsgroups.borland.com...
> Thank You, I got the solution:
>
> void __fastcall TFMain::WndProc(Messages::TMessage &Message)
> {
> UINT g_uQueryCancelAutoPlay = 0;
>
> switch ( Message.Msg )
>     {
>     default:
>         if (!g_uQueryCancelAutoPlay)
>             {
>             g_uQueryCancelAutoPlay =
> RegisterWindowMessage(TEXT("QueryCancelAutoPlay"));
>             }
>         if ( Message.Msg && Message.Msg == g_uQueryCancelAutoPlay )
>             {
>             Message.Result = 1; // Disable Autoplay
>             }
>         TForm::WndProc(Message);
>         break;
>     }
> }
>
>
>
>
>
> <Nihou Polska> ha scritto nel messaggio
> news:4146d207$1@newsgroups.borland.com...
> > And also how to enable programmatically and/or manually ?
> >
> > "Paolo Borlandi" <pborlandi@virgilio.it> wrote in message
> > news:4146d143@newsgroups.borland.com...
> > >
> > > I need to disable the autoplay funcion when my application runs. Have
> some
> > > ideas and examples? Thank You very MUCH!!!
> > >
> > > Paolo from Italy
> > >
> > >
> >
> >
>
>
Technical Details
Message-ID: <4146d690@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!transit.nntp.hccnet.nl!news.cambrium.nl!news.cambrium.nl!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4146d143@newsgroups.borland.com> <4146d207$1@newsgroups.borland.com> <4146d550@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,3cf0431a13b662fb
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Paolo Borlandi" <pborlandi@virgilio.it>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <4146d143@newsgroups.borland.com> <4146d207$1@newsgroups.borland.com> <4146d550@newsgroups.borland.com>
Subject: Re: How to disable Autoplay progammatically
Date: Tue, 14 Sep 2004 13:22:36 +0200
Lines: 80
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 212.31.242.133
Message-ID: <4146d690@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1095161488 212.31.242.133 (14 Sep 2004 04:31:28 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!transit.nntp.hccnet.nl!news.cambrium.nl!news.cambrium.nl!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail