Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Controls
  New Posts New Posts RSS Feed - CRASH using Sendmessage API to Combobox
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CRASH using Sendmessage API to Combobox

 Post Reply Post Reply
Author
Message
Stilki View Drop Down
Groupie
Groupie


Joined: 27 May 2005
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote Stilki Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 25 June 2008 at 12:38am

Hi,

Don't use API. Combo use own structures in ItemData.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.