I am try to display gif images on the dialog like I do with bitmaps.However, Exagons's examples(http://exagone.cjb.net/) display gif files on whole dialog and use createwindowex to make dialog.I use .rc file for my dialog and I couldnt managed to display gif file for example here is my rc file to display bmp at 4,1,185,31 coordinates.
I have tried to email exagone but mail link on his page does not working.
#include "\masm32\include\resource.h" #define TESTIMAGE 800 103 DIALOGEX 0,0,176,119 STYLE WS_POPUP | WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU | WS_VISIBLE | DS_ABSALIGN | DS_SYSMODAL | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER CAPTION "Mr_Stop" FONT 8, "Arial" BEGIN CONTROL "", 1001, EDIT, ES_LEFT | ES_AUTOHSCROLL | ES_OEMCONVERT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 13, 52, 150, 10 , WS_EX_STATICEDGE CONTROL "", 1002, EDIT, ES_LEFT | ES_AUTOHSCROLL | ES_READONLY | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 13, 77, 150, 10 , WS_EX_STATICEDGE PUSHBUTTON "Ok",200,13,92,38,13,0,WS_EX_STATICEDGE PUSHBUTTON "Exit",201,59,92,38,13,0,WS_EX_STATICEDGE CONTROL 102,-1,"Static",SS_BITMAP | SS_REALSIZEIMAGE,4,1,185,31,WS_EX_STATICEDGE CTEXT "http://win32asm.cjb.net",4000,96,105,72,8,WS_GROUP LTEXT "Edit1",-1,14,42,50,8,WS_GROUP LTEXT "Edit2",-1,14,66,59,10,WS_GROUP CONTROL "",-1,"Static",SS_GRAYFRAME,6,41,165,75 CONTROL "",-1,"Static",SS_WHITEFRAME,5,40,165,75 END TESTIMAGE RCDATA "demo.gif" 101 ICON DISCARDABLE "stop.ico" 102 BITMAP DISCARDABLE "logo.bmp" 104 CURSOR DISCARDABLE "finger.cur"
Hi LaptoniC, the e-mail addresses on my site aren't very reliable so you'd better use email@example.com as e-mail address. You can't use GIFs directly in a dialog like you would with bitmaps, you should either bitblt the bitmap on the dialog (handle the WM_PAINT message of the dialog like in my example with a normal window), or create an ownerdrawn static control (or button, can't remember), which you then draw by handling the WM_DRAWITEM message. If you have further questions just ask in this thread or mail me. Thomas
I want to display this gif file at coordinates of my bitmap as declared in .rc file.I use .rc file to make my dialog so your code didnt worked for me.How can I do this ?.Thanks