CListCtrl::InsertItem() - fails
Devin Dow -- devin@rsi-inc.com Tuesday, July 09, 1996 VC++; Problem with call to CListCtrl::InsertItem() failing intermittantly, but only on Win32s and WinNT, not on Win95 ** Win32s & WinNT - I have a list of 65 items; repeatedly, the same 5 items each time return -1 on CListCtrl::InsertItem() ** Win95 - Works perfectly QUESTION - What are the reasons that CListCtrl::InsertItem() would fail? -- Thank You, /=========================================================\ |Devin Dow - devin@rsi-inc.com | |Router Solutions, Inc. - Interface tools for CAE/CAD/CAM | | __ _ http://www.rsi-inc.com | | / \.\ EVIN Check Out CAMCAD for Windows | | / /\ \.\ OW __ | | \ \.\ \.\ o / o |\ \ | | \ \/ /./ /\| /\|\ | \_\ | | \ /./ / > < \ | \ GOAL!! | | \/./ ' ` o ' ` | \ | \=========================================================/
Mark Koehler -- mkoehler@ix.netcom.com Saturday, July 13, 1996 >VC++; Problem with call to CListCtrl::InsertItem() failing intermittantly, but only on Win32s and WinNT, >not on Win95 >** Win32s & WinNT - I have a list of 65 items; repeatedly, the same 5 items each time return -1 on >CListCtrl::InsertItem() >** Win95 - Works perfectly >QUESTION - What are the reasons that CListCtrl::InsertItem() would fail? VC++ 4.1 Win95 This sounds very similar to a problem I am having. This is code outline for the series of actions: 1. In OnCreate for the list control, populate the list using InsertItem with one entry for each record with a specified file. In my particular case, this problem occurs with only 2 records/2 items. (NO PROBLEM) 2. In response to keypress, call InsertItem() at index 0 with a default record. (NO PROBLEM) 3. Call BeginLabelEdit(0) to allow the user to change the label. (NO PROBLEM ) 4. When label editing is complete, call DeleteItem(0). (NO PROBLEM) 5. Call InsertItem() at index != 0 (RETURNS -1 - FAILURE). Now, I can remove step 4, but it does not change the problem. Also, I can call InsertItem() at index 0 without problem. I will have to try and see whether or not this occurs in WinNT, but it DOES happen under Win95 contrary to others problems. -- Mark Koehler Atlanta, GA
Mike Blaszczak -- mikeblas@msn.com Wednesday, July 17, 1996 >QUESTION - What are the reasons that CListCtrl::InsertItem() would fail? There are several possible reasons. What does GetLastError() return when you get the failure code? .B ekiM http://www.nwlink.com/~mikeblas
| Вернуться в корень Архива |