DarkAngel Posted December 6, 2010 Share Posted December 6, 2010 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 .. Link to comment Share on other sites More sharing options...
Mat Posted December 6, 2010 Share Posted December 6, 2010 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) AutoIt Project Listing Link to comment Share on other sites More sharing options...
DarkAngel Posted December 6, 2010 Author Share Posted December 6, 2010 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 .. 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 More sharing options...
Mat Posted December 6, 2010 Share Posted December 6, 2010 (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#insertingNo I'm not. That is way over my head. Edited December 6, 2010 by Mat AutoIt Project Listing Link to comment Share on other sites More sharing options...
DarkAngel Posted December 7, 2010 Author Share Posted December 7, 2010 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 ... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now