| moody SendMessage -
06-04-2007, 10:32 AM
I have a very strange problem with "SendMessage". I have a code which places
a graphic picture inside a richtextbox, the code is simple, like this:
Editor.glo.Picture = LoadPicture("somepic.bmp")
Clipboard.Clear
Clipboard.SetData Editor.glo.Picture
gResult = SendMessage(Editor.RichTextBox1.hwnd, WM_PASTE, 1, 0)
The declares/defs looks like:
Public Const WM_PASTE = &H302
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd
As Long, ByVal msg As Long, ByVal wp As Long, lp As Any) As Long
==============================================
My issue is that sometimes it works and sometimes it doesn't. I have tried
screen resolution changes, memory changes (thinking adding or removing code
caused it), etc. to no avail.
Can anyone see anything wrong with the code above (or perhaps have a better
recommendation than my approach of placing a graphic object)?
Any info or suggestion is appreciated. Thanks and God Bless.
_Raoul |