Process EN_REQUESTRESIZE Sent To ListBox?

Larry 0 Reputation points
2025-06-28T06:13:22.0733333+00:00

Hi Folks:

Developing on Win 10 Pro.

I have a dialog with a ListBox.

Each item of the ListBox has a Rich Text control.

I'd like the Rich Text control's owner to be the ListBox. This will keep the coordinates for positoning the Rich Text control relative to the ListBox and also clip the Rich Text control to the ListBox.

So I make the ListBox the owner in each item's Rich Text CreateWindowExW().

Of course, I have to subclass the ListBox to catch the EN_REQUESTRESIZE message.

Up to that, everything works just fine.

I catch the EN_REQUESTRESIZE in the ListBox's subclass function, but lparam is NULL.

The REQRESIZE should be in the EN_REQUESTRESIZE message's lparam.

Is there a way I can get it?

Thanks
Larry

Windows development Windows API - Win32
{count} votes

1 answer

Sort by: Most helpful
  1. Larry 0 Reputation points
    2025-06-28T11:13:27.9466667+00:00

    Thanks Viorel:

    Did you determine the lparam correctly?

    I guess not.

    The EN_REQUESTRESIZE my subclass procedure was catching was from a SendMessage I was using for debugging. The whole test was flawed.

    The subclass procedure is now catching the WM_NOTIFY message which does bring a pointer to a NMHDR in the lparam.

    There are about 7 ListBox items which have text written to them, but I only receive 2 EN_REQUESTRESIZE notifications.

    I'll investigate further later today,

    I appreciate your question, but I should have built a better test before I posted.

    Thanks
    Larry

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.