Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi WM_COPYDATA funktioniert nicht bei minimierter Form (https://www.delphipraxis.net/149200-wm_copydata-funktioniert-nicht-bei-minimierter-form.html)

Shark99 16. Mär 2010 15:44


WM_COPYDATA funktioniert nicht bei minimierter Form
 
Ich habe folgenden Code in der Mainform:

Delphi-Quellcode:
  private
      procedure wmcopydata   ( var msg: twmcopydata ) ; message WM_COPYDATA;
 ...

procedure TTestForm1.wmcopydata(var msg: twmcopydata);
begin
   try

      if msg.msg = wm_copydata then
      with pcopydatastruct( msg.copydatastruct )^ do
      begin
        // verarbeitung
      end;
end;
Eine C++ Anwendung schickt Nachrichten an die Delphi App mit dem Code:

Delphi-Quellcode:
    HWND handle = FindWindow("TTestForm1", NULL);

    if ( IsWindow( handle ) == TRUE ) { SendMessage( handle , WM_COPYDATA , 0  , LPARAM(&x) ); }
Funktioniert so weit gut.

Wird die Form jedoch minimiert, kommen keine Nachrichten mehr an.

Was kann ich dagegen tun?


Alle Zeitangaben in WEZ +1. Es ist jetzt 01:24 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz