Results 1 to 2 of 2

Thread: SendMessage Not working

  1. #1

    Thread Starter
    PowerPoster Halsafar's Avatar
    Join Date
    Jun 2004
    Location
    Saskatoon, SK
    Posts
    2,339

    SendMessage Not working

    Alright, my SendMessage() is not working.
    PHP Code:
        Index SendMessage(m_hwndLB_ADDSTRING0, (LPARAM)Item);
        
    SendMessage(m_hwndLB_SETITEMDATAIndex, (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_hwndLB_GETCOUNT,0,0);
        
    LRESULT Index SendMessage(m_hwndLB_GETSEL,0,0);
        
    LRESULT iLength SendMessage(m_hwndWM_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

  2. #2

    Thread Starter
    PowerPoster Halsafar's Avatar
    Join Date
    Jun 2004
    Location
    Saskatoon, SK
    Posts
    2,339
    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
  •  



Click Here to Expand Forum to Full Width