From: Leo on 7 Jul 2010 09:55 Is it possible to create an ie style Menu bar using a either a hybrid of api and common controls ocx or pure api? here is the code I have tried to use: You will need one common controls 5 ToolBar on the form. Option Explicit Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Private Declare Function RegisterWindowMessage Lib "user32" Alias "RegisterWindowMessageA" (ByVal lpString As String) As Long Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Private Const GWL_STYLE = (-16) Private Const BTNS_DROPDOWN = &H8 Private Const TBSTYLE_DROPDOWN = &H8 Private Const TBSTYLE_LIST = &H1000 Private Const TB_ADDBUTTONS = (&H400 + 20) Private Const I_IMAGENONE = (-2) Private Const TBSTATE_ENABLED = &H4 Private Const WM_USER = &H400 Private Type TBBUTTON lbitmap As Long ldCommand As Long fsState As Byte fsStyle As Byte iData As Integer lString As Long End Type Private TB_BUTTONSTRUCTSIZE As Long Private Sub Form_Initialize() TB_BUTTONSTRUCTSIZE = RegisterWindowMessage("TB_BUTTONSTRUCTSIZE") Dim lOldToolBarLong As Long lOldToolBarLong = GetWindowLong(Toolbar1.hwnd, GWL_STYLE) SetWindowLong Toolbar1.hwnd, GWL_STYLE, lOldToolBarLong + BTNS_DROPDOWN + TBSTYLE_LIST + TBSTYLE_DROPDOWN Dim btnFile As TBBUTTON With btnFile .lbitmap = I_IMAGENONE .ldCommand = 1 .fsState = TBSTATE_ENABLED .iData = 1 .lString = StrPtr("File") End With SendMessage Toolbar1.hwnd, TB_BUTTONSTRUCTSIZE, Len(btnFile), 0 SendMessage Toolbar1.hwnd, TB_ADDBUTTONS, 1, btnFile End Sub -- ClassicVB Users Regroup! comp.lang.basic.visual.misc Free usenet access at http://www.eternal-september.org
From: Dee Earley on 7 Jul 2010 09:59 On 07/07/2010 14:55, Leo wrote: > Is it possible to create an ie style Menu bar using a either a hybrid of > api and common controls ocx or pure api? Yes. There used to be an in depth MSDN 2000 article explaining it from the IE5 days. -- Dee Earley (dee.earley(a)icode.co.uk) i-Catcher Development Team iCode Systems (Replies direct to my email address will be ignored. Please reply to the group.)
From: Robert on 10 Jul 2010 09:12 On Wed, 07 Jul 2010 14:59:37 +0100, Dee Earley <dee.earley(a)icode.co.uk> wrote: >Yes. There used to be an in depth MSDN 2000 article explaining it from >the IE5 days. This one? http://www.microsoft.com/msj/0199/c/c0199.aspx
From: Dee Earley on 12 Jul 2010 04:55 On 10/07/2010 14:12, Robert wrote: > On Wed, 07 Jul 2010 14:59:37 +0100, Dee Earley > <dee.earley(a)icode.co.uk> wrote: > >> Yes. There used to be an in depth MSDN 2000 article explaining it from >> the IE5 days. > > > This one? > > http://www.microsoft.com/msj/0199/c/c0199.aspx Possibly, the content looks about right. -- Dee Earley (dee.earley(a)icode.co.uk) i-Catcher Development Team iCode Systems (Replies direct to my email address will be ignored. Please reply to the group.)
|
Pages: 1 Prev: count colors in bitmap Next: problem emailing attachment with COD method |