module Fzeet::ComboBoxMethods

Public Instance Methods

[](i) click to toggle source
# File lib/fzeet/windows/user/Control/ComboBox.rb, line 100
def [](i)
        i = sendmsg(:getcursel) if i == :selected

        return '' if i == -1 || (len = textlen(i) + 1) == 1

        ''.tap { |item|
                FFI::MemoryPointer.new(:char, len) { |buf|
                        raise "GETLBTEXT failed." if sendmsg(:getlbtext, i, buf) == -1

                        item << buf.read_string
                }
        }
end
textlen(i) click to toggle source
# File lib/fzeet/windows/user/Control/ComboBox.rb, line 98
def textlen(i) raise "GETLBTEXTLEN failed." if (len = sendmsg(:getlbtextlen, i)) == -1; len end