Results 1 to 5 of 5

Thread: I need also a Guru

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2000
    Location
    México, D.F.
    Posts
    64

    Unhappy

    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

  2. #2
    Guest
    If you want to create a "copy" of IE, why not just Shell it. It's much less time consuming.

    Code:
    Shell "C:\Program Files\Internet Explorer\Iexplore.exe", vbNormalFocus

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2000
    Location
    México, D.F.
    Posts
    64

    Talking

    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


  4. #4
    Guest
    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.
    Code:
    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

  5. #5
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width