Re: How can get IE Menu and submenu ?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




"mehmet" <mehmet@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:378C47FE-C98A-476E-98B8-0D9B1FF85195@xxxxxxxxxxxxxxxx
Hi Everybody,
I am using the following code block with win32 api to access the IE menu
items.
1) EnumWindows (to get all desktop window handles)
2) GetClassName ( to get Explorer class id which is IEFrame )
3)GetMenu (to get menu handle of Explorer )
4)GetMenuItemCount (to get menu item number of Explorer. Returns 0)
5)GetSubMenu (to get sub menu handle of Explorer )
6)GetMenuItemCount (to get sub menu item number of Explorer. Returns
4294967295)

IE doesn't use standard menus.

I tested I am getting wright IE windows handle.
What is wrong with these code block ?
Also when I send SENDMESSAGE with wm_close to IE handle, it does not
respond. But when I send SENDMESSAGE with wm_destroy IE tries to close but
giving error message.
How can I control IE ?

Use PostMessage instead of SendMessage.

--

-GJC [MS Windows SDK MVP]
-Software Consultant (Embedded systems and Real Time Controls)
- http://www.mvps.org/ArcaneIncantations/consulting.htm
-gchanson@xxxxxxxx


.



Relevant Pages

  • Re: How can get IE Menu and submenu ?
    ... We need to control IE. ... 4)GetMenuItemCount (to get menu item number of Explorer. ... 6)GetMenuItemCount (to get sub menu item number of Explorer. ... Also when I send SENDMESSAGE with wm_close to IE handle, ...
    (microsoft.public.win32.programmer.kernel)
  • Forcing Explorer to close open windows in C#
    ... Is there any way to check for open Explorer windows and if any are found, ... I don't want a brute force method of ... SendMessage. ...
    (microsoft.public.dotnet.languages.csharp)