c++builder-xe

Border around a form with rounded corner in c++ builder XE

别等时光非礼了梦想. 提交于 2019-12-06 02:12:32
问题 I have made a C++ Builder XE form with rounded corner with the help of the following code BorderStyle = bsNone; void __fastcall TForm1::FormCreate(TObject *Sender) { HRGN frmrgn; frmrgn = CreateRoundRectRgn (0, 0, ClientWidth, ClientHeight,12,12); SetWindowRgn(Handle,frmrgn,true); } It looks cool but the border is missing, I tried many thing but not get good result so please help me to draw border of color RGB(96,96,96) And I want to make whole form dragable. 回答1: 1. Painting a dark grey

Border around a form with rounded corner in c++ builder XE

冷暖自知 提交于 2019-12-04 07:45:33
I have made a C++ Builder XE form with rounded corner with the help of the following code BorderStyle = bsNone; void __fastcall TForm1::FormCreate(TObject *Sender) { HRGN frmrgn; frmrgn = CreateRoundRectRgn (0, 0, ClientWidth, ClientHeight,12,12); SetWindowRgn(Handle,frmrgn,true); } It looks cool but the border is missing, I tried many thing but not get good result so please help me to draw border of color RGB(96,96,96) And I want to make whole form dragable. 1. Painting a dark grey border This one's easy, depending on how complex you want the border to look. If you just want an outline in

Firemonkey: TGrid usage on Embarcadero C++ Builder XE3

为君一笑 提交于 2019-12-02 07:16:15
I'm try to build a tool that reads data from a database and displays it as a table using a TGrid in Firemonkey. I need to use different types of columns like TCheckColumn and TPopupColumn but can't find any good guide or example on how to use them in C++ Builder. Any way, I managed to understand the usage of the TStringColumn,TProgressColumn setting the Value of the cell in the TGrid's event onGetValue. Does any one of you know how to set the Value for columns of type TCheckColumn, TImageColumn and TPopupColumn? thanks Daniele ---UPDATE--- I managed to use the TProgressColumn. This is what I

What's the scope of this string?

流过昼夜 提交于 2019-12-01 10:58:13
If I have the following code: { UnicodeString sFish = L"FISH"; char *szFish = AnsiString(sFish).c_str(); CallFunc(szFish); } Then what is the scope of the temporary AnsiString that's created, and for how long is szFish pointing to valid data? Will it still be valid for the CallFunc function? Will it's scope last just the one line, or for the whole block? The C++11 standard $12.2.3 says: When an implementation introduces a temporary object of a class that has a non-trivial constructor (12.1, 12.8), it shall ensure that a constructor is called for the temporary object. Similarly, the destructor

C++ Builder XE, Passing and handling user-defined messages

半城伤御伤魂 提交于 2019-12-01 01:13:21
I am trying to learn how to pass and handle messages in a VCL forms app. I've been digging the internet for some time and found this Suppose I have a progress bar I want to update using messages (btw if there's any other better way, I am eager to hear it) So I made a simple project to test the stuff and here's what I have (RECEIVER is a name of a form with progress bar, SENDER is a button used to send messages, updBar is a function to update progress bar, and 123456 is a message ID I want to use): Unit1.cpp: #include <vcl.h> #pragma hdrstop #include "Unit1.h" //--------------------------------