

alank2
Members-
Content Count
176 -
Joined
-
Last visited
-
Days Won
1
Everything posted by alank2
-
Playing an MP4 animation / unsupported media file / cppbuilder
alank2 replied to alank2's topic in FMX
I tried CoInitialize(NULL) and also CoInitializeEx(NULL, COINIT_MULTITHREADED) in FMXmain - same error. Do I need to register the mp4 somehow? I saw a mention of this, but it was in Delphi. -
Playing an MP4 animation / unsupported media file / cppbuilder
alank2 replied to alank2's topic in FMX
Hi Remy, >did you initialize the COM library beforehand?) What do I need to do to do this? -
Playing an MP4 animation / unsupported media file / cppbuilder
alank2 replied to alank2's topic in FMX
Any other thoughts / things to try? -
Playing an MP4 animation / unsupported media file / cppbuilder
alank2 replied to alank2's topic in FMX
Hi Remy, 10.3, Windows 10 It plays fine when double clicked and I also tried the Ocean.mp4 from the Embarcadero VideoPlayback sample. I even tried compiling the sample. The artifacts were when playing the AVI (the only file that would play), they looked like a failing video signal with part of the image updated, etc. I could try another AVI to see if it plays properly, but I really want to get the MP4 playing if that is a possibility. I tried what I saw you suggest in that stackoverflow post (#include <FMX.Media.Win.hpp>), but it fails with a ton of errors and won't compile if this header is included. I appreciate the help! -
I right clicked the speed button and chose Edit Custom Style. I replaced the background with a TRectange and set its fill to the color I want. It works on my development system (Win10), but when I take it to a Win7 box, it does not work and the background color is not there. In the style designed it says Platform Windows 10 Desktop, but the only other option is Default. When I select default it does not have a "SpeedButton1Style1". Any way I can set this to work on any system that runs it?
-
Trying to change a speedbutton background color, but having problems
alank2 replied to alank2's topic in FMX
Thanks Serge; I will give this a try. My solution yesterday was to just put a TImage on top of the speedbutton and change hittest/align=client. -
Trying to change a speedbutton background color, but having problems
alank2 replied to alank2's topic in FMX
I tried adding a Win7 and Win8 to the Win10 under the custom button, but still when the app runs on the win7 box it has a different style. I also tried turning off "Enable Runtime Themes" thinking maybe it wouldn't restyle the application and go with what it is and this did not solve the issue either. -
So that the font itself is black for example, but it has a white outline immediately around the font, but not the entire background. I am wanting to overlay a TLabel on top of a graphic and make it visible if the graphic is dark or light.
-
I need to specify a custom header that they have a curl example for. $ curl "https://examplesite" -H 'Authorization: Token token=key1, btoken=key2' -X GET The documentation for the TNetHTTPClient says this - can I send the above "Authorization: Token token=key1, btoken=key2" as a custom header using the TNetHTTPClient component? If so, how? Sending a Request with Custom Headers The HTTP client component and the HTTP request component both allow you to set custom headers. The custom headers that you can specify are: In the HTTP client component: Accept AcceptCharSet AcceptEncoding AcceptLanguage ContentType UserAgent In the HTTP request component: Accept AcceptCharSet AcceptEncoding AcceptLanguage When you execute a request, the THTTPClient.Execute method of the HTTP framework combines the custom headers from the HTTP client component and the corresponding HTTP request component and adds those headers to the final request.
-
Thanks Remy; it is working good now.
-
Would it be: NetHTTPClient1->CustomHeaders["Authorization"]=" Token token=key1, btoken=key2 ";
-
I've read about a win32 api function called PrintWindow, but often in delphi/cppbuilder there is an easier way. I need to get the graphic bitmap of a different application's window. Any tips or ideas?
-
I've done enough searching to know that it is based on a bitmap; I even remember drilling down and opening a bitmap that looked like the source of how it figures out how to draw controls. I am creating a number the TSpeedButton's programmatically and I have been using the StyleLookup="buttonstyle" which looks mostly like what I want except it has a grayish background which I need to change to a white background. What is the easiest way to accomplish that?
-
I right clicked it and created a custom style. Then I found the background and edited NormalLink to change where it was pointed to to pointing to the middle of a white box so it would become white. Are you saying you replaced the background TButtonStyleObject with a TRectangle? Can the bitmap graphics that NormalLink points to be edited? What if I wanted to add something to that bitmap?
-
I'm not in love with it, but I ended up using 5 TLabels - one offset to each corner underneath the real one to give it an outline.
-
Many of those examples are large fonts like a WordArt type of thing. Can this approach work on smaller font sizes like 12pt? Thank you for the help!
-
I created a TSpeedButton and set the StaysPressed property to true. I then was using IsPressed to see if it is pressed or not in the OnClick event. If I click it slowly it works, but if I click it quickly, the 2nd time the event is fired (and it does fire), the IsPressed property is not changed, but is the previous state. void __fastcall TTest::UpdateSearch() { //debug does it fire when clicked fast static int i1; i1++; Label1->Text=i1; if (Search[0]==0) { if (SBSpecialOnly->IsPressed) LSearch->Text="Type to search special"; else LSearch->Text="Type to search"; LSearch->FontColor=claDarkgray; } else { LSearch->FontColor=claBlack; LSearch->Text=Search; } }
-
Are there any workarounds on this issue?
-
It seems to be an immediate type thing. If I have code that looks at IsPressed later on, it seems to be correct, but not always in the OnClick that is changing it.
-
I am pretty new to FireMonkey. What I need is a grid of X wide Y tall buttons that can be clicked. No scrolling. Each button needs a couple text labels and a graphic. I need to build the grid at design time. I don't mind building the controls dynamically if that is easier. My original plan was to use a TSpeedButton and put TLabels and an TImage on it. If I hover over a TLabel, it activates the button, and clicking activates the buttons onclick event not the label's. TImage does not work the same way however - can it be made to allow hovering to pass through to the button underneath it? Or is there a better way to go about this?
-
Thanks everyone; HitTest property fixed the issue for me!
-
Using cppbuilder I can load a PNG file into a TImage, but then I want to merge another PNG file into it using CopyRect. I think there is some issue with it not being a bitmap that causes it to give an error when I try. I've tried some searching about this, but didn't really see anything that helped. Is thee a way to load the PNG, then perform some operation on it that renders it as a bitmap that I can then CopyRect to?
-
How to load a PNG file into TImage, then copy another PNG file into it
alank2 replied to alank2's topic in VCL
Thank you; will give this a try! -
How to load a PNG file into TImage, then copy another PNG file into it
alank2 replied to alank2's topic in VCL
The error was can only modify an image if it contains a bitmap. It works with BMP files, but not PNG files. Is the Draw method above something that will convert it from PNG to BMP? I ended up just using two TImage's, one placed on top of the other, to do what needed to be done, but I would have liked to figure out how to make PNG's work with CoptRect(). Thanks! -
How to load a PNG file into TImage, then copy another PNG file into it
alank2 replied to alank2's topic in VCL
Thank you; I will give those a try!