# Problem with StyledTextCtrl

**URL:** <https://www.ruby-forum.com/t/problem-with-styledtextctrl/181355>\
**Category:** wxRuby\
**Created:** [January 10, 2010, 5:48pm UTC](https://www.ruby-forum.com/t/problem-with-styledtextctrl/181355 "2010-01-10T17:48:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![night\_stalker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f0a364/32.png) [@night\_stalker](https://www.ruby-forum.com/u/night_stalker)\
**Post date:** [January 10, 2010, 5:48pm UTC](https://www.ruby-forum.com/t/problem-with-styledtextctrl/181355/1 "2010-01-10T17:48:16Z")

</div>

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.
