Jump to content

alank2

Members
  • Content Count

    145
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by alank2

  1. 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.
  2. 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.
  3. 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.
  4. alank2

    TNetHTTPClient and custom header

    Thanks Remy; it is working good now.
  5. alank2

    TNetHTTPClient and custom header

    Would it be: NetHTTPClient1->CustomHeaders["Authorization"]=" Token token=key1, btoken=key2 ";
  6. 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?
  7. 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?
  8. alank2

    TSpeedButton - how to change the background color

    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?
  9. alank2

    Is there a way to outline text in a TLabel?

    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.
  10. alank2

    Is there a way to outline text in a TLabel?

    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!
  11. alank2

    TSpeedButton IsPressed issue

    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; } }
  12. alank2

    TSpeedButton IsPressed issue

    Are there any workarounds on this issue?
  13. alank2

    TSpeedButton IsPressed 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.
  14. 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?
  15. Thanks everyone; HitTest property fixed the issue for me!
  16. 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?
  17. Thank you; will give this a try!
  18. 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!
  19. Thank you; I will give those a try!
  20. Do you have an example of how to do that? I tried something with Draw earlier unsuccessfully as well.
  21. When I turn off the option "Generate underscores on symbol names" to eliminate them, then I get linker errors for some built in library functions: wcslen/wcscpy/wcscmp/qsort_s Any ideas why? I am running 10.3.3
  22. alank2

    DLL without underscore mangled functions

    Thanks Remy; pulling the __declspec(dllexport) allowed me to just export them in the DEF file. I didn't find a way to use a single project for both win32 and win64 so I put them in different projects with different DEF files and used a projectgroup to contain them both.
  23. alank2

    DLL without underscore mangled functions

    ALSO, is there a way to make a DEF file apply to only the 32-bit target platform in cppbuilder?
  24. alank2

    DLL without underscore mangled functions

    I keep reading this, but I am already have the function wrapped in extern "C" and it still has the underscore. DId some C compilers use an underscore and others not? Trying to make sense of this - do I have these right? Without extern "C", will it be the mangled C++ name with parameter suffix? With extern "C", will it simply be mangled to have a simple underscore before it. With extern "C" _and_ generate underscores option off, then it will drop the underscore, but then be incompatible with standard libraries.
  25. The warning is: [bcc64 Warning] file.cpp(1336): ISO C++11 does not allow conversion from string literal to 'wchar_t *' It is from: wchar_t *ConfigurationResultText[]={ L"No error", L"CFGERROR: Unable to create file", L"CFGERROR: Unable to open file or file is busy", L"CFGERROR: Unable to perform file IO", L"CFGERROR: File is not a CFG file", }; It seems that if I put (whcar_t*) before each string, that it eliminates the warning. My question is why? Doesn't the L"string" already mean it is a wchar_t * ? Or does the clang compiler see it as something different? I usually use the classic compiler, but in x64 that is not an option.
×