Click here to Skip to main content
15,886,763 members
Articles / Desktop Programming / MFC

Pretty WinAPI Class

Rate me:
Please Sign up or sign in to vote.
4.90/5 (36 votes)
23 May 20074 min read 96.1K   2.7K   80  
New library version that is not WTL/MFC dependent
/*
 * 
 *
 * Copyright 2007 Francisco Campos. All rights reserved.
 * BEYONDATA  PROPRIETARY. Use is subject to license terms. </F>
 *
 *			 \|||/
 *			 |o_o|
 *	----o00o-------o00o---      
 **/

#if !defined(AFX_WORKTAB_H__A711D725_2268_4750_B58E_5218AD3BC0A5__INCLUDED_)
#define AFX_WORKTAB_H__A711D725_2268_4750_B58E_5218AD3BC0A5__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#define SCROLLLEFT  0x889
#define SCROLLRIGHT 0x890
//****************************************************************

class  CWorkTab : public CContainer  
{
public:
	
	//***************************************
		CWorkTab();
		virtual ~CWorkTab();
	//***************************************

public:

	void  virtual Drawtabs(CGDI* dc);
	void  OnHScroll(UINT nSBCode, UINT nPos, HWND hScrollBar); 
	void  PintaSeparador(CGDI* dc);
	void  OnSpiNiz(WPARAM wParam, LPARAM lParam, HWND hWnd);
	void  OnSpiNde(WPARAM wParam, LPARAM lParam, HWND hWnd);
	void  SizeScroll();
	void  OnWindowPosChanging(WINDOWPOS* lpwndpos);
	BOOL  OnPaint(HDC hDC);
	BOOL  OnLButtonDown(UINT nFlags, CPoint pt);
	BOOL  OnLButtonUp(UINT nFlags, CPoint pt);
	void  OnMouseMove(UINT nFlags, CPoint pt);
	BOOL  OnSize(UINT nType, int cx, int cy);
	virtual int  OnCreate(LPCREATESTRUCT lpCreateStruct);
	BOOL  OnSysColorChange();
	BOOL  OnSetCursor(HWND hWnd, UINT nHitTest, UINT message);

protected:
	

	CScrollBar		m_spin;
	CNormalButton	m_toolBtn[2];
	CScrollBar		m_scroll;
	BOOL			m_PresRight;
	BOOL			m_PresLeft;
	int				m_deplaza;
	CRect			m_btndesplaza;
	BOOL			bIniciaArrastre;
	CDrawLayer	m_wd;
	BOOL			m_EnableL;
	BOOL			m_EnableR;
	CImageCtrl		m_img;
protected:

	BEGIN_MSG_MAP()
		ON_WM_PAINT(OnPaint)
		ON_WM_CREATE(OnCreate)
		ON_WM_SIZE(OnSize)
		ON_WM_LBUTTONDOWN(OnLButtonDown)
		ON_WM_LBUTTONUP(OnLButtonUp)
		ON_WM_MOUSEMOVE(OnMouseMove)
		ON_WM_SYSCOLORCHANGE(OnSysColorChange)
		ON_WM_SETCURSOR(OnSetCursor)
		ON_WM_WINDOWPOSCHANGING(OnWindowPosChanging)
		ON_COMMAND(SCROLLLEFT, OnSpiNiz)
		ON_COMMAND(SCROLLRIGHT, OnSpiNde)
		ON_WM_HSCROLL(OnHScroll)
	END_MSG_MAP(CContainer)

public:
	

};

#endif // !defined(AFX_WORKTAB_H__A711D725_2268_4750_B58E_5218AD3BC0A5__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Colombia Colombia
My name is Francisco Campos, A developer as you.I have the title of Engineer of Systems of the Universidad Autonoma de Colombia.My real Job Information Security officer, experience in security assessment, applications, and other related subjects.

Francisco.camposg@outlook.com

Comments and Discussions