Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


FPiette last won the day on September 4

FPiette had the most liked content!

Community Reputation

82 Excellent

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. FPiette

    XMLDocument and popup windows

    This is governed by a registry key: https://support.microsoft.com/en-us/help/182569/internet-explorer-security-zones-registry-entries-for-advanced-users It is likely that your program need elevated privileges to change that.
  2. FPiette

    XMLDocument and popup windows

    Using your code with Delphi 10.4.1 and your test file, I cannot reproduce the issue! Maybe something else in your application? Try with a simple project with only one button and your code in the OnClick event.
  3. FPiette

    XMLDocument and popup windows

    You should post the code you use to validate the XML document. Build a minimal program which reproduce the error you get.
  4. FPiette

    MsgWaitForMultipleObjects Usage

    That's why I said in the message to prevent re-entry issue. as with many things, calling ProcessMessages is perfectly correct if you understand what happens when you do so.
  5. FPiette

    MsgWaitForMultipleObjects Usage

    Sure I did since the poster (You !) want to process all inputs (QS_ALLINPUT). If you don't consume messages then MsgWaitForMulpitleObjects will immediately return WAIT_OBJECT_0 + 1. And if you don't process the messages, the main thread will be freeze and you asked to not freeze. Maybe I misunderstood your question. If this is the case, a better description is welcome.
  6. It is possible to overcome some of the issues by implementing a notification mechanism. Much like it is in any TForm for components it owns.
  7. FPiette

    is the site infected?

    Does it happens to you only or also other computers on the company LAN?
  8. FPiette

    MsgWaitForMultipleObjects Usage

    For logging, I find handy to use OutputDebugString. The messages are shown in the debugger log view.
  9. FPiette

    MsgWaitForMultipleObjects Usage

    procedure TForm9.Button1Click(Sender: TObject); var Thrd : TThread; Ret : Cardinal; HandleArray : array [0..0] of THandle; begin Thrd := TThread.CreateAnonymousThread( procedure begin Sleep(5000); Memo1.Lines.Add('End of Thread'); // Not reliable! end ); Thrd.Start; HandleArray[0] := Thrd.Handle; // The thread above is waiting for 10 seconds within itself. // We will wait for the above thread to finish before the main thread freezes while TRUE do begin Ret := MsgWaitForMultipleObjects(1, HandleArray[0], FALSE, INFINITE, QS_ALLINPUT); if Ret = WAIT_OBJECT_0 then begin Memo1.Lines.Add('WAIT_OBJECT_0'); break; end; if Ret >= (WAIT_OBJECT_0 + 1) then begin Memo1.Lines.Add('WAIT_OBJECT_0+1'); Application.ProcessMessages; continue; end; if Ret = WAIT_TIMEOUT then begin Memo1.Lines.Add('WAIT_TIMEOUT'); break; end; Memo1.Lines.Add('Else') end; Memo1.Lines.Add('Thread finish'); end; Pay attention to change the access to Memo1 from the thread. Pay attention to re-entry issue. You should probably prevent it.
  10. FPiette

    MsgWaitForMultipleObjects Usage

    This doesn't answer your question, but using Memo1 from the thread is not allowed. VCL is not thread safe.
  11. FPiette

    is the site infected?

    Everything still normal as seen from here. It is probably your system which has been compromised. You should urgently conduce a malware scan with up-to-date anti-malware software. If you don't find anything, try scanning by booting you system out of an independent bootable device (Rescue disk or something like that).
  12. FPiette

    Getting microphone Volume and sound Volume

  13. Thanks. This is Direct2D 1.0 code that already use. I see you get a DeviceContext when you need it to render the SVG document. So you are not following at all what all the articles about Direct2D 1.1 explain. I wonder where the drawback is... Future will tell...
  14. My application has thousands lines of code. I need a tool which does this automatically.
  15. But then I have to manage a huge number of bitmaps, frames, checkboxes in that alone window. Now i have a component, like a TPicture which does everything and I use NxM of such components, only changing the coordinates according to the size the use gives to the application window. This approach is very efficient with Direct2D 1.0 and 10 times slower with Direct2D 1.1. How do you get the RenderTarget? Do you do the same as with Direct2D 1.0, that is just call CreateHwndRenderTarget or CreateDCRenderTarget? No Direct3D device, DXGIBackBuffer, SwapChain and other things mentioned in https://docs.microsoft.com/en-us/archive/msdn-magazine/2013/may/windows-with-c-introducing-direct2d-1-1 and https://katyscode.wordpress.com/2013/01/23/migrating-existing-direct2d-applications-to-use-direct2d-1-1-functionality-in-windows-7/ ? Thanks