Several details of the Flash Player with C ++ Builder

zhaozj2021-02-16  58

With a few details of the C builder to make the problem of flash player: Flash

Use C Builder to import the ShockWaveFlash control to make a flash player, the specific process refers to other articles, this article briefly talks about the small problems in the production.

1. The aligh property ofshockwaveflash is set to AlClient, and the FORM change is the change of ShockWaveFlash cannot change accordingly. Solution:

Add code to the Form's OnResize event, as follows: activeControl = null; activeControl = shockwaveflash1;

2. Played Flash background colors are the background color of the last play movie, except for the first play. Solution:

Add code before loading the movie in Flash: ShockWaveflash1-> BGColor = "0";

Then shockwaveflash1-> movie = ...

3. Right-click on Flash and do not pop up your own specified menu, but the Flash's own menu. Solution:

Use the TAPPLICATIONEVENTS control (Additional page) in its OnMessage Riga code, as follows

void __fastcall TForm1 :: ApplicationEvents1Message (tagMSG & Msg, bool & Handled) {if (Msg.message == WM_RBUTTONDOWN && Msg.hwnd == ShockwaveFlash1-> Handle) {Handled = true; PopupMenu1-> Popup (Msg.pt.x, Msg .pt.y);}}

Shockwaveflash1 is Flash control, PopupMenu1 is the menu of right-click to pop up

转载请注明原文地址:https://www.9cbs.com/read-16864.html

New Post(0)