|  | 
| CRASH using Sendmessage API to Combobox | 
| Post Reply   | 
| Author | |
| Stilki   Groupie   Joined: 27 May 2005 Status: Offline Points: 70 |  Post Options  Thanks(0)  Quote  Reply  Topic: CRASH using Sendmessage API to Combobox Posted: 24 June 2008 at 11:47pm | 
| Sendmessage API crashes the combox when accessing the ItemData property after filling in the itemdata property using Sendmessage method. 'Add a string to the combox ItemIndex = SendMessage(Hwnd, CB_ADDSTRING, 0, ByVal Item) 'Add a value to the ItemData property ret = SendMessage(Hwnd, CB_SETITEMDATA, ItemIndex, ByVal ItemData) When I fill in the ITEMS combox using Sendmessage it works ok. When I fill in the ITEMDATA using Sendmessage it works ok. When I try to access the ItemData property,  eg. Debug.Print Combox.ItemData(0) it crashes with a message 'Object has disconnected from client...' If I fill in the ItemData without the Sendmessage API there is no crash. (Even if I have filled the Items using Sendmessage) The reason for using the Sendmessage API method is to speed up the loading of large lists. | |
|  | |
| Oleg   Senior Member   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |  Post Options  Thanks(0)  Quote  Reply  Posted: 25 June 2008 at 12:38am | 
| Hi, Don't use API. Combo use own structures in ItemData. | |
| 
     Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS | |
|  | |
| Post Reply   | |
| Tweet | 
| Forum Jump | Forum Permissions  You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |