home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / dtx9303 / alcheck / alchkmsg.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1993-04-05  |  1.1 KB  |  49 lines

  1. //
  2. //  Interface zum Debug-Tool ALCHECK
  3. //  Durch diese Funktion ist eine Steuerung von ALCHECK aus einer
  4. //  Anwendung heraus m÷glich.  
  5. //
  6.  
  7. #include <windows.h>
  8. #include <string.h>
  9.  
  10. //  Fⁿr die Registrierung der Kommunikationsnachricht
  11. static WORD wRegMsg = 0;
  12.  
  13.  
  14. //
  15. //  Sendet eine Nachricht an das ALCHECK-Fenster
  16. //  Die Syntax entspricht der Funktion wvsprintf
  17. //
  18. //  PARAMETER
  19. //    lpFormat   : Formatstring mit Steuerzeichen  
  20. //    lpArgList  : WORD-Array (siehe wvsprintf) 
  21. //    sFix         : <> 0 : Fixierte Werte aktualisieren        
  22. //                    0 : Nur aktuelle Werte aktualisieren 
  23. //
  24. int AlCheckNotify (LPSTR lpFormat, LPSTR lpArgList, short sFix)
  25. {
  26.  char     ac[256];
  27.  HWND    hwndAlCheck;
  28.  
  29.  // Wenn die Nachricht noch nicht registriert wurde 
  30.  if (!wRegMsg) wRegMsg = RegisterWindowMessage("ALCHECK_NOTIFY");
  31.  
  32.  if (lpArgList)
  33.    wvsprintf(ac,lpFormat,lpArgList);
  34.  else
  35.    _fstrcpy(ac,lpFormat);
  36.  
  37.  hwndAlCheck = FindWindow("BorDlgWin-ALCHECK",NULL);
  38.  
  39.  if (hwndAlCheck)
  40.  {
  41.    SendMessage(hwndAlCheck,wRegMsg,WORD(sFix),LONG(ac));
  42.    return (1);
  43.  }
  44.  else
  45.    return(0);
  46. } // AlCheckNotify
  47.  
  48.  
  49.