No announcement yet.

Bug in COMMCTRL.Inc ... ?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Bug in COMMCTRL.Inc ... ?

    For the first time ever I have been given this message whilst compiling an Exe:

    Error 477 in C:PBDLL60\WINAPI\COMMCTRL.INC (2965:5)
    Line 2965: Sub Combo_GetEditSel(ByVal hComboBox As Long, lpStart As Long, lpEnd As Long)

    the actual area in the Inc file area below:

    ' position of the first character after the last selected character
    ' in the high-order word.
    Sub Combo_GetEditSel(ByVal hComboBox As Long, lpStart As Long, lpEnd As Long)
    SendMessage hComboBox, %CB_GETEDITSEL, VarPtr(lpStart), VarPtr(lpEnd)
    End Sub

    What does one do? I have not modified the Inc file.

  • #2
    This is going to sound strange, but:
    1) There MAY be a bug in it
    2) SOMETIMES, when I'm compiling code and I leave off a critical End If or Next, I get issues in the first or last .inc file I am using, and I go back and find that a piece of my code is USING that, and just before it's called there is an issue, so check your code for syntax errors...
    Otherwise, try some Byval statements, although this sub is just sending a message....
    3) Try sending the message without the sub, just add the SendMessage into your code....

    Good luck


    mailto:[email protected][email protected]</A>
    Scott Turchin
    True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi


    • #3
      Interestinger and interestinger! I found my own mistake, which
      was to paste a "case %WM_COMMAND" from one function into another, which did not have a "Select Case CbMsg" in place yet!

      Once found and fixed, the COMMCTRL.Inc file magically was healed of its ailment.

      Thanks, Scott.