HOMEPAGE

Development Sites - Information for Software-Developers

Developer Platform
The first instructions
Installations
System param. structures
connect to MeteoCom
simple screen drawing
own data drawing
Picture service
File Management
EmailBulletin Service

MeteoTools::DecodeMPfromFile 

void DecodeMPfromFile(char *filename);

Parameters

    filename

    A char* that hold the fullpath of a file.

Remarks

    DecodeMPfromFile converts a text- or zip- file to a Meteo Server Data file.
    The text must be compatible to a
MeteoPack.

Example
 

void CMeteoView::OnDropFile(char *filename)
{
   BeginWaitCursor();
   DecodeMPfromFile(filename);
   EndWaitCursor();
}

Note:
         Drag and Drop
         The MeteoTools-DLL catch the Drag & Drop function and calls the internal convert routine.
         But, only if you call the function DragAcceptFiles in your application.
        
Only that let the application accept dropped files.

         m_pMainWnd->DragAcceptFiles();

     
    The following function is a copy of the original MeteoTools-DLL
    and is used as an example as you catch itself.


LRESULT CMeteoTools::WindowProc(UINT msg, WPARAM wp, LPARAM lp)
{
  char         file[512];
  UINT         wFilesDropped;
  HCURSOR      hcurPrev
;

  switch(msg)
  {
  ....
  ....
  ....
  case WM_DROPFILES:
           wFilesDropped = DragQueryFile((HDROP)wp,0,file, 512);
           if (wFilesDropped)
              {
              hcurPrev =::SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
              MPDecodeFromFile(file);
              ::SetCursor(hcurPrev);
              }
           DragFinish((HDROP)wp);
           return NULL;
   }

  return Default();
}

          
     

See Also   DecodeMPfromClipBoard

 

   Copyright 2006 © Bonito Germany.   
www.bonito.net