moody SendMessage
Question posted by: Raoul Watson
(Guest)
on
December 2nd, 2006 12:25 PM
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
Not the answer you were looking for? Post your question . . .
189,798 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).
|