News:

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

WM_MEASUREITEM

Started by Ratch, May 28, 2006, 03:57:40 AM

Previous topic - Next topic

Ratch

To the Ineffable All,
     I don't receive a WM_MEASUREITEM when I do a CreateWindow for a "button" window.  Its style is BS_OWNERDRAW OR WS_VISIBLE OR WS_CHILD.  I see a lot of blab on the web about a bug or something in regard to this message, but the solution has such a heavy C++/MFC flavor that I cannot understand it.  Does anyone know a workaround using MASM?  Ratch

zooba

According to MSDN, "The WM_MEASUREITEM message is sent to the owner window of a combo box, list box, list view control, or menu item when the control or menu is created".

For an ownerdrawn button, the owner window will receive WM_DRAWITEM.

Hope this helps,

Zooba :U

Ratch

zooba,

Quote
According to MSDN, "The WM_MEASUREITEM message is sent to the owner window of a combo box, list box, list view control, or menu item when the control or menu is created".

For an ownerdrawn button, the owner window will receive WM_DRAWITEM.

     I do indeed receive a WM_DRAWITEM. But I expect to receive a WM_MEASUREITEM for my owner-drawn button according to the quote from the following MS link.  Ratch

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceshellui5/html/wce50lrfwmmeasureitem.asp

Quote
This message is sent to the owner window of an owner-drawn button or menu item when the control or menu is created.

KSS

I open page http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceshellui5/html/wce50lrfwmmeasureitem.asp
At up of the page (on blue background) write some interecting:
"Platform Builder for Microsoft Windows CE 5.0"

Ratch

KSS,

     Right you are.  It appears that CE 5.0 has more freatures for that API than XP does.  Ratch

zooba

Quote from: Ratch on May 30, 2006, 01:02:28 AM
Right you are.  It appears that CE 5.0 has more freatures for that API than XP does.  Ratch

Or more accurately, Microsoft had a chance to change the behaviour of their API without breaking older applications.

Read The Old New Thing. Raymond talks a lot about the compatibility issues Microsoft deal with.

Cheers,

Zooba :U