NO

Author Topic: ODMenu  (Read 3637 times)

czerny

  • Guest
ODMenu
« on: December 11, 2008, 11:04:54 PM »
I have had problems with Pelles owner drawn menu (win2000 and Pelles C 5.00.6).

In 'InstallOwnerDrawMenuHandler' I made two changes

ncm.cbSize = sizeof(NONCLIENTMETRICS) - sizeof(ncm.iPaddedBorderWidth);
if (SystemParametersInfo(SPI_GETNONCLIENTMETRICS, ncm.cbSize, &ncm, 0))
        g_hFont = CreateFontIndirect(&ncm.lfMenuFont);

Without this changes 'SystemParametersInfo' fails.

Czerny

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: ODMenu
« Reply #1 on: January 17, 2009, 11:52:41 AM »
OK, thank you for reporting this.

I have uploaded a modified version; I changed the two calls to SystemParametersInfo() and added WINVER to the project settings (IMO a better way to deal with the iPaddedBorderWidth field in NONCLIENTMETRICS).

http://www.smorgasbordet.com/pellesc/sample_odmenu.htm
/Pelle