#ifndef COMMON_H
#define COMMON_H
#include <windows.h>
#include "vgm.h" // VGM header
typedef unsigned short wchar; // For Unicode strings
#define MINGD3VERSION 0x100
#define REQUIREDGD3MAJORVER 0x100
#define MINVERSION 0x100
#define REQUIREDMAJORVER 0x100
char* PrintTime(char *s,double timeinseconds);
int IsURL(char *url);
void OpenURL(HWND winamp_wnd, char *url, char *TempHTMLFile, int UseMB);
int FileSize(char *filename);
struct TVGMHeader *ReadVGMHeader( gzFile *fh, BOOL needsGD3 );
struct TGD3Header *ReadGD3Header( gzFile *fh );
//-----------------------------------------------------------------
// GUI helpers
//-----------------------------------------------------------------
#define GETTRACKBARPOS( wnd, id ) SendDlgItemMessage( wnd, id, TBM_GETPOS, 0, 0 )
#define DISABLECONTROL( wnd, id ) EnableWindow( GetDlgItem( wnd, id ), FALSE )
#define ENABLECONTROL( wnd, id ) EnableWindow( GetDlgItem( wnd, id ), TRUE )
#define HIDECONTROL( wnd, id ) ShowWindow( GetDlgItem( wnd, id ), FALSE )
#define SETCONTROLENABLED( wnd, id, enabled ) EnableWindow( GetDlgItem( wnd, id ), enabled )
#define SETCHECKBOX( wnd, id, checked ) SendDlgItemMessage( wnd, id, BM_SETCHECK, checked, 0 )
void SetupSlider(HWND hDlg, int nDlgItem, int min, int max, int ticfreq, int position);
#endif