News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Complete customization of the Windows menu

Started by %INVOKE, August 10, 2009, 02:07:07 PM

Previous topic - Next topic

%INVOKE

Hello to all the Forum.  :clap:
You have patience are of Italian language!  :red
I wanted to wonder as I can personalize a Menu Windows Standard, comprised the Menu of Heading.
You help me.  :dazzled:



dedndave

you may be in luck - Jochen may speak some Italiano
but, we have members from many countries
welcome to the forum

%INVOKE



hutch--

Tell me if this is a programming issue or not, this is an assembler language programmers forum, not a consumer market "how do you fix Windows" venue.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

%INVOKE

Sorry I have not explained properly!
I try to access to a menu's application developed in MASM32 using WinAPI events WM_MEASUREITEM and WM_DRAWITEM but
in this way I can modify only popup menu relative to principal menu not the Principal Menu who I want change property.
How I can use API to modify the property of a Principal Menu ?


akane

Hello Brains,
Get your start point in your resource editor - set menu resource type to MENUEX instead just MENU, so you will be able to assign ID's to any item:IDR_MAINMENU MENUEX
BEGIN
  POPUP "File",10000 // <- popup should have an ID
  BEGIN
    MENUITEM "Open page ...",IDM_OPENPAGE
    MENUITEM "Fill Register Form",IDM_FILLFORM
  END

Step two. You know how to handle WM_MEASUREITEM and WM_DRAWITEM, so after this modification you'll receive these messages for File, Edit, View... menu 'buttons'.
Step three - the menubar background color. Use SetMenuInfo api to change it. Set your brush in MENUINFO.hbrBack - it can be a solid, or a pattern (bitmap) brush.

If this is still not enough, you can always implement your menu as a toolbar control with popup menus, like in Internet Explorer. Such menu can be positioned anywhere in the window.
Creating an Internet Explorer-style Toolbar

BATSoftware

As the previous poster outlined in some detail, research "Owner-drawn menus". Infact I wrote a couple of routines in MASM32 that will draw a UNICODE menu in any language on any post Win95 OS using just the basic API/messages function illuded in the previous post. Infact the best resource for truely understanding the REAL working of WINAPI is to get a copy of the Visual Studio 6A/B MSDN help files. Creative research on the Pirate Bay maybe fruitful. Remeber, .NET is for .NOOBS.