// ncDlg.h : header file
//

#if !defined(AFX_NCDLG_H__40B3C7EE_D10C_4AD2_AAA0_6604EF110A41__INCLUDED_)
#define AFX_NCDLG_H__40B3C7EE_D10C_4AD2_AAA0_6604EF110A41__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "bitmapwindow.h"
#include "BitButton.h"

#include "skinlistctrl.h"
#include "mcimp3.h"
#include "ProgCtrl.h"
#include "sliderctrl.h"
#include "MFECToolTip.h"
#include "TransparentStatic2.h"
#include "ClassListWnd.h"

#define WM_NOTIFYICON	WM_USER+5
#define IDI_ICON		0x0005
#define IDT_APPLY		WM_USER+6
#define MAX_PATH		260

//list flag
#define MUSIC_NOW 1
#define PICTURE	2
#define EBOOK 3
//dlg size
#define DLG_MAX 1
#define DLG_RST 2
#define MYWM_NOTIFYICON WM_USER+1

//music play flag
#define MUSICPLAY	0
#define MUSICSTOP	1
/////////////////////////////////////////////////////////////////////////////
// CNcDlg dialog

class CNcDlg : public CDialog
{
// Construction
public:
	CNcDlg(CWnd* pParent = NULL);	// standard constructor
	CBitmapWindow m_pic1;
	CBitButton		m_btback;
	CBitButton		m_btplay;
	CBitButton		m_btnext;
	CBitButton	m_btclose;
	CBitButton	m_btmin;
	//CBitButton	m_btmax;
	CBitButton  m_btmusic;
	CBitButton  m_btpicture;
	CBitButton  m_btebook;
	CBitButton  m_btndir;
	CBitButton  m_btdel;
	CBitButton  m_btrefresh;
	CBitButton  m_mute; 
	NOTIFYICONDATA nd;
	int statflag;
	int m_musicflag;
	int checkncflag;
	CString playingmusicname;
	int oldwidth,oldhight,px,py;
	//CPicButton m_mute;
	CBitmapSliderCtrl	m_volume;
	CClassListWnd	m_SkinList;
	//CSkinListCtrl m_SkinList;
	MCIMP3 mp;//mp3 play
	CFont font;
	char m_DefPath[MAX_PATH];
	CBmpProgCtrl	m_cardspace;
	int timer1,timer2;
	CStringArray straInfo ;
	CMFECToolTip		m_toolTip;
	CTransparentStatic2    m_freespace;
	CStatic m_freespace_bk;
	HRESULT getlistinfo(int datatype);
	HRESULT ShowCardSpace();
	//skin

	char m_SkinPath[MAX_PATH] ;
	void LoadButtonSkin(char *m_SkinFile,char *m_ButtonName);

	//skin
// Dialog Data
	//{{AFX_DATA(CNcDlg)
	enum { IDD = IDD_NC_DIALOG };

	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CNcDlg)
	public:
	virtual BOOL DestroyWindow();
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	CToolTipCtrl m_tooltip;
	HICON m_hIcon;
	HICON m_hIcontp;
	int m_listflag;


	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnButton1();
	afx_msg void Onmax();
	afx_msg void OnMin();
	afx_msg void OnClose();
	afx_msg void OnPlayMusic();
	afx_msg void OnListMusic();
	afx_msg void OnListPicture();
	afx_msg void OnListBook();
	afx_msg void OnAddFile();
	afx_msg void OnDelFile();
	afx_msg void OnRefreshList();
	afx_msg void OnNextFile();
	afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnMute();
	afx_msg BOOL OnMouseMove(UINT nFlags,CPoint pt);	
	afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
	afx_msg void OnMove(int x, int y);
	afx_msg void OnCancelMode();
	afx_msg void OnKillFocus(CWnd* pNewWnd);
	afx_msg void OnDropFiles(HDROP hDropInfo);
	afx_msg void OnRclickList(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnDBclickList(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg LRESULT OnNotifyIcon(WPARAM wParam, LPARAM lParam);
	afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
	afx_msg void OnMyIconNotify(WPARAM wParam,LPARAM lParam); 
	afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
	//afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
	//}}AFX_MSG
	//afx_msg void OnNotifyIcon(WPARAM wParam, LPARAM lParam);
	void InitFace();
	void sort();
	void SetButtonStatus(BOOL btstat);
	void redrawsomepart();
	void playmusic();
	void getdefpath();
	void CheckNC();
	void SetSkin(char *SkinFile);//load skin file
	
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnNMCustomdrawVolume(NMHDR *pNMHDR, LRESULT *pResult);
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_NCDLG_H__40B3C7EE_D10C_4AD2_AAA0_6604EF110A41__INCLUDED_)
