#include "winplus.h"
#pragma hdrstop
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>

void CFormattedMessage::Report(const char *fmt, ...)
{
  char *ptr = lpBuffer;
  va_list marker;
  va_start(marker, fmt);
  vsprintf(lpBuffer, fmt, marker);
  va_end(marker);
  CWindowedControl wnd=CWindowedControl(GetForegroundWindow());
  hWnd=wnd.Handle;
  strncpy(szAppTitle,wnd.GetText(),127);
  /*
  int len=strlen(szAppTitle);
  for(int i=0;i<len;i++) {
    if(szAppTitle[i]=='-') {
      szAppTitle[i]=0;
      break;
    }
  }
  */
  DisplayString(ptr,MB_OK);
}

