Click here to Skip to main content
15,920,687 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: #pragma warning(disable:...) does not work? Pin
Bob Stanneveld6-Oct-04 9:30
Bob Stanneveld6-Oct-04 9:30 
QuestionWhat Windows Explorer stores in the lParam of TVITEM structure Pin
aldema6-Oct-04 6:26
aldema6-Oct-04 6:26 
AnswerRe: What Windows Explorer stores in the lParam of TVITEM structure Pin
Iain Clarke, Warrior Programmer6-Oct-04 6:54
Iain Clarke, Warrior Programmer6-Oct-04 6:54 
GeneralQuick Question... Pin
Nitron6-Oct-04 4:36
Nitron6-Oct-04 4:36 
GeneralRe: Quick Question... Pin
Iain Clarke, Warrior Programmer6-Oct-04 4:57
Iain Clarke, Warrior Programmer6-Oct-04 4:57 
GeneralRe: Quick Question... Pin
Graham Bradshaw6-Oct-04 5:41
Graham Bradshaw6-Oct-04 5:41 
GeneralProblem with Menu and Submenu / Entries Pin
P-Rex6-Oct-04 2:50
P-Rex6-Oct-04 2:50 
GeneralRe: Problem with Menu and Submenu / Entries Pin
Iain Clarke, Warrior Programmer6-Oct-04 4:21
Iain Clarke, Warrior Programmer6-Oct-04 4:21 
I had exactly the same problem a few years ago. I investigated, and found that MENUITEMINFO had expanded
post NT4. Fortunately, I didn't need any of the new fields, so I just used my own retro class. Newer
OSs can cope with the older structure, but not vice versa. You can get similar effects by playing with
platform definitions, but this seemed less intrusive. It is also better than MENUITEMINFO, as it self
initialises with sensible starting values.

struct CMenuItemInfo
{
    UINT    cbSize;
    UINT    fMask;
    UINT    fType;          // used if MIIM_TYPE (4.0) or MIIM_FTYPE (>4.0)
    UINT    fState;         // used if MIIM_STATE
    UINT    wID;            // used if MIIM_ID
    HMENU   hSubMenu;       // used if MIIM_SUBMENU
    HBITMAP hbmpChecked;    // used if MIIM_CHECKMARKS
    HBITMAP hbmpUnchecked;  // used if MIIM_CHECKMARKS
    DWORD   dwItemData;     // used if MIIM_DATA
    LPTSTR   dwTypeData;     // used if MIIM_TYPE (4.0) or MIIM_STRING (>4.0)
    UINT    cch;            // used if MIIM_TYPE (4.0) or MIIM_STRING (>4.0)

	CMenuItemInfo()
	{
		memset(this, 0, sizeof(CMenuItemInfo));
		cbSize = sizeof(CMenuItemInfo);
	};

	inline operator LPMENUITEMINFO() const
	{
		return (LPMENUITEMINFO)this;
	}
};


I hope this helps.

Iain.
GeneralOwner drawn popup menu and its border Pin
tabor256-Oct-04 2:29
tabor256-Oct-04 2:29 
GeneralRe: Owner drawn popup menu and its border Pin
Iain Clarke, Warrior Programmer6-Oct-04 4:25
Iain Clarke, Warrior Programmer6-Oct-04 4:25 
GeneralRe: Owner drawn popup menu and its border Pin
tabor256-Oct-04 5:03
tabor256-Oct-04 5:03 
GeneralSelecting a bitmap into two mem DC's at the same time Pin
Garth Watkins6-Oct-04 2:22
Garth Watkins6-Oct-04 2:22 
Generalexe file not run properly Pin
nirmit6-Oct-04 2:08
nirmit6-Oct-04 2:08 
GeneralRe: exe file not run properly Pin
ThatsAlok6-Oct-04 2:44
ThatsAlok6-Oct-04 2:44 
GeneralRe: exe file not run properly Pin
David Crow6-Oct-04 3:58
David Crow6-Oct-04 3:58 
GeneralPop-up Menu Pin
Rage6-Oct-04 2:03
professionalRage6-Oct-04 2:03 
GeneralRe: Pop-up Menu Pin
Garth Watkins6-Oct-04 2:51
Garth Watkins6-Oct-04 2:51 
GeneralRe: Pop-up Menu Pin
Rage6-Oct-04 3:59
professionalRage6-Oct-04 3:59 
GeneralRe: Pop-up Menu Pin
Iain Clarke, Warrior Programmer6-Oct-04 4:54
Iain Clarke, Warrior Programmer6-Oct-04 4:54 
GeneralRe: Pop-up Menu Pin
Rage6-Oct-04 21:07
professionalRage6-Oct-04 21:07 
GeneralProble with OnTimer() Pin
Leyu6-Oct-04 1:36
Leyu6-Oct-04 1:36 
GeneralRe: Proble with OnTimer() Pin
toxcct6-Oct-04 1:57
toxcct6-Oct-04 1:57 
GeneralRe: Proble with OnTimer() Pin
Nathan Holt at EMOM6-Oct-04 5:28
Nathan Holt at EMOM6-Oct-04 5:28 
GeneralRe: Proble with OnTimer() Pin
toxcct6-Oct-04 6:35
toxcct6-Oct-04 6:35 
GeneralRe: Proble with OnTimer() Pin
Nathan Holt at EMOM6-Oct-04 7:02
Nathan Holt at EMOM6-Oct-04 7:02 

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.