delphi-xe6

Delphi - Authorization TIdHttp fails over HTTP proxy

旧街凉风 提交于 2019-12-23 04:58:14
问题 I'm using Delphi XE 6 and TIdHttp component(Indy 10.6.0.5122) and trying to consume a SOAP service - http://www.webservicex.net/globalweather.asmx over a http proxy (CCProxy - http://www.youngzsoft.net/ccproxy/). The issue is that at the first attempt to connect to the webservice I receive an "Unauthorized" respone: <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body><h1>Unauthorized ...</h1> <h2>IP Address: xxx.xxx.xxx.:61295<br> MAC Address: <br>

how to expand only to the second level of the treeview

↘锁芯ラ 提交于 2019-12-23 04:36:24
问题 Ex.: - link 1 -- link 1.1 --- link 1.1.1(only) ---- link 1.1.1.1 (not expand) -- link 1.2 --- link 1.2.1 (only) ---- link 1.2.1.1 (not expand) I can expand only link 1.1, link 1.2... how? 回答1: There is no build-in functionality for expanding multiple items or items on a specific level, so there is no other way then traversing through the items. Call the Expand method on all second level items. As well on all first level items, otherwise the second level items will not be shown. Its Recurse

Testing the type of a generic in delphi

懵懂的女人 提交于 2019-12-22 04:06:25
问题 I want some way to write a function in delphi like the following procedure Foo<T>; begin if T = String then begin //Do something end; if T = Double then begin //Do something else end; end; ie: I want to be able to do different things based on a generic type I've tried using TypeInfo in System but this seems to be suited to objects rather than generic types. I'm not even sure this is possible in pascal 回答1: TypeInfo should work: type TTest = class class procedure Foo<T>; end; class procedure

GetAdaptersInfo not working on Delphi XE6

蹲街弑〆低调 提交于 2019-12-21 22:19:18
问题 I finally bit the bullet and bought XE6 and as expected, the Unicode conversion is turning into a bit of a nightmare. So if anyone can enlighten me on why this simple Windows API call fails, it would be most appreciated. The function does not return an error, the first call gets the correct buffer length, the second call fills the record with garbage. This works fine under Delphi 2007 but fails on XE6 with unicode garbage in the pAdapterinfo return record even though it is explicitly declared

VCL Style from DLL is affecting TMenuItem in Application

五迷三道 提交于 2019-12-19 17:47:54
问题 I am using Delphi XE6 and VCL styles. I have main application and dlls. My main application has enabled runtime themes and I am using vcl style files. I did quite similar thing to my DLLs. I enabled runtime themes and added VCL.Themes, VCL.Styles under uses and resource file with VCL style file within it. When DLL is loaded I load VCL style from resources and set it for DLL gui. Main app and DLL are not built with runtime packages. Now I have main app GUI styled with own style and DLL gui

Delphi XE6 - SOAP built with 'USE_INDY' connecting to a webservice over a proxy issue

若如初见. 提交于 2019-12-19 09:43:09
问题 I have an application which connects to a webservice using THttpRio component. Webservice has basic authentication. I've compiled the Delphi SOAP units using the 'USE_INDY' directive in order that the THttpRio component to use WinHttp. Now I need to get through a proxy to my webservice. Looking into the Soap.SOAPHTTPTrans unit I've fixed some bugs, but I do not know how I should set up the THttpRio component to get through the proxy. I've tried to set the proxy property of the HTTPRIO

Can I modify a constant in the RTL class System.Classes.TStream and rebuild it at runtime in Delphi XE6?

家住魔仙堡 提交于 2019-12-18 04:02:39
问题 I am trying to work around a known ugly performance limitation in System.Classes.pas, which has a 1980s era constant buffer limit ($F000) that looks like this: function TStream.CopyFrom(const Source: TStream; Count: Int64): Int64; const MaxBufSize = $F000; .... This is causing major performance penalties in our Delphi application. In delphi XE2 through XE5, we were able to modify this and use one of the following approaches: I could modify the Delphi sources, and then, by invoking dcc32.exe

How to make hovering over Minimize, Maximize, and Close buttons behave?

蓝咒 提交于 2019-12-18 03:11:39
问题 In a Delphi application, when you hover over a border icon, e.g.: Minimize Maximize Restore it doesn't behave correctly: Compare to an application that does behave correctly: Step to Reproduce Click File , New , VCL Forms Application - Delphi Click Run (F9) Hover over the Minimize, Maximize, or Close buttons. How to fix? Windows 10, 64-bit (running natively on desktop PC) Delphi XE6 Edit - It also fails with Delphi 7: and in Delphi 5: and in Delphi 4: I assumed (i.e. was afraid) that it was

DirectWrite RegisterFontFileLoader :create a font file loader and register it in Delphi without access violation

為{幸葍}努か 提交于 2019-12-13 18:40:07
问题 I am trying to register a DirectWrite (Windows 7, Windows 8) API based font file loader, and recreate in Delphi, the CustomFont demo from the Windows 7 SDK that shows how to use DirectWrite APIs with a custom font collection. This allows DirectWrite to use fonts you loaded yourself from inside your application resources that are not globally registered in the Windows font system. I am stuck with an access violation. A minimal sample is below. First a doubt I have about the Delphi Direct2D

PNG image from imagelist

一曲冷凌霜 提交于 2019-12-13 16:42:25
问题 How do I take a picture from a TImageList and put it into a TImage (or return it as a TGraphic )? The important point is that a TImageList can contain 32-bpp alpha blended images. The goal is to get one of these alpha-blended images and place it in a TImage . This means at some point i would likely require a TGraphic . Although, strictly speaking, my question is about placing an image from an ImageList into an Image . If that can be accomplished without an intermedate TGraphic then that is