Article View: comp.os.ms-windows.programmer.tools
Article #558Re: Resizing a list box within a resource
From: Norbert Unterberg
Date: Sun, 11 Oct 1992 11:28
Date: Sun, 11 Oct 1992 11:28
18 lines
1443 bytes
1443 bytes
GM> In other words what message do I send to the listbox to resize it.
GM> Is it possible? Am I missing something? Are resources always fixed?
Resource controls are "normal" windows like every other control or window.
Assume your dialog box has the window handle hwndDlg, and the listbox has an ID
of ID_LISTBOX, then you can resize it i.e in the following way:
hwndListbox = GetDlgItem(hwndDlg, ID_LISTBOX);
SetWindowPos(hwndListbox, NULL, 0, 0, new_width, new_height,
SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
Norbert
---
Norbert Unterberg Phone: ++49-2335-61786
Koehlerstr. 12c CompuServe: 100112,2740
5802 Wetter 2 Internet: Norbert_Unterberg@softstream.fido.de
Germany Fidonet: Norbert Unterberg at 2:245/36.4
Technical Details
Message-ID:
<1aa41a7f@p4.f36.n245.z2.fidonet.org>Path:
arc1-ca.pugleaf.net!sparky!uunet!sun-barr!ames!haven.umd.edu!darwin.sura.net!Sirius.dfn.de!Urmel.Informatik.RWTH-Aachen.DE!dfv.rwth-aachen.de!sungate.fido.de!p1.hippo.fido.de!softstream.fido.de!Norbert_UnterbergReferences:
<b622fb6f@dialup.athena.lkg.dec.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!ames!haven.umd.edu!darwin.sura.net!Sirius.dfn.de!Urmel.Informatik.RWTH-Aachen.DE!dfv.rwth-aachen.de!sungate.fido.de!p1.hippo.fido.de!softstream.fido.de!Norbert_Unterberg Date: Sun, 11 Oct 92 12:28:55 +0100 From: Norbert_Unterberg@softstream.fido.de (Norbert Unterberg) Subject: Re: Resizing a list box within a resource Message-ID: <1aa41a7f@p4.f36.n245.z2.fidonet.org> References: <b622fb6f@dialup.athena.lkg.dec.com> Newsgroups: comp.os.ms-windows.programmer.tools X-Comment-To: mills@athena.lkg.dec.com (George Mills) Organization: Norbert_Unterberg@softstream.fido.de Lines: 20