Re: Owner drawn, what is it?
Hi Will,
you're on the right track. An owner-drawn control is drawn by the owner of the control. Imagine a normal dialog box with several control in it. Normally every control does the painting for itself. By specifying the owner-draw style the controls sends several messages to his owner, the dialog, to get information about what the item(s) to be drawn and to draw the item or the entire control. Let's assume you have a listbox where you let the user choose a country. A small frag in front of the country names will be fine. Okay, this is a typical task for an owner-drawn listbox with items with fixed height. After creation the control will send the message WM_MEASUREITEM to his owner to get information about the dimension of each item. The control will send this message for each item if you specify a listbox with variable height items. Some time later the control get the WM_PAINT message as every window does (a control is nothing else than a special window). It will ask the system for a device context, and sending this dc along with other information in form of a WM_DRAWITEM.
That's all in short.
HTH
Martin
Re: Owner drawn, what is it? Part II
Thanks Martin for your clear description. You probably have guessed this comming; can you owner-draw the whole of the dialogs or the application. For example, how do you do something like what Winamp does, I mean with non MFC standard View like interface?
Will