News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Another listbox problem

Started by NoCforMe, December 17, 2011, 07:56:36 PM

Previous topic - Next topic

NoCforMe

Just had a flash (or a brain fart?): since a listbox control contains lines of text, it can only be sized in increments of those lines. So that's why its size "jumps" when it's resized.

Is this correct?

jj2007

Quote from: NoCforMe on December 19, 2011, 06:24:38 AM
I'll take you up on your offer, jj.

Minor suggestions. Your prog works fine. Re performance, there is obviously a problem - it loads in about 12 seconds on my P4. A factor 60 compared to 0.2 seconds for reading & sorting the file with MB Recall & QSort.

MOV   OldListboxProcPtr, EAX
   invoke SetTimer, hWin, 127, 500, 0
   MOV   HeapPtr, NULL         ;Indicate heap hasn't been allocated.
....
dodefault:
   .if uMsg==WM_TIMER
      invoke KillTimer, hWin, 127
      invoke lstrcpy, addr fileOpenName, chr$("Strings.lst")
      jmp open8
   .endif
....
   INVOKE   CreateWindowEx, 0, ADDR StringsClassName, NULL, $stringsWinAttrs or LBS_NOINTEGRALHEIGHT, 0,
      0, gpRect.right, gpRect.bottom, hWin, NULL, InstanceHandle, NULL

....
      INVOKE   MoveWindow, StringsWinHandle, 0, 0, gpRect.right, gpRect.bottom, FALSE