Click here to Skip to main content
15,885,033 members
Articles / Desktop Programming / MFC

PicZoom: A Photo Viewer Created in OpenGL

Rate me:
Please Sign up or sign in to vote.
4.86/5 (63 votes)
16 Feb 2011CPOL16 min read 160.1K   11.6K   150  
PicZoom: A Photo Viewer created in OpenGL
#ifndef _CONSTS_H_
#define _CONSTS_H_
#include "stdafx.h"

const int ZOOM_MAX_VALUE = 30;
typedef enum
{
    CURSOR_HAND_TYPE,
    CURSOR_MOVE_TYPE,
    CURSOR_NORMAL_TYPE,
}CURSOR_TYPE_e;

const float ROTATION_ANGLES[4] = 
{ 0.0,// No rotation
  270.0, // First Clockwise 
  180.0, // Second Clockwise
  90.0 // 3rd clockwise 
};


typedef enum
{
    DIALOG_MODE,
    BACKGROUND_MODE,
    SLIDE_SHOW_MODE
}DISPLAY_MODE_e;

typedef enum
{
    TIMER_START = 0,
    TIMER_ZOOM,
    TIMER_TRANSLATE,
    TIMER_BOTTOM_WINDOW_VISIBLITY,
    TIMER_ZOOM_TEXT,
    TIMER_SLIDE_SHOW,
    TIMER_MAKE_TO_CENTER,
    TIMER_MAX
}TIMER_IDs_e;

typedef enum
{
    WM_ZOOM_PLUS_MESSAGE  = WM_USER + 1,
    WM_ZOOM_MIN_MESSAGE,
    WM_ZOOM_1TO1_MESSAGE,
    WM_ROTATE_CLOCK_WISE,
    WM_ROTATE_ANTI_CLOCK_WISE,
    WM_NEXT_FILE_OPEN,
    WM_PREVIOUS_FILE_OPEN,
    WM_PLAY_SLIDE_SHOW,
    WM_MAKE_TO_CENTER,
    WM_NEW_FILE_LOAD,
}WM_PICZOOM_MESSAGES_e;

struct GLColor
{
    GLColor()
    {
        m_fGreen = m_fBlue = m_fRed = 0.0;
    }
    GLColor( float fRed, float fGreen, float fBlue )
    {
        m_fRed = fRed;
        m_fGreen = fGreen;
        m_fBlue = fBlue;
    }
    float m_fRed;
    float m_fGreen;
    float m_fBlue;
};


#endif

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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions