News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

Resize a dialog box

Started by Sanguis, July 02, 2008, 12:23:03 AM

Previous topic - Next topic

Sanguis

Hi,

I want to "embed" a dialog box. First I create the modeless dialog box and then, with
its window handle, I set its window style to WS_CHILD and WS_VISIBLE. I call SetParent()
and the dialog box shows itself nicely in the client area of its parent. So far so good.
But (in the WM_SIZE message code of its parent) when I try to resize the dialog box,
it just does not work. I can't change its size, not even get it smaller. Neither SetWindowPos nor MoveWindow worked.
Windows error says: "Invalid window handle" - I don't get it, the dialog box handle is fine.

Is there a way to overcome this?

Thanks.