TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Doug Swenson
from: Phil Crown
date: 1996-07-24 20:04:50
subject: ListBox

-=> Quoting Doug Swenson to All <=-

 DS> However, when I minimize the window, and then re-display it, the
 DS> listbox is not shown.  If I put the cursor where the scroll bar button
 DS> s/b and drag it through to the bottom, each entry appears, as does that
 DS> portion of the scroll bar.

What happens if you try to resize the window?

I am guessing that you need to intercept the WM_SIZE message to resize
the clients (your canvas area and listbox).


    case WM_SIZE:
      resizeClients(mp2);
      break;


void resizeClients(MPARAM sizeparms)
{
  ULONG   width   = SHORT1FROMMP(sizeparms);
  ULONG   height  = SHORT2FROMMP(sizeparms);

  const   ULONG   WINDOWCOUNT = 2; // number of client windows

  SWP  swp[WINDOWCOUNT];

  for(int i = 0; i < WINDOWCOUNT; i++) {
    swp[i].fl = (SWP_MOVE | SWP_SIZE);
    swp[i].hwndInsertBehind = HWND_TOP;
  }

  swp[0].hwnd = hwndclient;
  swp[0].x    = 0;
  swp[0].y    = height/2;
  swp[0].cx   = width;
  swp[0].cy   = height/2;

  swp[1].hwnd = hwndlistbox;
  swp[1].x    = listPosX;
  swp[1].y    = listPosY;
  swp[1].cx   = listWidth;
  swp[1].cy   = listHeight;

  WinSetMultWindowPos(hab, &swp[0], WINDOWCOUNT);
}

Phil - Fido:  1:124/8014.0 | Internet:  phil.crown{at}bluecafe.com

--- Blue Wave/OS2 v2.30
* Origin: * MacSavvy OS/2 BBS * Dallas, Texas * 214-250-4479 * (1:124/1208)
SEEN-BY: 50/99 270/101 620/243 625/100 711/401 409 410 413 430 808 809 934
SEEN-BY: 711/955 712/407 515 624 628 713/888 800/1
@PATH: 124/1208 1 396/1 270/101 712/515 711/808 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.