CompuServe Messages

VB Custom Control –

    03-Oct-91 09:35:18
Sb: #962-VB Custom Control –
Fm: Don Funk 76701,155
To: George Weir 72540,525
Hi George, Here is what I would look at to see if there is a problem. NEAR AddDataRow (HCTL hctl) { LPSTR lpstr; HLSTR hlstr; pdeclist2 = (PDECLIST2)VBDerefControl(hctl); pdeclist2->cNumberEntries = pdeclist2->cNumberEntries+1; //Create a new LPSTR for theHSZ lstr = VBLockHsz(pdeclist2->hszRow); pdeclist2 = (PDECLIST2)VBDerefControl(hctl); //Create a HLSTR for the string and save it ***************** are you getting a valid hlstr here? ******* hlstr = VBCreateHlstr(lpstr,_fstrlen(lpstr)); pdeclist2 = (PDECLIST2)VBDerefControl(hctl); pdeclist2->pRowHlstr[pdeclist2->cNumberEntries – 1] = hlstr; ****************Call the DrawRows here to see if you can get to the data. Better yet, include the VBDerefControl and the VBDerefHlstr here to see if the data is getting stored. VBUnlockHsz(pdeclist2->hszRow); return 0; } VOID NEAR DrawRows(HDC hdc) { int row; LPSTR lpsRow; pdeclist2 = (PDECLIST2)VBDerefControl(hctl); ******************** I assume that [row] is zero here? I am not following what PHLSTR is here. Is it an array of handles? lpsRow = VBDerefHlstr((HLSTR)pdeclist2->pRowHlstr[row]); if (lpsRow) <———– lpsRow is always NULL ???? I hope that might point to some solution. If not get back with me. Don FUnk