--------------030306060009080407030406
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hello,

    I'm trying to make a FXRuby "always on top" on win32 using ruby/dl. 
i use ruby/dl only because it seems easier to use than win32API, but if 
someone has a solution using win32API, i'd be delighted to get it, too :O)
    Anyway, for now it's a no-go. I connected also SetForegroundWindow() 
to see if it works and this one seems to work. If i call 
SetForegroundWindow with the wrong window Id, i loose the focus. if i 
give the right window id, i keep the focus. Seems good. But 
SetWindowPos(), that should set it always on top, doesn't seem to work.

    Based on 
http://www.ruby-talk.org/cgi-bin/vframe.rb/ruby/ruby-talk/82992?82958-83286+split-mode-vertical 
and other documents, it seems SetWindowPos is the win32 API to call to 
get "always on top" windows.

    I attach the ruby script.. you can replace eg
      User32.setForegroundWindow(xid)
by
      User32.setForegroundWindow(id)
and you'll see that the window looses the focus as you type (id means 
nothing to windows), which seems to prove it's at least a bit working :O)

emmanuel

--------------030306060009080407030406
Content-Type: text/plain;
 nameop.rb"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filenameop.rb"

IyEgL3Vzci9iaW4vZW52IHJ1YnkNCg0KcmVxdWlyZSAiZm94Ig0KaW5jbHVkZSBGb3gNCg0K
SFdORF9UT1BNT1NUID0gLTENCkhXTkRfTk9UT1BNT1NUID0gLTINClNXUF9OT1NJWkUgPSAx
DQpTV1BfTk9NT1ZFID0gMg0KcmVxdWlyZSAnZGwnDQpyZXF1aXJlICdkbC9pbXBvcnQnDQoN
CiMgaW5zcGlyZWQgYnkgaHR0cDovL3d3dy5ydWJ5LXRhbGsub3JnL2NnaS1iaW4vdmZyYW1l
LnJiL3J1YnkvcnVieS10YWxrLzgyOTkyPzgyOTU4LTgzMjg2K3NwbGl0LW1vZGUtdmVydGlj
YWwNCm1vZHVsZSBVc2VyMzINCiAgZXh0ZW5kIERMOjpJbXBvcnRhYmxlDQogIGRsbG9hZCAi
dXNlcjMyIg0KICB0eXBlYWxpYXMgIkhXTkQiLCAidW5zaWduZWQgY2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