Jump to content

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


DarkAngel
 Share

Recommended Posts

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)

Link to comment
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. :(

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...