VB Custom Control –
04-Oct-91 06:45:25
Sb: #1010-VB Custom Control –
Fm: George Weir 72540,525
To: George Weir 72540,525
Here is what I've found so far:
I create the HLSTR in the function AddDataRow and store
it in the array pdeclist2->pHlstr.If I call DrawRows from
AddDataRow and deference the HLSTR it is fine. So far so
good.
The HLSTR I'm storing are used to store items is a
custom list box. After adding several items to the list
box, done with a for next loop in BASIC (AddDataRows is
call when processing the VBM_SETPROPERTY message) I change
another property, the header for my listbox. In handling
the VBM_SETPROPERTY message for the header I call
InvalidateRect. If I check the HLSTR just before and after
the calls to InvalidateRect it is fine.
After calling InvalidateRect my VBM_SETPROPERTY procedure
exits. The next message my control processes is a WM_PAINT
message. If I check the HLSTR at the begining of processing
the WM_PAINT message is no longer pointing to my string.
I've also found that additional calls to VBCretaeHlstr at
this point will get me the same handles I got when I called
VBCreateHlstr from AddDataRows. Apparently BASIC has reclaimed
the handles.
Am I doing something wrong?
George