Click here to Skip to main content
16,005,236 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Read This Pin
John R. Shaw23-Nov-03 17:44
John R. Shaw23-Nov-03 17:44 
GeneralRe: Read This Pin
David Crow24-Nov-03 2:48
David Crow24-Nov-03 2:48 
GeneralRe: Read This Pin
John R. Shaw24-Nov-03 5:46
John R. Shaw24-Nov-03 5:46 
Generalabout compilers! Pin
shaddonah23-Nov-03 16:02
shaddonah23-Nov-03 16:02 
GeneralRe: about compilers! Pin
Hadi Rezaee23-Nov-03 17:19
Hadi Rezaee23-Nov-03 17:19 
GeneralRe: about compilers! Pin
shaddonah27-Nov-03 9:01
shaddonah27-Nov-03 9:01 
GeneralMFC Menu Graying. Pin
kiasu_kid23-Nov-03 14:44
kiasu_kid23-Nov-03 14:44 
GeneralRe: MFC Menu Graying. Pin
Terry O'Nolley23-Nov-03 14:49
Terry O'Nolley23-Nov-03 14:49 
Try using the method EnableMenuItem() with nEnable set to MF_GRAYED.

From the docs:
=============================
CMenu::EnableMenuItem
UINT EnableMenuItem( UINT nIDEnableItem, UINT nEnable );

MF_GRAYED Disables the menu item so that it cannot be selected and dims it.
=============================

For this to work, you'll need to use CMenu classes for your menus and not just resource menus.

If you don't want to use CMenu, then you can gray menus by using the SDK call EnableMenuItem:


=============================
The EnableMenuItem function enables, disables, or grays the specified menu item.

BOOL EnableMenuItem(
HMENU hMenu, // handle to menu
UINT uIDEnableItem, // menu item to enable, disable, or gray
UINT uEnable // menu item flags
);
=============================



GeneralRe: MFC Menu Graying. Pin
kiasu_kid23-Nov-03 14:59
kiasu_kid23-Nov-03 14:59 
GeneralRe: MFC Menu Graying. Pin
John R. Shaw23-Nov-03 15:59
John R. Shaw23-Nov-03 15:59 
GeneralRe: MFC Menu Graying. Pin
kiasu_kid23-Nov-03 18:26
kiasu_kid23-Nov-03 18:26 
GeneralRe: MFC Menu Graying. Pin
jbarton24-Nov-03 3:18
jbarton24-Nov-03 3:18 
Questionhow could i draw an irregular dialog according to an image Pin
ttemp200223-Nov-03 14:26
ttemp200223-Nov-03 14:26 
AnswerRe: how could i draw an irregular dialog according to an image Pin
Prakash Nadar23-Nov-03 16:41
Prakash Nadar23-Nov-03 16:41 
AnswerRe: how could i draw an irregular dialog according to an image Pin
John R. Shaw23-Nov-03 16:57
John R. Shaw23-Nov-03 16:57 
GeneralSetWindowLong indicates blocked thread. Pin
suninwater23-Nov-03 13:42
suninwater23-Nov-03 13:42 
GeneralRe: SetWindowLong indicates blocked thread. Pin
Prakash Nadar23-Nov-03 16:47
Prakash Nadar23-Nov-03 16:47 
GeneralCreateDIBSection Pin
John R. Shaw23-Nov-03 12:58
John R. Shaw23-Nov-03 12:58 
GeneralRe: CreateDIBSection Pin
Terry O'Nolley23-Nov-03 13:24
Terry O'Nolley23-Nov-03 13:24 
GeneralRe: CreateDIBSection Pin
John R. Shaw23-Nov-03 14:14
John R. Shaw23-Nov-03 14:14 
GeneralRe: CreateDIBSection Pin
Terry O'Nolley23-Nov-03 14:42
Terry O'Nolley23-Nov-03 14:42 
GeneralRe: CreateDIBSection Pin
John R. Shaw23-Nov-03 15:35
John R. Shaw23-Nov-03 15:35 
GeneralModifying MFC document data Pin
aboutQ23-Nov-03 12:45
aboutQ23-Nov-03 12:45 
GeneralRe: Modifying MFC document data Pin
John R. Shaw23-Nov-03 13:25
John R. Shaw23-Nov-03 13:25 
GeneralRe: Modifying MFC document data Pin
Terry O'Nolley23-Nov-03 14:45
Terry O'Nolley23-Nov-03 14:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.