B
Bob Dankert
I am trying to attach a textbox to an ownerdrawn listbox. The listbox works
great. I add the textbox to the controls of the listbox and set the
location of the textbox. The problem is keeping the textbox in the right
place, because the listbox always draws on top of it during various
scrolling events. In an attempt to remedy this, I have an event that fires
on the WM_PAINT and WM_VSCROLL of the listbox which re-sets the location of
the child textbox (ocassionally the Y-position will become in the tens of
thousands) and refreshs the child textbox.
Currently, when I drag the scroll bar up and down it works perfectly. When
I scroll up or down a page (click the scroll bar above or below the bar) it
moves the textbox down/up a page (leaves it in the same position) which it
should not be doing. Also, if I click the scroll bar arrows to scroll it
one item at a time, I get double textboxes (the pre-scroll text box does not
go away, and the after-scroll text box comes back).
I have been working on this for tens of hours and can not come up with a
good way to attach the textbox to the listbox so that it scroll in unison
with the listbox. Any help is greatly appreciated.
Bob Dankert
great. I add the textbox to the controls of the listbox and set the
location of the textbox. The problem is keeping the textbox in the right
place, because the listbox always draws on top of it during various
scrolling events. In an attempt to remedy this, I have an event that fires
on the WM_PAINT and WM_VSCROLL of the listbox which re-sets the location of
the child textbox (ocassionally the Y-position will become in the tens of
thousands) and refreshs the child textbox.
Currently, when I drag the scroll bar up and down it works perfectly. When
I scroll up or down a page (click the scroll bar above or below the bar) it
moves the textbox down/up a page (leaves it in the same position) which it
should not be doing. Also, if I click the scroll bar arrows to scroll it
one item at a time, I get double textboxes (the pre-scroll text box does not
go away, and the after-scroll text box comes back).
I have been working on this for tens of hours and can not come up with a
good way to attach the textbox to the listbox so that it scroll in unison
with the listbox. Any help is greatly appreciated.
Bob Dankert