WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Samples from Users
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

IsMenuChecked and IsMnuEnabled WIL Extender Replacement Functions

Keywords: 	  IsMenuChecked and IsMnuEnabled

IsMenuChecked and IsMnuEnabled User-Defined WIL Extender Functions:

There should be 3 files in the following zip file.
	
     CDSWilEx.DLL - A WIL Extender containing functions.
     INJECTOR.DLL - Search engine.
     Readmefirst.txt
These functions are enhancements of IsMenuEnabled(). They were designed to work with third party applications. Both functions can find *almost* all menu item and report its status. There are some windows that do not return the correct value to identify their menus. An explanation of this matter is beyond the scope of this document.
Setup
=========

Use with Win95 and later, and WinNT 3.51 and later.

Place the DLL in your Windows System directory and/or your Winbatch\System directory.

WinNT - WINNT\SYSTEM32
Win95 - WINDOWS\SYSTEM

Update your WIL.CLR file with:

	IsMenuChecked=EXT
	IsMnuEnabled=EXT


Syntax
===========

BOOL IsMnuEnabled( hwnd, LPCSTR ) - This function reports if the supplied menu item name
is active or disabled. A fuzzy search is employed that will report on the menu item name that 
most resembles the name given by user.


BOOL IsMenuChecked( hwnd, LPCSTR ) - This function reports if the supplied menu item name
is checked or not. A fuzzy search is employed that will report on the menu item name that 
most resembles the name given by user. 


Example
===========

This example uses Microsoft WordPad.

	hWnd  = DLLhwnd("~WordPad")
	menu1 = IsMnuEnabled(hWnd,"Copy") 		; is this item enabled?
	menu2 = isMenuChecked(hWnd,"Status Bar")        ; is this item checked



Usage Notes
=============
1.  If a menu has more than one word, i.e., "Sort by Name", look for the placement of the accelerator
    key and add it to your string.

	Ex. Sort by Name -  N is underlined
	menu = isMnuChecked( hWnd, "Sort by &Name")

    Be sure to include the ampersand BEFORE the underlined character!

2.  Cascade menu items are not evaluated.

	Ex. OPTIONS
	    Print
            Edit
            SORT >Sort by Name
                  Sort by Date
                 
   In this example, "Options" nor "Sort" are not evaluated for enabled or check status.
   You can only look for the status of "Print", "Edit","Sort By Name", and "Sort by Date".
If, by some remote chance, it hiccups, email me, please. If there is something I overlooked I certainly would appreciate being made aware of it.
dsadler@centilliondata.com
If this program works, it was written by Derek Sadler. If not, I don't know who wrote it.

Download a copy from:

Cdswilex.zip

IsMnuEnabled, IsMenuChecked, Copyright (c) 1999. All rights reserved.

Article ID:   W14726
Filename:   IsMenuChecked and IsMnuEnabled.txt
File Created: 2019:08:14:09:27:32
Last Updated: 2019:08:14:09:27:32