Click to See Complete Forum and Search --> : I need also a Guru
Erick de la Torre
Aug 15th, 2000, 06:55 PM
Hy, If someone can help me to use the CreateWindowEx to create a window as same as internet (including buttons and menus in the window).
Thanks Everyone who read this message
If you want to create a "copy" of IE, why not just Shell it. It's much less time consuming.
Shell "C:\Program Files\Internet Explorer\Iexplore.exe", vbNormalFocus
Erick de la Torre
Aug 15th, 2000, 07:28 PM
Originally posted by Erick de la Torre
Hy, If someone can help me to use the CreateWindowEx to create a window as same as internet (including buttons and menus in the window).
Thanks Everyone who read this message
Thanks Megatron, but i need to constuct a window not exactly like internet, because the buttons have others uses, i have already edited all the buttons, but i don't know hwo to insert it and the menu into the Window.
Maybe you know how to do that?
Thanks for everything
Erick: You can use the AppendMenu API to add to a menu. If you decide to use CreateWindowEx, then change the hwnd (marked in bold) to the hWnd of your App.
Private Declare Function AppendMenu Lib "user32" Alias "AppendMenuA" (ByVal hMenu As Long, ByVal wFlags As Long, ByVal wIDNewItem As Long, ByVal lpNewItem As Any) As Long
Private Declare Function GetMenu Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function GetSubMenu Lib "user32" (ByVal hMenu As Long, ByVal nPos As Long) As Long
Private Declare Function GetMenuItemCount Lib "user32" (ByVal hMenu As Long) As Long
Private Declare Function CreateMenu Lib "user32" () As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Const MF_STRING = &H0&
Private Sub Command1_Click()
Dim hMenu As Long
Dim hSubMenu As Long
Dim hApp As Long
hMenu = GetMenu(hwnd)
hSubMenu = GetSubMenu(hMenu, 0)
icount = GetMenuItemCount(hMenu)
AppendMenu hSubMenu, MF_STRING, icount + 1, "Hello"
End Sub
Sam Finch
Aug 15th, 2000, 08:36 PM
Why don't you just use the Webbrowser control to create your own browser, then shell that, rather than trying to alter IE through some hard hacking.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.