Forum: wxRuby Problem with StyledTextCtrl

Posted by Lui Kore (night_stalker)
on 2010-01-10 17:48
I am using StyledTextCtrl, and want to get direct function and pointer
from the handle so that I can pass them to some old codes written in C.

But the output of the following code is "0, 0", which means send_msg()
returns nothing but 0.

    require 'wx'
    module Wx
      App.run do
        frame = Frame.new nil, :title => "stc"
        stc = StyledTextCtrl.new frame, -1
        # http://www.scintilla.org/Steps.html
        fn  = stc.send_msg 2184, 0, 0 # SCI_GETDIRECTFUNCTION
        ptr = stc.send_msg 2185, 0, 0 # SCI_GETDIRECTPOINTER
        puts "#{fn}, #{ptr}" #=> "0, 0" ?
        frame.show
      end
    end


Why ?
My environments: Windows7, wxruby-ruby19(2.0.1)

I also tried stc.get_handle() and pass the handle to C, but still got no
response.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.