-
November 19th, 2008, 02:24 PM
#1
Add Picture to rich textbox using pure win32 api
I am working on a pure win32 api(non MFC) richtextbox. I found the following code for mfc richtextboxes.
Bitmap imageObject = (Bitmap)Image.FromFile(@"C:\2.gif");
Clipboard.SetDataObject(imageObject,false);
IDataObject iData = Clipboard.GetDataObject();
bool bDataPresent = iData.GetDataPresent(DataFormats.Bitmap);
System.Drawing.Imaging.BitmapData meta = (System.Drawing.Imaging.BitmapData)iData.GetData(DataFormats.MetafilePict);
if ( bDataPresent )
richTextBox1.Paste(DataFormats.GetFormat(DataFormats.Bitmap));
However i'm having problems converting this to pure win32. Appreciate any help in this matter.Thanks in advance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|