Sign in to follow this  
Followers 0
DarkAngel

Is it possible to include Graphics in a Edit Box??

5 posts in this topic

Is it possible to include text in GUICtrlCreateEdit ? I want to include some graphics along with the normal text in the Edit Ctrl box ( slider style ) .. Thanks in advance .. :graduated:

Share this post


Link to post
Share on other sites



You can draw on anything using GDIPlus... Use _GDIPlus_GraphicsFromHWnd(GUICtrlGetHandle($iMyEdit)) to get the graphics, and then draw on that. The trouble is finding out when to draw to make sure it doesn't flash.

If you are very lucky, you won't need to go into drawing the edit yourself. You might be able to handle one message and draw it on the edit either before or after the text. I don't know much about that though. You should get away with just handling a WM_PAINT message though (touch my desk)

Share this post


Link to post
Share on other sites

But when i scroll up or down will the graphics and the text both scroll accordingly ? The reasonwhy i am asking it is cuz i want to incorporate smileys in a chat box ... Th e smiley part is not much difficult .. it checks if the message has the normal ascii's for the smileys by StringInStr and then searches for the marching graphic file ( say a jpeg )and then comes the part where i want to put that into the edit box .. Like the normal chat programs . Thats the part where i am stuck .. :graduated: the edeit box works fine with text but the smileys seems to be pasted on it .. they dun move with the scrolling .. I havent tried with GDI plus cuz i am very new to GDI plus. :(

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Ahh... Then you want to use a richedit rather than a normal edit. Forget what I said, I thought you meant some background graphic. You might still need some GDI. I would have thought it would be pretty simple task using the standard UDF, but it appears it's not there....

I did manage to find this though:

I'm working on a better example based on this: http://msdn.microsoft.com/en-us/library/dd387916.aspx#inserting

No I'm not. That is way over my head.

Edited by Mat

Share this post


Link to post
Share on other sites

err thats a lot of codes ... I will get back to it once ,y sems get over .. it seems that post would be of some help .. Thanks a ton ... :graduated:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0