|
-
Oct 31st, 2004, 12:28 PM
#1
Thread Starter
PowerPoster
SendMessage Not working
Alright, my SendMessage() is not working.
PHP Code:
Index = SendMessage(m_hwnd, LB_ADDSTRING, 0, (LPARAM)Item);
SendMessage(m_hwnd, LB_SETITEMDATA, Index, (LPARAM)Item);
The first SendMessage is suppose to return the index of the added string...Always 0, no matter what, which is wrong compared to other code I've seen.
PHP Code:
LRESULT Count = SendMessage(m_hwnd, LB_GETCOUNT,0,0);
LRESULT Index = SendMessage(m_hwnd, LB_GETSEL,0,0);
LRESULT iLength = SendMessage(m_hwnd, WM_GETTEXTLENGTH,(WPARAM)Index,0);
Both of those also always return 0, no matter how much data is on the listbox.
IT ALWAYS RETURNS 0....WHY? I'm searching msdn, gamedev, vbforums....and I am getting no where.
"From what was there, and was meant to be, but not of that was faded away." - - Steve Damm
"The polar opposite of nothingness is existance. When existance calls apon nothingness it shall return to nothingness." - - Steve Damm
"When you do things right, people won't be sure if you did anything at all." - - God from Futurama
-
Oct 31st, 2004, 01:25 PM
#2
Thread Starter
PowerPoster
It is all because it is subclassed!!!!!!!!!!
If I remove the one line which subclass's the control, everything begins to work out just fine!
Why? How could this be?
Any suggestions.
I've been playing with how the box returns CallWindowProc and DefWindowProc in its subclassed....
It seems as if tho I have the listbox returning 1 for its index all the time!!
Last edited by Halsafar; Oct 31st, 2004 at 01:36 PM.
"From what was there, and was meant to be, but not of that was faded away." - - Steve Damm
"The polar opposite of nothingness is existance. When existance calls apon nothingness it shall return to nothingness." - - Steve Damm
"When you do things right, people won't be sure if you did anything at all." - - God from Futurama
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|