Click here to Skip to main content
15,912,977 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CHtmlEditCtrl Control Creation Failed Pin
rjuncu14-Oct-02 3:01
rjuncu14-Oct-02 3:01 
GeneralRe: CHtmlEditCtrl Control Creation Failed Pin
Atlence14-Oct-02 6:23
Atlence14-Oct-02 6:23 
GeneralEdit a CListCtrl Pin
AnTri14-Oct-02 1:56
AnTri14-Oct-02 1:56 
GeneralRe: Edit a CListCtrl Pin
Michael Dunn14-Oct-02 2:21
sitebuilderMichael Dunn14-Oct-02 2:21 
GeneralRe: Edit a CListCtrl Pin
AnTri14-Oct-02 2:34
AnTri14-Oct-02 2:34 
GeneralRe: Edit a CListCtrl Pin
valikac14-Oct-02 7:48
valikac14-Oct-02 7:48 
GeneralRe: Edit a CListCtrl Pin
Shog914-Oct-02 16:21
sitebuilderShog914-Oct-02 16:21 
GeneralProblems with animation control Pin
Brigg Thorp14-Oct-02 1:55
Brigg Thorp14-Oct-02 1:55 
I am having a problem with getting an animation to be displayed with a transparent background. I have a C++ based application (no MFC) which has a dialog that I want to display an animation on. I am doing something similar to the Windows dialog when a copy operation is occuring. However, I have an animation of a PC and a watch communicating. My background color in the AVI file is white (RGB 255, 255, 255). Here is the code I use in my WM_INITDIALOG message:

hAnim = CreateAnimationCtrl(hDlg, IDC_ANIMATE);
Animate_Play(hAnim, 0, -1, -1);
hdc = GetDC(GetDlgItem(hDlg, IDC_ANIMATE));
SetBkColor(hdc, RGB(255, 255, 255));


The IDC_ANIMATE Id is the animation control on the dialog. Here is the code for the CreateAnimationCtrl function:

HWND CreateAnimationCtrl(HWND hwndDlg, int nIDCtl) 
{ 
    HWND hwndAnim = NULL; 
    RECT rc; 
    POINT pt; 
	
    // Create the animation control. 
    hwndAnim = Animate_Create(hwndDlg, IDC_ANIMATE, ACS_TRANSPARENT | WS_CHILD, ghInst); 
	
    // Get the screen coordinates of the specified control button. 
    GetWindowRect(GetDlgItem(hwndDlg, nIDCtl), &rc); 
	
    // Convert the coordinates of the lower-left corner to 
    // client coordinates. 
    pt.x = rc.left; 
    pt.y = rc.top;
    ScreenToClient(hwndDlg, &pt); 

	// Position the animation control below the Stop button. 
	SetWindowPos(hwndAnim, 0, pt.x+10, pt.y,  
		149, 25, 
		SWP_NOZORDER | SWP_DRAWFRAME); 


    // Open the AVI clip, and show the animation control. 
    Animate_Open(hwndAnim, MAKEINTRESOURCE(IDR_AVI)); 
    ShowWindow(hwndAnim, SW_SHOW); 
	
    return hwndAnim; 
} 


In addition to the window style in the creation, I also have it set for the resource.

It seems like I've covered everything, however, the AVI clip plays showing the white background on my gray dialog.

Anyone have any suggestions?



Brigg Thorp
Software Engineer
Timex Corporation
GeneralRe: Problems with animation control Pin
Tom Welch14-Oct-02 2:47
Tom Welch14-Oct-02 2:47 
GeneralRe: Problems with animation control Pin
Tom Welch14-Oct-02 2:49
Tom Welch14-Oct-02 2:49 
GeneralRe: Problems with animation control Pin
Brigg Thorp15-Nov-02 1:50
Brigg Thorp15-Nov-02 1:50 
GeneralRe: Problems with animation control Pin
Joaquín M López Muñoz14-Oct-02 4:08
Joaquín M López Muñoz14-Oct-02 4:08 
GeneralBuild time switch for VC Pin
Ryan_Roberts14-Oct-02 1:47
Ryan_Roberts14-Oct-02 1:47 
GeneralRe: Build time switch for VC Pin
Wouter Dhondt14-Oct-02 5:57
Wouter Dhondt14-Oct-02 5:57 
Questionhow can I suppress sending ICMP Messages ? Pin
Koep14-Oct-02 1:39
Koep14-Oct-02 1:39 
QuestionAsk about this breakpoint error? Pin
ooosawaddee314-Oct-02 1:32
ooosawaddee314-Oct-02 1:32 
AnswerRe: Ask about this breakpoint error? Pin
Steve S14-Oct-02 2:12
Steve S14-Oct-02 2:12 
Generalpipe, help if know few java Pin
includeh1014-Oct-02 1:30
includeh1014-Oct-02 1:30 
GeneralSTL Iterator question Pin
Senkwe Chanda13-Oct-02 23:36
Senkwe Chanda13-Oct-02 23:36 
GeneralRe: STL Iterator question Pin
Joaquín M López Muñoz14-Oct-02 0:03
Joaquín M López Muñoz14-Oct-02 0:03 
GeneralRe: STL Iterator question Pin
Jon Hulatt14-Oct-02 0:06
Jon Hulatt14-Oct-02 0:06 
GeneralRe: STL Iterator question Pin
Joaquín M López Muñoz14-Oct-02 0:24
Joaquín M López Muñoz14-Oct-02 0:24 
GeneralRe: STL Iterator question Pin
Senkwe Chanda14-Oct-02 0:12
Senkwe Chanda14-Oct-02 0:12 
QuestionHow to get text in CHtmlView at position that mouse clicked? Pin
sonshiro13-Oct-02 23:17
sonshiro13-Oct-02 23:17 
AnswerRe: How to get text in CHtmlView at position that mouse clicked? Pin
Stephane Rodriguez.13-Oct-02 23:36
Stephane Rodriguez.13-Oct-02 23:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.