This DLL acts to make the menu more beautiful. The way it works is based on the existent menu and you will find it quite convenient to use it.
Characteristics
1) The code completely depends on the existent MENUITEMINFO structure and didn't allocate any structure array that store item info at all.
2) Cool and cute outlook. User can specify menu style (about 40 items) as free as possible. It supports gradient fill, alpha blend, 32-bits bitmap.
3) Easy way when use, you only need to invoke three functions, and then all is OK!
4) Pocket library file size.
Compiler
PureBasic 4.20
Quick guide
1) There are three kinds of Demo Codes such as Visual C++ 6.0, Visual Basic 6.0 and PureBasic in the folder "Demo Code", you can refer to them respectively.
2) First step, invoke AssignOwnerDraw(HMENU hMenu, UINT fSubIncluded). This function will set MFT_OWNERDRAW flag to each item of hMenu. You can invoke this function as soon as the menu is either loaded or created, and you can also invoke it later in WM_INITMENU/WM_INITMENUPOPUP message instantly. And next step, invoke MeasureItem(LPMEASUREITEMSTRUCT lpmis) and DrawItem(LPDRAWITEMSTRUCT lpdis) in WM_MEASUREITEM and WM_DRAWITEM message respectively.
3) Menu style was initialized according to system menu style as default when the library is newly loaded by a process. To realize other styles, another two functions GetMenuStyle(LPMENUSTYLE lpms) and SetMenuStyle(LPMENUSTYLE lpms) are needed. By set each property a proper value with the powerful couple, not only can the library imitate other software's menu appearance, but also it can show particular appearance as your wish.
4) Please refer to help documentation for details of use.
Note
For the sake of good compatibility, the library was compiled with UNICODE.
You shouldn't invoke any of the functions until the menu was either loaded or created.
The icon (a bitmap essentially) lacated on the left side of the menu item and item bitmap need to be specified by invoking API SetMenuItemInfo(). Note that the member hbmpChecked, hbmpUnchecked and hbmpItem of MENUITEMINFO structure accept BITMAP handle only! Dont't try to specify any other handles such as an icon handle.
The last member of MENUITEMINFO should be hbmpItem, or there would be some problems.
It is not API LoadBitmap() but LoadImage() should you invoke when you are loading a bitmap. By adding a flag LR_CREATEDIBSECTION, the function will load the bitmap as a DIB rather than a compatible bitmap to the screen color depth. The purpose is to ensure that 32-bits bitmap be recognised and displayed correctly.
Contact author
migiwa@yahoo.com.cn
Snapshot
Office

3D

Aero

Gradient

Download
http://www.live-share.com/files/381169/ ... L.rar.html