🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: API Access ToolBarWindow32 object

#5366
From: Eangelo
Date: Wed, 07 Sep 2005 14:18
57 lines
2468 bytes
Thank you for the answer!

In order to programmatically click, in my IE5 program,  the "previous page"
ToolbarWindow32
button, I tried the following code (OS XP Pro, Compiler BCB6):

int e, Idx;
HWND TBWin32_Handle;
TBBUTTON TB_Data;

  // ... ToolbarWindow32 code searching ...

  Idx = 0;

  e = SendMessage(TBWin32_Handle, TB_GETBUTTON, Idx, (LPARAM)&TB_Data);

  if  (e)
  {
       SendMessage(TBWin32_Handle, TB_PRESSBUTTON, TB_Data.idCommand,
(LPARAM)true);
       SendMessage(TBWin32_Handle, TB_PRESSBUTTON, TB_Data.idCommand,
(LPARAM)false);
  }

but nothing happened in my IE5 program (I also tried with "Idx" ranging from
0 to the value-1 provvided by TB_BUTTONCOUNT).

Is my code wrong?

Thank again for your attention.

Henry


"Remy Lebeau (TeamB)" <no.spam@no.spam.com> ha scritto nel messaggio
news:431e07eb$1@newsgroups.borland.com...
>
> "Eangelo" <eangelo@libero.it> wrote in message
> news:431de643@newsgroups.borland.com...
>
> > I tried to use "EnumChildWindows" function again in order to access the
> > ToolBarWindow32 sub-elements, but the "EnumChildWindows" function
> > did not provide additional info.
>
> That is because the buttons are not child windows.
>
> > Is there an API to be used to achieve such a task?
>
> There is a whole chapter in the Win32 API documentation on working with
> ToolBar controls.  Please read the documentation.  Specifically, look at
the
> TB_BUTTONCOUNT, TB_GETBUTTON, and TB_PRESSBUTTON messages.
>
>
> Gambit
>
>
Technical Details
Message-ID: <431ef67c@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <431de643@newsgroups.borland.com> <431e07eb$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,25927713f6122048
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Eangelo" <eangelo@libero.it>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <431de643@newsgroups.borland.com> <431e07eb$1@newsgroups.borland.com>
Subject: Re: API Access ToolBarWindow32 object
Date: Wed, 7 Sep 2005 16:18:30 +0200
Lines: 60
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 151.24.65.36
Message-ID: <431ef67c@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1126102652 151.24.65.36 (7 Sep 2005 07:17:32 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail