delphi-xe2

TMonthCalendar & Delphi Styles (Delphi XE2)

左心房为你撑大大i 提交于 2019-12-12 13:18:37
问题 TMontCalendar seems to be a Windows wrapper so it can't be affected by the new VCL Styles, do you know a solution for it ? 回答1: The TMonthCalendar is wrapper for the MONTHCAL_CLASS and as far i know this control doesn't support owner draw, but provides the CalColors property which allow you to set the colors of the elements of the calendar, but this property only works when the themes is not enabled. So first you must call the SetWindowTheme function to disable the themes in the calendar and

DWScript Install

守給你的承諾、 提交于 2019-12-12 12:13:03
问题 I'm trying to install DWScript in XE2 and I seem to be struggling. I can't find any up to date installation instructions, and the older instructions I did find no longer seems applicable. I've tried both head from the svn repository, and also one of the previous releases and haven't had much luck with either. I've added the source directory to my library path. When I opened dwsLib originally I had a TdwsUnit not found message, although it appears to compile. Both dwsLibDesignOnly and

Coinitialize has not been called error message

血红的双手。 提交于 2019-12-12 11:48:58
问题 I am in the process of coding a console application that will create a firewall exception for my main app called Client.exe which uploads a few documents to our servers via FTP. I borrowed RRUZ code from Delphi 7 Windows Vista/7 Firewall Exception Network Locations my code looks like this: program ChangeFW; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils, ComObj; var ExecName: string; procedure AddExceptionToFirewall(Const Caption, Executable: String); const NET_FW_PROFILE2_DOMAIN = 1; NET

E2009 Incompatible types: 'Parameter lists differ'

百般思念 提交于 2019-12-12 11:22:51
问题 I get the following error: E2009 Incompatible types: 'Parameter lists differ' However I disagree, looking at the definitions I can see no difference. Here's the record definition: type TFastDiv = record private ... DivideFunction: function (const Buffer: TFastDiv; x: integer): integer; And here's the Mod function I want to assign: function dividefixedi32(const Buffer: TFastDiv; x: integer): integer; asm The following assignment issues the error: class operator TFastDiv.Implicit(a: integer):

What should I do about an internal error when I declare a generic “array of T”?

邮差的信 提交于 2019-12-12 10:35:05
问题 This unit fails to compile in XE2 Update 3 with "[DCC Fatal Error] Test.pas(22): F2084 Internal Error: URW1147" unit Test; interface type TSorter<T> = procedure(var Values: array of T); TTest = class public procedure Sort<T>(const Sorter: TSorter<T>); end; implementation procedure TTest.Sort<T>(const Sorter: TSorter<T>); begin end; end. I have submitted a QC report: QC#103671. Does anyone have an idea about workaround for this? 回答1: If you replace TSorter declaration with TSorter<T> =

Delphi wrapping TXMLData in SOAP request with <schema> tag

久未见 提交于 2019-12-12 10:08:20
问题 I'm sending a XML using TXMLData and Delphi is adding a tag in the request, my code is like this: RequestData := TXMLData.Create; RequestData.LoadFromXML('<MyXML>[contents here]</MyXML>'); MyService.ExecuteRequest(RequestData); I used the OnBeforeExecute of the THTTPRIO to get the content of the Request and the content is wrapped in a tag, something like this: <SOAP-ENV:Body> <schema xmlns="http://www.w3.org/2001/XMLSchema"> <MyXML> </schema> </SOAP-ENV:Body> I can't figure out why this tag

Does TRichEdit support Unicode?

我只是一个虾纸丫 提交于 2019-12-12 10:03:27
问题 I'm trying to write a wrapper class around TRichEdit that can encode and decode RTF to/from plaintext. This is what I've written so far: type TRTF = class private FRichEdit : TRichEdit; procedure SetText(const AText: string); function GetText: string; class function Convert(const AInput: string; AEncode: Boolean): string; inline; static; public constructor Create; destructor Destroy; override; class function Decode(const AInput: string): string; static; class function Encode(const AInput:

Delphi XE2 Indy 10 TIdCmdTCPServer freezing application

孤街浪徒 提交于 2019-12-12 09:22:50
问题 I'm just starting to learn how to use the Indy 10 components in Delphi XE2. I started with a project that will use the command sockets ( TIdCmdTCPServer and TIdCmdTCPClient ). I've got everything set up and the client connects to the server, but after the client connects, any command the server sends to the client just freezes the server app, until it eventually crashes and closes (after a deep freeze). Project Setup The setup is very simple; there's a small server app and a small client app,

Access violation at address 00822135 in module 'GUI.exe'.Read of address 00000040 [closed]

做~自己de王妃 提交于 2019-12-12 06:55:38
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 6 years ago . There is sqlite a database - a descriptor, containing the list of tables, the list of domains, the list of fields, the list of restrictions (primary and

Cannot assign data to client dataset

时光毁灭记忆、已成空白 提交于 2019-12-12 05:27:01
问题 I'm using TClientDataSet assigned with local data in my Delphi application to compare data between 2 tables located in 2 different databases. Things I'm using: SpPlansQuery: TADOQuery – original data query PPUQuery: TADOQuery – changed data query (uses different ADO connection than SpPlansQuery) ComparisonDataSet: TClientDataSet – dataset showing only differences between 2 previous queries I'm trying to fill ComparisonDataSet as follows (I heavily reduced my code to highlight problem):