Jump to content
Sign in to follow this  

RichEdit control to display animated emoticons like MSN Messenger's

Recommended Posts

Hi guys -n- gals!

Does anyone know how to create a RichEdit control to display animated emoticons like MSN Messenger's. I searched the forums but could not find anything regarding this subject. However, I did find trancexx's GIFAnimation.au3 UDF.

After Doing a web search I found this Here for VB but unfortunately, I'm just learning Autoit so VB is a bit much for me right now.

I did try to use trancexx's UDF and it works but when you close it down the memory goes to 100%.


#AutoIt3Wrapper_AU3Check_Parameters=-w 1 -w 2 -w 3 -w 4 -w 5 -w 6

#include <WindowsConstants.au3>
#include <GIFAnimation.au3>
#include <GuiRichEdit.au3>
#include <ButtonConstants.au3>

Opt("MustDeclareVars", 1)

Global $sTempFolder = @TempDir & "\GIFS"
TrayTip("GIF Download", "Please wait while gifs are downloaded and processed", 0)
Global $sFile = $sTempFolder & "\smiley-computer012.gif"
If Not FileExists($sFile) Then InetGet("http://www.freesmileys.org/smileys/smiley-computer012.gif", $sFile)
Global $hGIF, $hRichEdit
GUICtrlSetTip($hGIF, "Hit him")

Global $hGui = GUICreate("GIF Animations", 670, 520, -1, -1, $WS_OVERLAPPEDWINDOW)
$hRichEdit = _GUICtrlRichEdit_Create($hGui, "", 10, 10, 300, 220, _
Global $hButton = GUICtrlCreateButton("MsgBox", 370, 490, 100, 25)
Global $hGIF2 = _GUICtrlCreateGIF($sFile, "", 10, 10)
_GUICtrlRichEdit_AppendText($hRichEdit, $hGIF2)
_GuiCtrlRichEdit_AppendText($hRichEdit, @CR & "")
_GuiCtrlRichEdit_AppendText($hRichEdit, @CR & "This is appended text.")
GUICtrlSetResizing($hButton, 802)

TrayTip("", "", 0)
GUIRegisterMsg(15, "_ValidateGIFs"); WM_PAINT

Global $aSize, $aDimension

While 1
    Switch GUIGetMsg()
        Case -3
        Case $hButton

            MsgBox(64, "Some title", "Just to see is the gifs are blocked by this and vice versa.", 0, $hGui)

Func _ValidateGIFs($hWnd, $iMsg, $wParam, $lParam)
    #forceref $hWnd, $iMsg, $wParam, $lParam

EndFunc   ;==>_ValidateGIFs

Share this post

Link to post
Share on other sites

I know I'm not answering your question here, thats because I cannot.

I do however have a suggestion, how about using an embedded html page instead of rich edit, I'd expect that to be an easier approach.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post

Link to post
Share on other sites

Hi JohnOne; and thanks for your response!

Yes that would be one way of doing it but it would be the long way around. It would take a lot more code to do the same thing. (1,000 lines of code compared to 10,000) I was hoping that someone solved this problem.

Share this post

Link to post
Share on other sites

Yes! I have built a gui around this one that z0mgItsJohn wrote sometime back. Then true modified the code by adding encryption using AES.au which can be found

I've coded a control panel for login to be used for Local Area Network and Wide Area Network, So far I've come to a crossroad to go with Html or RichEdit for the animated emoticons. I will release this code on the Autoit forums after I complete it.

Edited by Newbercase

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...