delphi-2006

Why doesn't {$ifopt FINITEFLOAT ON} compile?

妖精的绣舞 提交于 2019-12-12 08:46:30
问题 I have the construct: {$ifopt FINITEFLOAT ON} {$message 'FINITEFLOAT option ON' } {$else } {$message 'FINITEFLOAT option OFF' } {$endif } in my source and it won't compile! It's got to be something stupid. The error is: E1030 Invalid compiler directive: '$IFOPT' at the first line, but it is the FINITEFLOAT it's complaining about. You don't seem to be able to specify anything except the single letter directives like R+ etc as the argument of IFOPT. Am I missing something here? 回答1: You are

Getting WPARAM in TWndMethod to return 4 bytes

試著忘記壹切 提交于 2019-12-11 11:43:41
问题 I'm using AllocateHWnd in a class I'm writing to receive system messages with a TWndMethod and the messages I'm receiving need to handle a 4-byte WPARAM, which specifically references a pointer. But I'm only getting 2 bytes in return. How do I set up things so I can correctly receive these messages within the class? Edit: Specific code. I'm setting a message event up using SHChangeNotifyRegister, based on a Microsoft sample I downloaded. The proc works enough to pull back events (in lEvent)

Why doesn't this D2006 code to fade a PNG Image work?

删除回忆录丶 提交于 2019-12-10 19:34:56
问题 This question springs from an earlier one. Most of the code is from suggested answers that probably worked in later versions of Delphi. In D2006 I don't get the full range of opacity, and the transparent part of the image shows as white. Image is from http://upload.wikimedia.org/wikipedia/commons/6/61/Icon_attention_s.png. It is loaded from the PNGImageCollection into the TImage at run-time because I have found you have to do this as the image doesn't remain intact after the DFM is saved. For

Creating Accessible UI components in Delphi

ε祈祈猫儿з 提交于 2019-12-10 18:54:11
问题 I am trying to retrieve accessible information from a standard VCL TEdit control. The get_accName() and Get_accDescription() methods return empty strings, but get_accValue() returns the text value entered into the TEdit. I am just starting to try to understand the MSAA and I'm a bit lost at this point. Does my TEdit need to have additional published properties that would be exposed to the MSA? If so would that necessitate creating a new component that descends from TEdit and adds the

How to make a TScrollBox with Transparent Background?

孤街醉人 提交于 2019-12-10 11:40:41
问题 I have a TFrame with a TImage as background. This frame serves as ancestor for other frames that I put on a limited space in the main TForm . So it is just a user interface base for the other frames. I need to put many controls inside these frames, because they will handle large database forms. As the main form has limited space, I need to put a TScrollBox in all the TFrame space except for the title bar. But this covers the backgroud image. How do I make this ScrollBar to be background

Known constructs that crash the Delphi IDE

倾然丶 夕夏残阳落幕 提交于 2019-12-08 05:27:00
问题 I'm using Turbo Explorer 2006 (update 2), and sometimes the IDE crash in a certain unit, specially when I try to use class-completion. The unit (and whole project) are in production and have run fine for years, with daily modifications, it's just the IDE tools that fail. Usually if this happens, Delphi survives the crash, but some parts of the IDE are defunct (e.g. debug values in tooltips for expressions whose unit is not in the .dpr) I suspect the parser dies on some specific construct,

Known constructs that crash the Delphi IDE

偶尔善良 提交于 2019-12-07 20:35:36
I'm using Turbo Explorer 2006 (update 2), and sometimes the IDE crash in a certain unit, specially when I try to use class-completion. The unit (and whole project) are in production and have run fine for years, with daily modifications, it's just the IDE tools that fail. Usually if this happens, Delphi survives the crash, but some parts of the IDE are defunct (e.g. debug values in tooltips for expressions whose unit is not in the .dpr) I suspect the parser dies on some specific construct, probably something ifdef'ed, since this unit is an enormous switchboard of systems. Does sb know specific

Is there any simple automated way of finding out all the source files associated with a Delphi project?

若如初见. 提交于 2019-12-07 17:43:56
问题 I like to backup up the source code set for a project when I release a version. I use GExperts project backups, which seems to gather up all the files in the project manager into the ZIP file. You can also add arbitrary files to this file set, but I'm always conscious of the fact that I haven't necessarily got all the files. Unless I specifically go though the uses clauses and add all the units I have sources for to the project, I'll never be sure of storing all the files necessary to

How to put configuration information inside the executable?

狂风中的少年 提交于 2019-12-07 14:01:16
问题 If we want to store critical information, like passwords and server addresses, inside the executable file generated by the Delphi compiler, how can we do that, without knowing the final executable size and binary structure, like at the end of the file for example? Side note: The text to be stored is already encrypted; and in some computers the windows don't give access to write in the registry, specially when the user is not administrator, and there are hacks to monitor registry changes and

How to handle UTF-8 and ANSI conversion before Delphi 2009?

不羁的心 提交于 2019-12-07 12:18:15
问题 In Delphi 2009 we have: RichEdit1.Lines.LoadFromFile(OpenDialog1.FileName,TEncoding.UTF8); RichEdit1.Lines.SaveToFile(OpenDialog2.FileName,TEncoding.Unicode); How do I do that on Delphi 2006 if I do not have TEconding yet? Is there someway to transport that newer library back there? or is there a solution hidden in the Web? 回答1: I believe that UTF8Encode and UTF8Decode were present even before Delphi 2009. So you can decode/encode byte strings manually. (I have done that myself.) 回答2: Here is