From 54389a73faff15864ac9962129c69c4756d22201 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:51:27 +0000 Subject: Utilisateur : Fcolin Date : 25/10/01 Heure : 11:44 Créé (vss 1) --- Horloge/Curvefit.cpp | 235 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 235 insertions(+) create mode 100644 Horloge/Curvefit.cpp (limited to 'Horloge') diff --git a/Horloge/Curvefit.cpp b/Horloge/Curvefit.cpp new file mode 100644 index 0000000..a1854d0 --- /dev/null +++ b/Horloge/Curvefit.cpp @@ -0,0 +1,235 @@ +// Curvefit.cpp: implementation of the CBezierfit class. +// +////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include +#include "Curvefit.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char THIS_FILE[]=__FILE__; +#define new DEBUG_NEW +#endif + +static double DistanceError(const double *x, const double *y, const double *Rawdata, int n); +static void Bezier(double u, const double *a, const double *b, + double x4, double y4, double &z, double &s); + +void CalcBezier(const double *Rawdata, int n, double *Control) +{ + double x[4]; + double y[4]; + double e1,e2, e3; + int Retry; + double x1a,x2a,y1a,y2a; + + x[0] = Rawdata[0]; + y[0] = Rawdata[1]; + + x[1] = Rawdata[2]; + y[1] = Rawdata[3]; + + x[2] = Rawdata[n-4]; + y[2] = Rawdata[n-3]; + + x[3] = Rawdata[n-2]; + y[3] = Rawdata[n-1]; + + // seed with linear interpolation... + x[1] += x[1] - x[0]; + y[1] += y[1] - y[0]; + x[2] += x[2] - x[3]; + y[2] += y[2] - y[3]; + + e1 = DistanceError(x, y, Rawdata, n); + for (Retry = 1; Retry <= 2; Retry++) + { +// TRACE("Retry %d\n", Retry); +// TRACE(" x1 y2 x2 y2 error\n"); + e3 = 0.5; + x1a = x[1]; + while (fabs(e3) >= 0.01) + { + x[1] += (x[1] - x[0])*e3; + e2 = DistanceError(x, y, Rawdata, n); + if (e2 == e1) + break; + if (e2 > e1) + { + x[1] = x1a; + e3 /=-3; + } + else + { + e1 = e2; + x1a = x[1]; + } + } + + e3 = 0.5; + y1a = y[1]; + while (fabs(e3) >= 0.01) + { + y[1] += (y[1] - y[0])*e3; + e2 = DistanceError(x, y, Rawdata, n); + if (e2 == e1) + break; + if (e2 > e1) + { + y[1] = y1a; + e3 /=-3; + } + else + { + e1 = e2; + y1a = y[1]; + } + } + + e3 = 0.5; + x2a = x[2]; + while (fabs(e3) >= 0.01) + { + x[2] += (x[2] - x[3])*e3; + e2 = DistanceError(x, y, Rawdata, n); + if (e2 == e1) + break; + if (e2 > e1) + { + x[2] = x2a; + e3 /=-3; + } + else + { + e1 = e2; + x2a = x[2]; + } + } + + e3 = 0.5; + y2a = y[2]; + while (fabs(e3) >= 0.01) + { + y[2] += (y[2] - y[3])*e3; + e2 = DistanceError(x, y, Rawdata, n); + if (e2 == e1) + break; + if (e2 > e1) + { + y[2] = y2a; + e3 /=-3; + } + else + { + e1 = e2; + y2a = y[2]; + } + } + } // for + + Control[0] = x[1]; + Control[1] = y[1]; + Control[2] = x[2]; + Control[3] = y[2]; +} + +double DistanceError(const double *x, const double *y, + const double *Rawdata, int n) +{ + int i; + double a[4]; + double b[4]; + double u, u1, u2; + double z, z1, z2,s,s1; + double temp; + double totalerror; + double stepsize; + double x4, y4; + + totalerror = 0; + a[3] = (x[3]-x[0]+3*(x[1]-x[2]))/8; + b[3] = (y[3]-y[0]+3*(y[1]-y[2]))/8; + a[2] = (x[3]+x[0]-x[1]-x[2])*3/8; + b[2] = (y[3]+y[0]-y[1]-y[2])*3/8; + a[1] = (x[3]-x[0])/2 -a[3]; + b[1] = (y[3]-y[0])/2 -b[3]; + a[0] = (x[3]+x[0])/2 -a[2]; + b[0] = (y[3]+y[0])/2 -b[2]; + + stepsize = 2.0/(n); + for (i = 2; i <= n-3; i+=2) + { + x4 = Rawdata[i]; + y4 = Rawdata[i+1]; + for (u = -1; u <= 1.01; u += stepsize) + { + Bezier(u, a, b, x4, y4, z, s); + if (s == 0) + { + u1 = u; + z1 = z; + s1 = s; + break; + } + if (u == -1) + { + u1 = u; + z1 = z; + s1 = s; + } + if (s < s1) + { + u1 = u; + z1 = z; + s1 = s; + } + } + if (s1 != 0) + { + u = u1 + stepsize; + if (u > 1) + u = 1 - stepsize; + Bezier(u, a, b, x4, y4, z, s); + while (s != 0 && z != 0) + { + u2 = u; + z2 = z; + temp = z2-z1; + if (temp != 0) + u = (z2 * u1-z1*u2)/temp; + else + u = (u1 + u2)/2; + + if (u > 1) + u = 1; + else if (u < -1) + u = -1; + if (fabs(u-u2) < 0.001) + break; + u1 = u2; + z1 = z2; + Bezier(u, a, b, x4, y4, z, s); + } + } + totalerror += s; + } +// TRACE("%8.3lf %8.3lf %8.3lf %8.3lf %8.3lf\n", x[1], y[1], x[2], y[2], totalerror); + return totalerror; +} + +void Bezier(double u, const double *a, const double *b, + double x4, double y4, double &z, double &s) +{ + double x, y; + double dx4,dy4; + double dx,dy; + + x = a[0] + u*(a[1] + u*(a[2]+u*a[3])); + y = b[0] + u*(b[1] + u*(b[2]+u*b[3])); + dx4 = x-x4; dy4 = y-y4; + dx = a[1] + u * (a[2] + a[2] + u*3*a[3]); + dy = b[1] + u * (b[2] + b[2] + u*3*b[3]); + z = dx * dx4 + dy*dy4; + s = dx4*dx4 + dy4*dy4; +} \ No newline at end of file -- cgit v1.1 From 83ee6585675da6d3c295cc7e7c5588be81021f2f Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:51:30 +0000 Subject: Utilisateur : Fcolin Date : 25/10/01 Heure : 11:44 Créé (vss 1) --- Horloge/Curvefit.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Horloge/Curvefit.h (limited to 'Horloge') diff --git a/Horloge/Curvefit.h b/Horloge/Curvefit.h new file mode 100644 index 0000000..79918d7 --- /dev/null +++ b/Horloge/Curvefit.h @@ -0,0 +1,15 @@ +// Curvefit.h: interface for the CBezierfit class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_CURVEFIT_H__8CC78BC2_CA92_11D3_949E_00104B6C2FFE__INCLUDED_) +#define AFX_CURVEFIT_H__8CC78BC2_CA92_11D3_949E_00104B6C2FFE__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +void CalcBezier(const double *Rawdata, int n, double *Control); + + +#endif // !defined(AFX_CURVEFIT_H__8CC78BC2_CA92_11D3_949E_00104B6C2FFE__INCLUDED_) -- cgit v1.1 From 7328202c85c6aa6af8a38d198eaca7bd74a83f32 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:51:32 +0000 Subject: Utilisateur : Fcolin Date : 25/10/01 Heure : 11:44 Créé (vss 1) --- Horloge/Digistring.cpp | 904 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 904 insertions(+) create mode 100644 Horloge/Digistring.cpp (limited to 'Horloge') diff --git a/Horloge/Digistring.cpp b/Horloge/Digistring.cpp new file mode 100644 index 0000000..a0cc6b7 --- /dev/null +++ b/Horloge/Digistring.cpp @@ -0,0 +1,904 @@ +// Digistring.cpp : implementation file +// +// Copyright (C) 2000 by Michel Wassink +// All rights reserved +// +// This is free software. +// This code may be used in compiled form in any way you desire. This +// file may be redistributed unmodified by any means PROVIDING it is +// not sold for profit without the authors written consent, and +// providing that this notice and the authors name and all copyright +// notices remains intact. If the source code in this file is used in +// any commercial application then a statement along the lines of +// "Portions Copyright © 2000 Michel Wassink" must be included in +// the startup banner, "About" box or printed documentation. An email +// letting me know that you are using it would be nice as well. That's +// not much to ask considering the amount of work that went into this. +// +// No warrantee of any kind, expressed or implied, is included with this +// software; use at your own risk, responsibility for damages (if any) to +// anyone resulting from the use of this software rests entirely with the +// user. +// +// Send bug reports, bug fixes, enhancements, requests, flames, etc., and +// I'll try to keep a version up to date. I can be reached as follows: +// mwassink@csi.com (private site) +// An email letting me know that you are using it would be nice. +///////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "Digistring.h" +#include "Curvefit.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +// Segment numbering: +// ----- 13 ----- 0 +//|\ | /| 8 0 12 | | 1 2 +//| \|/ | 1 2 | | +// -- -- == 6 7 ----- == 3 +//| /|\ | 3 4 | | +//|/ | \| 9 5 11 | | 4 5 +// ----- 10 ----- 6 + +#define MAXSEGCHAR7 12 // Number of supported 7 segment characters +#define MAXSEGCHAR14 40 // Number of supported 14 segment characters +#define MAXSEGSEMCOL 2 // Number of supported 3 segment characters +#define NORM_DIGIHEIGHT 83 // All characters must have this height + +//////////////////////////////////////////////////////////////////////////////// +// For 14 segments display... +// SP 0 1 2 3 4 5 6 +WORD CHAR_SEGM14[MAXSEGCHAR14] = {0x0000, 0x3F00, 0x1800, 0x36C0, 0x3CC0, 0x19C0, 0x2DC0, 0x2FC0, +// 7 8 9 - A B C D E F G H + 0x3800, 0x3FC0, 0x3DC0, 0x00C0, 0x3BC0, 0x3CA1, 0x2700, 0x3C21, 0x27C0, 0x23C0, 0x2F80, 0x1BC0, +// I J K L M N O P Q R S + 0x2421, 0x1E00, 0x0354, 0x0700, 0x1B06, 0x1B12, 0x3F00, 0x33C0, 0x3F10, 0x33D0, 0x2DC0, +// T U V W X Y Z * + + 0x2021, 0x1F00, 0x030C, 0x1B18, 0x001E, 0x11E0, 0x240C, 0x00FF, 0x00E1}; +// straight style +CPoint PtSeg14N0[5] = {CPoint(20,13), CPoint(20,36), CPoint(24,40), CPoint(28,36), CPoint(28,13)}; +CPoint PtSeg14N1[4] = {CPoint( 5, 5), CPoint(15,35), CPoint(20,37), CPoint(18,25)}; +CPoint PtSeg14N6[6] = {CPoint( 6,41), CPoint(14,45), CPoint(18,45), CPoint(22,41), CPoint(18,37), + CPoint(14,37)}; +CPoint PtSeg14N8[4] = {CPoint( 4, 7), CPoint( 4,40), CPoint(11,36), CPoint(11,26)}; +CPoint PtSeg14N13[4] = {CPoint( 6, 4), CPoint(11,11), CPoint(37,11), CPoint(42, 4)}; +BYTE TpSeg14N0[5] = {PT_MOVETO, PT_LINETO, PT_LINETO, PT_LINETO, PT_LINETO}; +BYTE TpSeg14N1[4] = {PT_MOVETO, PT_LINETO, PT_LINETO, PT_LINETO}; +BYTE TpSeg14N6[6] = {PT_MOVETO, PT_LINETO, PT_LINETO, PT_LINETO, PT_LINETO, + PT_LINETO}; +BYTE TpSeg14N8[4] = {PT_MOVETO, PT_LINETO, PT_LINETO, PT_LINETO}; +BYTE TpSeg14N13[4] = {PT_MOVETO, PT_LINETO, PT_LINETO, PT_LINETO}; + +// smooth style PT_BEZIERTO +CPoint PtSeg14N0S[13] ={CPoint(20,12), CPoint(20,25), CPoint(22,36), CPoint(23,39), CPoint(24,40), + CPoint(25,39), CPoint(26,36), CPoint(28,25), CPoint(28,12), CPoint(26,10), + CPoint(24, 9), CPoint(22,10), CPoint(20,12)}; +CPoint PtSeg14N1S[10] ={CPoint(10,10), CPoint(10,13), CPoint(11,20), CPoint(13,28), CPoint(21,38), + CPoint(21,37), CPoint(19,26), CPoint(15,16), CPoint(11,10), CPoint(10,10)}; +CPoint PtSeg14N6S[6] = {CPoint( 8,41), CPoint(12,45), CPoint(16,45), CPoint(23,41), CPoint(16,37), + CPoint(12,37)}; +CPoint PtSeg14N8S[10]= {CPoint( 4, 7), CPoint( 4,39), CPoint( 5,40), CPoint( 6,40), CPoint( 9,37), + CPoint(11,33), CPoint(11,25), CPoint( 9,14), CPoint( 5, 6), CPoint( 4, 7)}; +CPoint PtSeg14N13S[17]={CPoint( 8, 4), CPoint( 7, 5), CPoint( 7, 6), CPoint( 9, 8), CPoint(12, 9), + CPoint(14,11), CPoint(19,11), CPoint(21, 9), CPoint(24, 7), CPoint(27, 9), + CPoint(29,11), CPoint(34,11), CPoint(36, 9), CPoint(39, 8), CPoint(41, 6), + CPoint(41, 5), CPoint(40, 4)}; +BYTE TpSeg14N0S[13]= {PT_MOVETO, PT_LINETO, PT_BEZIERTO, PT_BEZIERTO, PT_BEZIERTO, + PT_BEZIERTO, PT_BEZIERTO, PT_LINETO, PT_LINETO, PT_BEZIERTO, + PT_BEZIERTO, PT_BEZIERTO, PT_LINETO}; +BYTE TpSeg14N1S[10] ={PT_MOVETO, PT_BEZIERTO, PT_BEZIERTO, PT_BEZIERTO, PT_LINETO, + PT_LINETO, PT_BEZIERTO, PT_BEZIERTO, PT_BEZIERTO, PT_LINETO}; +BYTE TpSeg14N6S[6] = {PT_MOVETO, PT_LINETO, PT_LINETO, PT_LINETO, PT_LINETO, + PT_LINETO}; +BYTE TpSeg14N8S[10] ={PT_MOVETO, PT_LINETO, PT_BEZIERTO, PT_BEZIERTO, PT_BEZIERTO, + PT_BEZIERTO, PT_LINETO, PT_BEZIERTO, PT_BEZIERTO, PT_LINETO}; +BYTE TpSeg14N13S[17]={PT_MOVETO, PT_BEZIERTO, PT_BEZIERTO, PT_BEZIERTO, PT_BEZIERTO, + PT_LINETO, PT_LINETO, PT_BEZIERTO, PT_BEZIERTO, PT_BEZIERTO, + PT_LINETO, PT_LINETO, PT_BEZIERTO, PT_BEZIERTO, PT_BEZIERTO, + PT_BEZIERTO, PT_LINETO}; +/////////////////////////////////////////////////////////////////////////////// +// For 7 segments display... +// SP 0 1 2 3 4 5 +BYTE CHAR_SEGM7[MAXSEGCHAR7] = {0x00, 0x77, 0x24, 0x5D, 0x6D, 0x2E, 0x6B, +// 6 7 8 9 - + 0x7B, 0x25, 0x7F, 0x6F, 0x08}; +// straight style +CPoint PtSeg7N0[4] = {CPoint( 5, 4), CPoint(12,11), CPoint(36,11), CPoint(43, 4)}; +CPoint PtSeg7N1[4] = {CPoint( 4, 6), CPoint( 4,40), CPoint(11,36), CPoint(11,13)}; +CPoint PtSeg7N3[6] = {CPoint( 6,41), CPoint(14,45), CPoint(34,45), CPoint(42,41), CPoint(34,37), + CPoint(14,37)}; // 3 +BYTE TpSeg7N0[4] = {PT_MOVETO, PT_LINETO, PT_LINETO, PT_LINETO}; +BYTE TpSeg7N1[4] = {PT_MOVETO, PT_LINETO, PT_LINETO, PT_LINETO}; +BYTE TpSeg7N3[6] = {PT_MOVETO, PT_LINETO, PT_LINETO, PT_LINETO, PT_LINETO, + PT_LINETO}; + +// smooth style PT_BEZIERTO +CPoint PtSeg7N0S[7] = {CPoint( 6, 4), CPoint( 5, 5), CPoint( 5, 6), CPoint( 8, 9), CPoint(12,11), + CPoint(36,11), CPoint(39, 4)}; +CPoint PtSeg7N1S[7] = {CPoint( 4, 9), CPoint( 4,39), CPoint( 6,40), CPoint( 7,40), CPoint( 9,38), + CPoint(11,36), CPoint(11,12)}; +CPoint PtSeg7N2S[10] = {CPoint(37,36), CPoint(39,38), CPoint(41,40), CPoint(42,40), CPoint(44,39), + CPoint(44, 6), CPoint(42, 4), CPoint(41, 4), CPoint(39, 8), CPoint(37,12)}; +CPoint PtSeg7N3S[6] = {CPoint( 8,41), CPoint(12,45), CPoint(36,45), CPoint(40,41), CPoint(36,37), + CPoint(12,37)}; +BYTE TpSeg7N0S[7] = {PT_MOVETO, PT_BEZIERTO, PT_BEZIERTO, PT_BEZIERTO, PT_LINETO, + PT_LINETO, PT_LINETO}; +BYTE TpSeg7N1S[7] = {PT_MOVETO, PT_LINETO, PT_BEZIERTO, PT_BEZIERTO, PT_BEZIERTO, + PT_LINETO, PT_LINETO}; +BYTE TpSeg7N2S[10] = {PT_MOVETO, PT_BEZIERTO, PT_BEZIERTO, PT_LINETO, PT_LINETO, + PT_LINETO, PT_BEZIERTO, PT_BEZIERTO, PT_BEZIERTO, PT_LINETO}; +BYTE TpSeg7N3S[6] = {PT_MOVETO, PT_LINETO, PT_LINETO, PT_LINETO, PT_LINETO, + PT_LINETO}; + +// For 3 segments semicoloncombi display... +// . : +BYTE CHAR_SEMCOL[MAXSEGSEMCOL] = {0x04, 0x03}; + +CPoint PtSegScN0[4] = {CPoint( 4,23), CPoint( 4,32), CPoint(13,32), CPoint(13,23)}; +CPoint PtSegScN1[4] = {CPoint( 4,50), CPoint( 4,59), CPoint(13,59), CPoint(13,50)}; +CPoint PtSegScN2[4] = {CPoint( 4,68), CPoint( 4,77), CPoint(13,77), CPoint(13,68)}; +BYTE TpSegScN0[4] = {PT_MOVETO, PT_LINETO, PT_LINETO, PT_LINETO}; +BYTE TpSegScN1[4] = {PT_MOVETO, PT_LINETO, PT_LINETO, PT_LINETO}; +BYTE TpSegScN2[4] = {PT_MOVETO, PT_LINETO, PT_LINETO, PT_LINETO}; + +// Functions for mirroring points... +CPoint PointMirror(const CPoint &P, const CPoint &M) +{ + return CPoint(P.x + 2*(M.x - P.x), P.y + 2*(M.y - P.y)); +} + +CPoint LineMirrorX(const CPoint &P, int X) +{ + return CPoint(P.x + 2*(X - P.x), P.y); +} + +CPoint LineMirrorY(const CPoint &P, int Y) +{ + return CPoint(P.x, P.y + 2*(Y - P.y)); +} + +///////////////////////////////////////////////////////////////////////////// +// CDSegment +CDSegment::CDSegment() +{ + m_paPoints = NULL; + m_paTypes = NULL; +} + +CDSegment::CDSegment(const CDSegment& Segment) +{ + ASSERT(Segment.m_paPoints != NULL); // Do not copy an unitialized segment + + m_nCount = Segment.m_nCount; + + m_paPoints = new CPoint[m_nCount]; + m_paTypes = new BYTE[m_nCount]; + if (m_paPoints != NULL && m_paTypes != NULL) + { + memcpy(m_paPoints, Segment.m_paPoints, m_nCount * sizeof(CPoint)); + memcpy(m_paTypes, Segment.m_paTypes, m_nCount * sizeof(BYTE)); + } +} + +// ----------------------------------------------------------------------------- + +CDSegment::~CDSegment() +{ + FreeSegment(); +} + +void CDSegment::DefPoints(const POINT* lpaPoints, const BYTE* lpaTypes, int nCount) +{ + FreeSegment(); + + m_paPoints = new CPoint[nCount]; + m_paTypes = new BYTE[nCount]; + m_nCount = nCount; + if (m_paPoints != NULL && m_paTypes != NULL) + { + memcpy(m_paPoints, lpaPoints, m_nCount * sizeof(CPoint)); + memcpy(m_paTypes, lpaTypes, m_nCount * sizeof(BYTE)); + } +} + +// ----------------------------------------------------------------------------- + +CDSegment CDSegment::operator=(const CDSegment &Segment) +{ + CPoint *pNewPoints; + BYTE * pNewTypes; + + m_nCount = Segment.m_nCount; + + pNewPoints = new CPoint[m_nCount]; + pNewTypes = new BYTE[m_nCount]; + memcpy(pNewPoints, Segment.m_paPoints, m_nCount * sizeof(CPoint)); + memcpy(pNewTypes, Segment.m_paTypes, m_nCount * sizeof(BYTE)); + FreeSegment(); // Get rid of old stuff + m_paPoints = pNewPoints; + m_paTypes = pNewTypes; + + return *this; +} + +void CDSegment::FreeSegment() +{ + if (m_paPoints != NULL && m_paTypes != NULL) + { + delete[] m_paPoints; + delete[] m_paTypes; + m_paPoints = NULL; + m_paTypes = NULL; + } +} + +void CDSegment::Draw(CDC *pDC, CDoubleRect DrawPlace, int iWidth) const +{ + int i, nBez,b; + CPoint * paPoints; + double daContr[4]; + double *pBezPts; + double dRelWidth, dRelHeight; + + paPoints = new CPoint[m_nCount]; + if (paPoints == NULL) return; + + dRelWidth = DrawPlace.Width() / iWidth; + dRelHeight = DrawPlace.Height() / NORM_DIGIHEIGHT; + for (i = 0; i < m_nCount; i++) + { + if (m_paTypes[i] != PT_BEZIERTO) + { + paPoints[i] = CPoint(DrawPlace.left + dRelWidth * m_paPoints[i].x + 0.5, + DrawPlace.top + dRelHeight * m_paPoints[i].y + 0.5); + } + } + + for (i = 0; i < m_nCount; i++) + { + if (m_paTypes[i] == PT_MOVETO) + { + pDC->MoveTo(paPoints[i]); + } + else if (m_paTypes[i] == PT_LINETO) + { + VERIFY(pDC->LineTo(paPoints[i])); + } + else if (m_paTypes[i] == PT_BEZIERTO) + { + // Look for the first non-bezier point(This is the EndPoint)... + nBez = 0; + do + { + nBez++; + } while (m_paTypes[i+nBez] == PT_BEZIERTO); + + pBezPts = new double[2*(nBez+2)]; + for (b = 0; b < (nBez+2)*2; b += 2) + { + pBezPts[b ] = DrawPlace.left + dRelWidth * m_paPoints[i-1+b/2].x; + pBezPts[b+1] = DrawPlace.top + dRelHeight * m_paPoints[i-1+b/2].y; + } + CalcBezier(pBezPts, 2*(nBez+2), daContr); + delete[] pBezPts; + + paPoints[i ].x = daContr[0] + 0.5; + paPoints[i ].y = daContr[1] + 0.5; + paPoints[i+1].x = daContr[2] + 0.5; + paPoints[i+1].y = daContr[3] + 0.5; + paPoints[i+2] = paPoints[i+nBez]; + + VERIFY(pDC->PolyBezierTo(&paPoints[i], 3)); + i += nBez; + } + } // for + delete[] paPoints; +} + +///////////////////////////////////////////////////////////////////////////// +// CDigiChar + +CDigiChar::CDigiChar() +{ + m_Width = 49; + m_wSegmData = 0x0000; // All segments in offcolor +} + +CDigiChar::~CDigiChar() +{ + +} + +void CDigiChar::Draw(CDC *pDC, CDoubleRect DrawPlace, CPen *pOffPen, CPen *pOnPen, + CBrush *pOffBrush, CBrush *pOnBrush) +{ + WORD SegMask; + DSegmentVector::iterator SegmIterator; + + SegMask = 1; + for (SegmIterator = m_SegmentVector.begin(); SegmIterator != m_SegmentVector.end(); + SegmIterator++) + { + if (m_wSegmData & SegMask) + { + pDC->SelectObject(pOnBrush); + pDC->SelectObject(pOnPen); + } + else + { + pDC->SelectObject(pOffBrush); + pDC->SelectObject(pOffPen); + } + + pDC->BeginPath(); + SegmIterator->Draw(pDC, DrawPlace, m_Width); + pDC->EndPath(); + pDC->StrokeAndFillPath(); + + SegMask <<= 1; + } +} +void CDigiChar::SetElementData(WORD wSegmData, int /*iDispStyle*/) +{ + m_wSegmData = wSegmData; +} + +int CDigiChar::GetNormWidth() const +{ + return m_Width; +} + +///////////////////////////////////////////////////////////////////////////// +// CDigi7Segment + +CDigi7Segment::CDigi7Segment() +{ + m_Width = 49; + m_NSegments = 7; +} + +void CDigi7Segment::SetElementData(WORD wSegmData, int iDispStyle) +{ + int i, p; + CDSegment TmpSegm; + LPPOINT lpTmpSegPoints = NULL; + LPPOINT lpSegPoints; + LPBYTE lpType; + int nCount; + + m_SegmentVector.clear(); + for (i = 0; i < m_NSegments; i++) + { + switch(i) + { + case 0: + case 6: if (iDispStyle & CDigistring::DS_SMOOTH) + { + lpSegPoints = PtSeg7N0S; + lpType = TpSeg7N0S; + nCount = 7; + } + else + { + lpSegPoints = PtSeg7N0; + lpType = TpSeg7N0; + nCount = 4; + } + break; + case 1: + case 4:if (iDispStyle & CDigistring::DS_SMOOTH) + { + lpSegPoints = PtSeg7N1S; + lpType = TpSeg7N1S; + nCount = 7; + } + else + { + lpSegPoints = PtSeg7N1; + lpType = TpSeg7N1; + nCount = 4; + } + break; + case 2: + case 5: if (iDispStyle & CDigistring::DS_SMOOTH) + { + lpSegPoints = PtSeg7N2S; + lpType = TpSeg7N2S; + nCount = 10; + } + else + { + lpSegPoints = PtSeg7N1; + lpType = TpSeg7N1; + nCount = 4; + } + break; + case 3: if (iDispStyle & CDigistring::DS_SMOOTH) + { + lpSegPoints = PtSeg7N3S; + lpType = TpSeg7N3S; + nCount = 6; + } + else + { + lpSegPoints = PtSeg7N3; + lpType = TpSeg7N3; + nCount = 6; + } + break; + } + + switch(i) + { + case 6: lpTmpSegPoints = new CPoint[nCount]; + for (p = 0; p < nCount; p++) + lpTmpSegPoints[p] = LineMirrorY(lpSegPoints[p], 41);break; + case 2: if (!(iDispStyle & CDigistring::DS_SMOOTH)) + { + lpTmpSegPoints = new CPoint[nCount]; + for (p = 0; p < nCount; p++) + lpTmpSegPoints[p] = LineMirrorX(lpSegPoints[p], (m_Width-1)/2); + } + break; + case 4: lpTmpSegPoints = new CPoint[nCount]; + for (p = 0; p < nCount; p++) + lpTmpSegPoints[p] = LineMirrorY(lpSegPoints[p], 41);break; + case 5: lpTmpSegPoints = new CPoint[nCount]; + for (p = 0; p < nCount; p++) + if (iDispStyle & CDigistring::DS_SMOOTH) + lpTmpSegPoints[p] = LineMirrorY(lpSegPoints[p], 41); + else + lpTmpSegPoints[p] = PointMirror(lpSegPoints[p], CPoint((m_Width-1)/2, 41)); + break; + } + + if (lpTmpSegPoints == NULL) + TmpSegm.DefPoints(lpSegPoints, lpType, nCount); + else + { + TmpSegm.DefPoints(lpTmpSegPoints, lpType, nCount); + delete[] lpTmpSegPoints; + lpTmpSegPoints = NULL; + } + m_SegmentVector.push_back(TmpSegm); + } + m_wSegmData = wSegmData; +} + +///////////////////////////////////////////////////////////////////////////// +// CDigi14Segment + +CDigi14Segment::CDigi14Segment() +{ + m_Width = 49; + m_NSegments = 14; +} + +void CDigi14Segment::SetElementData(WORD wSegmData, int iDispStyle) +{ + int i, p; + CDSegment x; + LPPOINT lpTmpSegPoints = NULL; + LPPOINT lpSegPoints; + LPBYTE lpType; + int nCount; + + m_SegmentVector.clear(); + for (i = 0; i < m_NSegments; i++) + { + switch(i) + { + case 0: + case 5: if (iDispStyle & CDigistring::DS_SMOOTH) + { + lpSegPoints = PtSeg14N0S; + lpType = TpSeg14N0S; + nCount = 13; + } + else + { + lpSegPoints = PtSeg14N0; + lpType = TpSeg14N0; + nCount = 5; + } + break; + case 1: + case 2: + case 3: + case 4: + if (iDispStyle & CDigistring::DS_SMOOTH) + { + lpSegPoints = PtSeg14N1S; + lpType = TpSeg14N1S; + nCount = 10; + } + else + { + lpSegPoints = PtSeg14N1; + lpType = TpSeg14N1; + nCount = 5; + } + break; + case 6: + case 7: + if (iDispStyle & CDigistring::DS_SMOOTH) + { + lpSegPoints = PtSeg14N6S; + lpType = TpSeg14N6S; + nCount = 6; + } + else + { + lpSegPoints = PtSeg14N6; + lpType = TpSeg14N6; + nCount = 6; + } + break; + case 8: + case 9: + case 11: + case 12: + if (iDispStyle & CDigistring::DS_SMOOTH) + { + lpSegPoints = PtSeg14N8S; + lpType = TpSeg14N8S; + nCount = 10; + } + else + { + lpSegPoints = PtSeg14N8; + lpType = TpSeg14N8; + nCount = 4; + } + break; + case 13: + case 10: + if (iDispStyle & CDigistring::DS_SMOOTH) + { + lpSegPoints = PtSeg14N13S; + lpType = TpSeg14N13S; + nCount = 17; + } + else + { + lpSegPoints = PtSeg14N13; + lpType = TpSeg14N13; + nCount = 4; + } + break; + } + + switch(i) + { + case 5: lpTmpSegPoints = new CPoint[nCount]; + for (p = 0; p < nCount; p++) + lpTmpSegPoints[p] = LineMirrorY(lpSegPoints[p], 41);break; + case 2: lpTmpSegPoints = new CPoint[nCount]; + for (p = 0; p < nCount; p++) + lpTmpSegPoints[p] = LineMirrorX(lpSegPoints[p], (m_Width-1)/2);break; + case 3: lpTmpSegPoints = new CPoint[nCount]; + for (p = 0; p < nCount; p++) + lpTmpSegPoints[p] = LineMirrorY(lpSegPoints[p], 41);break; + case 4: lpTmpSegPoints = new CPoint[nCount]; + for (p = 0; p < nCount; p++) + lpTmpSegPoints[p] = PointMirror(lpSegPoints[p], CPoint((m_Width-1)/2, 41));break; + case 7: lpTmpSegPoints = new CPoint[nCount]; + for (p = 0; p < nCount; p++) + lpTmpSegPoints[p] = LineMirrorX(lpSegPoints[p], (m_Width-1)/2);break; + case 9: lpTmpSegPoints = new CPoint[nCount]; + for (p = 0; p < nCount; p++) + lpTmpSegPoints[p] = LineMirrorY(lpSegPoints[p], 41);break; + case 11: lpTmpSegPoints = new CPoint[nCount]; + for (p = 0; p < nCount; p++) + lpTmpSegPoints[p] = PointMirror(lpSegPoints[p], CPoint((m_Width-1)/2, 41));break; + case 12: lpTmpSegPoints = new CPoint[nCount]; + for (p = 0; p < nCount; p++) + lpTmpSegPoints[p] = LineMirrorX(lpSegPoints[p], (m_Width-1)/2);break; + case 10: lpTmpSegPoints = new CPoint[nCount]; + for (p = 0; p < nCount; p++) + lpTmpSegPoints[p] = LineMirrorY(lpSegPoints[p], 41);break; + } + + if (lpTmpSegPoints == NULL) + x.DefPoints(lpSegPoints, lpType, nCount); + else + { + x.DefPoints(lpTmpSegPoints, lpType, nCount); + delete[] lpTmpSegPoints; + lpTmpSegPoints = NULL; + } + m_SegmentVector.push_back(x); + } + m_wSegmData = wSegmData; +} + +///////////////////////////////////////////////////////////////////////////// +// CDigiSemiColonCombi + +CDigiColonDotChar::CDigiColonDotChar() +{ + m_Width = 18; + m_NSegments = 3; +} + +void CDigiColonDotChar::SetElementData(WORD wSegmData, int /*iDispStyle*/) +{ + int i; + CDSegment DSegment; + LPPOINT lpSegPoints; + LPBYTE lpType; + int nCount; + + m_SegmentVector.clear(); + + for (i = 0; i < m_NSegments; i++) + { + switch(i) + { + case 0:lpSegPoints = PtSegScN0; + lpType = TpSegScN0; + nCount = 4; break; + case 1: + lpSegPoints = PtSegScN1; + lpType = TpSegScN1; + nCount = 4; break; + case 2: + lpSegPoints = PtSegScN2; + lpType = TpSegScN2; + nCount = 4; break; + } + DSegment.DefPoints(lpSegPoints, lpType, nCount); + m_SegmentVector.push_back(DSegment); + } + + m_wSegmData = wSegmData; +} + +///////////////////////////////////////////////////////////////////////////// +// CDigistring + +CDigistring::CDigistring() + : m_strText("EMPTY") +{ + m_DispStyle = DS_SZ_PROP; + m_BackColor = BLACK; + m_Modified = TRUE; + m_OffColor = DARKGREEN; + m_OnColor = LIGHTGREEN; +} + +CDigistring::~CDigistring() +{ + m_CharVector.clear(); +} + +void CDigistring::SetText(LPCTSTR lpszText) +{ + if (m_strText != lpszText) + { + m_strText = lpszText; + m_Modified = TRUE; + Invalidate(); + } +} + +void CDigistring::Format(LPCTSTR lpszFormat, ...) +{ + TCHAR szMessage[256]; + + va_list argp; + va_start(argp, lpszFormat); + _vsntprintf(szMessage, 255, lpszFormat, argp); + va_end(argp); + + SetText(szMessage); +} + +void CDigistring::SetColor(COLORREF OffColor, COLORREF OnColor) +{ + if (m_OnColor == OnColor && m_OffColor == OffColor) + return; + m_OnColor = OnColor; + m_OffColor = OffColor; + Invalidate(); +} + +void CDigistring::SetBackColor(COLORREF BackColor /* = BLACK */) +{ + if (m_BackColor == BackColor) + return; + m_BackColor = BackColor; + Invalidate(); +} + +BOOL CDigistring::ModifyDigiStyle(DWORD dwRemove, DWORD dwAdd) +{ + ASSERT(!(dwRemove & dwAdd)); + if (dwRemove & dwAdd) + return FALSE; + + m_DispStyle |= dwAdd; + m_DispStyle &= ~dwRemove; + + m_Modified = TRUE; + Invalidate(); + return TRUE; +} + +CDigiChar * CDigistring::DefineChar(TCHAR cChar) +{ + int iIndex; + CDigiChar * pDChar = NULL; + + if (cChar >= _T('0') && cChar <= _T('9') + || cChar == _T(' ') || cChar == _T('-')) + { + if (cChar == _T(' ')) + { + iIndex = 0; + } + else if (cChar == _T('-')) + { + iIndex = 11; + } + else + { + iIndex = cChar - _T('0') + 1; + } + + if (m_DispStyle & DS_STYLE14) + { + pDChar = new CDigi14Segment; + pDChar->SetElementData(CHAR_SEGM14[iIndex], m_DispStyle); + } + else + { + pDChar = new CDigi7Segment; + pDChar->SetElementData(CHAR_SEGM7[iIndex], m_DispStyle); + } + } + else if (cChar >= _T('A') && cChar <= _T('Z')) + { + iIndex = cChar - _T('A') + 12; + pDChar = new CDigi14Segment; + pDChar->SetElementData(CHAR_SEGM14[iIndex], m_DispStyle); + } + else + { + iIndex = 0; + switch(cChar) + { + case _T(':'): iIndex++; + case _T('.'): pDChar = new CDigiColonDotChar; + pDChar->SetElementData(CHAR_SEMCOL[iIndex], m_DispStyle); + break; + case _T('*'): iIndex = MAXSEGCHAR14 - 2; pDChar = new CDigi14Segment; + pDChar->SetElementData(CHAR_SEGM14[iIndex], m_DispStyle); + break; + case _T('+'): iIndex = MAXSEGCHAR14 - 1; pDChar = new CDigi14Segment; + pDChar->SetElementData(CHAR_SEGM14[iIndex], m_DispStyle); + break; + default : ASSERT(FALSE); + } + } + return pDChar; +} + +void CDigistring::BuildString() +{ + CDigiChar * pDChar; + if (!m_Modified) return; + m_CharVector.clear(); + + m_strText.MakeUpper(); + for (int i = 0; i < m_strText.GetLength(); i++) + { + if ((pDChar = DefineChar(m_strText[i])) != NULL) + { + m_CharVector.push_back(*pDChar); + delete pDChar; + } + } + + m_Modified = FALSE; +} + +BEGIN_MESSAGE_MAP(CDigistring, CStatic) + //{{AFX_MSG_MAP(CDigistring) + ON_WM_PAINT() + ON_WM_ERASEBKGND() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CDigistring message handlers + +void CDigistring::OnPaint() +{ + CRect rect; + CDoubleRect CharRect; + GetClientRect(&rect); + + CPaintDC dc(this); // device context for painting + dc.SetBkColor(m_BackColor); + CMemDC memDC(&dc, &rect); + + CBrush hBrushOff, hBrushOn; + hBrushOff.CreateSolidBrush(m_OffColor); + hBrushOn.CreateSolidBrush(m_OnColor); + CBrush *pOldBrush = memDC.SelectObject(&hBrushOn); + + int r = int(GetRValue(m_OffColor) * 0.75 + GetRValue(m_BackColor) * 0.25); + int g = int(GetGValue(m_OffColor) * 0.75 + GetGValue(m_BackColor) * 0.25); + int b = int(GetBValue(m_OffColor) * 0.75 + GetBValue(m_BackColor) * 0.25); + + CPen OffPen(PS_SOLID | PS_ENDCAP_ROUND, 1, RGB(r,g,b)); + r = int(GetRValue(m_OnColor) * 0.75 + GetRValue(m_BackColor) * 0.25); + g = int(GetGValue(m_OnColor) * 0.75 + GetGValue(m_BackColor) * 0.25); + b = int(GetBValue(m_OnColor) * 0.75 + GetBValue(m_BackColor) * 0.25); + CPen OnPen(PS_SOLID | PS_ENDCAP_ROUND, 1, RGB(r,g,b)); + CPen *pOldPen = memDC.SelectObject(&OffPen); + + int iTotWidth = 0; + double dRelWidth, dRelHeight; + // TODO: Add your message handler code here + + DigiCharVector::iterator CharIterator; + + // Calculate resizing factors... + BuildString(); + for (CharIterator = m_CharVector.begin(); CharIterator != m_CharVector.end(); + CharIterator++) + { + iTotWidth += CharIterator->GetNormWidth(); + } + dRelWidth = double(rect.Width()) / iTotWidth; + dRelHeight = double(rect.Height()) / NORM_DIGIHEIGHT; + + // If proportional make offset for centered text + if (m_DispStyle & DS_SZ_PROP) + { + if (dRelWidth < dRelHeight) + dRelHeight = dRelWidth; + else + dRelWidth = dRelHeight; + + CharRect.left = (rect.Width() - dRelWidth * iTotWidth) / 2; + CharRect.top = (rect.Height() - dRelHeight * NORM_DIGIHEIGHT) / 2; + } + else + CharRect.SetRectEmpty(); + + // Draw all characters... + for (CharIterator = m_CharVector.begin(); CharIterator != m_CharVector.end(); + CharIterator++) + { + CharRect.SetRect(CharRect.left, CharRect.top, + CharRect.left + dRelWidth * CharIterator->GetNormWidth(), + CharRect.top + dRelHeight * NORM_DIGIHEIGHT); + + CharIterator->Draw(&memDC, CharRect, &OffPen, &OnPen, &hBrushOff, &hBrushOn); + + CharRect.left += dRelWidth * CharIterator->GetNormWidth(); + } + + // Mama says: Clean up your mess! + memDC.SelectObject(pOldPen); + memDC.SelectObject(pOldBrush); + OffPen.DeleteObject(); + OnPen.DeleteObject(); + hBrushOff.DeleteObject(); + hBrushOn.DeleteObject(); +} + +BOOL CDigistring::OnEraseBkgnd(CDC* /*pDC*/) +{ + // Don't erase the background to avoid flickering + // Background is painted in CMemDC::CMemDC(); with FillSolidRect(); + return FALSE; +} -- cgit v1.1 From f3c704c73288fc885d1d19b6885b2ad69aba0868 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:51:34 +0000 Subject: Utilisateur : Fcolin Date : 25/10/01 Heure : 11:44 Créé (vss 1) --- Horloge/Digistring.h | 187 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 187 insertions(+) create mode 100644 Horloge/Digistring.h (limited to 'Horloge') diff --git a/Horloge/Digistring.h b/Horloge/Digistring.h new file mode 100644 index 0000000..dc1352d --- /dev/null +++ b/Horloge/Digistring.h @@ -0,0 +1,187 @@ +#if !defined(AFX_DIGISTRING_H__F77484C2_745F_11D3_A718_87712333104C__INCLUDED_) +#define AFX_DIGISTRING_H__F77484C2_745F_11D3_A718_87712333104C__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// Digistring.h : header file +// +// Copyright (C) 2000 by Michel Wassink +// All rights reserved +// +// This is free software. +// This code may be used in compiled form in any way you desire. This +// file may be redistributed unmodified by any means PROVIDING it is +// not sold for profit without the authors written consent, and +// providing that this notice and the authors name and all copyright +// notices remains intact. If the source code in this file is used in +// any commercial application then a statement along the lines of +// "Portions Copyright © 2000 Michel Wassink" must be included in +// the startup banner, "About" box or printed documentation. An email +// letting me know that you are using it would be nice as well. That's +// not much to ask considering the amount of work that went into this. +// +// No warrantee of any kind, expressed or implied, is included with this +// software; use at your own risk, responsibility for damages (if any) to +// anyone resulting from the use of this software rests entirely with the +// user. +// +// Version: 1.0 +// Release: 1 (februari 2000 to www.codeguru.com and www.codeproject.com) +// ----------------------------------------------------------------------- +// Notes to changes for release 1 (V1.0): +// - First release. +// +// Send bug reports, bug fixes, enhancements, requests, flames, etc., and +// I'll try to keep a version up to date. I can be reached as follows: +// mwassink@csi.com (private site) +// An email letting me know that you are using it would be nice. +///////////////////////////////////////////////////////////////////////////// + +#include +using namespace std ; +#include "MEMDC.H" +#include "RGBCOLOR.H" + +// CRect class with double precision for accurate drawing. +class CDoubleRect +{ +public: + void SetRect(double x1, double y1, double x2, double y2) + { left = x1; top = y1; right = x2; bottom = y2;} + double Width() const{return right - left;} + double Height() const{return bottom - top;} + void SetRectEmpty(){left = top = right = bottom = 0.0;} +public: + double left, top, right, bottom; +}; + +class CDSegment +{ +public: + CDSegment(); + CDSegment(const CDSegment& Segment); + ~CDSegment(); + void DefPoints(const POINT* lpPoints, const BYTE* lpTypes, int nCount); + void Draw(CDC *pDC, CDoubleRect DrawPlace, int iWidth) const; + void FreeSegment(); + CDSegment operator=(const CDSegment &Segment); + +// Implementation +public: + CPoint * m_paPoints; + BYTE * m_paTypes; + int m_nCount; +}; + +typedef vector DSegmentVector; + +class CDigiChar +{ +// Construction +public: + CDigiChar(); + +//Attributes: +public: + virtual ~CDigiChar(); + virtual void SetElementData(WORD wSegmData, int iDispStyle); + void Draw(CDC *pDC, CDoubleRect DrawPlace, CPen *pOffPen, CPen *pOnpen, + CBrush *pOffBrush, CBrush *pOnBrush); + void SetColor(COLORREF OffColor, COLORREF OnColor); + int GetNormWidth() const; + + +protected: + int m_Width; + WORD m_wSegmData; + DSegmentVector m_SegmentVector; + int m_NSegments; + COLORREF m_OffColor; + COLORREF m_OnColor; + +}; + +class CDigiColonDotChar : public CDigiChar +{ +public: + CDigiColonDotChar(); + void SetElementData(WORD wSegmData, int iDispStyle); +}; + +class CDigi7Segment : public CDigiChar +{ +public: + CDigi7Segment(); + void SetElementData(WORD wSegmData, int iDispStyle); +}; + +class CDigi14Segment : public CDigiChar +{ +public: + CDigi14Segment(); + void SetElementData(WORD wSegmData, int iDispStyle); +}; + +typedef vector DigiCharVector; + +///////////////////////////////////////////////////////////////////////////// +// CDigistring class + +class CDigistring : public CStatic +{ +// Construction +public: + CDigistring(); + +// Attributes +public: + enum { + DS_SMOOTH = 1, // Pioneer kind of characters + DS_STYLE14 = 2, // use allways 14 segment display. + DS_SZ_PROP = 4 // size proportional + }; + +// Operations +public: + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CDigistring) + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CDigistring(); + void SetText(LPCTSTR lpszText); + void Format(LPCTSTR lpszFormat, ...); + void SetColor(COLORREF OffColor, COLORREF OnColor); + void SetBackColor(COLORREF BackColor = BLACK); + BOOL ModifyDigiStyle(DWORD dwRemove, DWORD dwAdd); + + // Generated message map functions +protected: + CDigiChar * DefineChar(TCHAR cChar); + void BuildString(); + + CString m_strText; + BOOL m_Modified; + DigiCharVector m_CharVector; + COLORREF m_OffColor; + COLORREF m_OnColor; + COLORREF m_BackColor; + DWORD m_DispStyle; + //{{AFX_MSG(CDigistring) + afx_msg void OnPaint(); + afx_msg BOOL OnEraseBkgnd(CDC* pDC); + //}}AFX_MSG + + DECLARE_MESSAGE_MAP() +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_DIGISTRING_H__F77484C2_745F_11D3_A718_87712333104C__INCLUDED_) -- cgit v1.1 From aa2abf8b5d0da8a4465d46a23d5cf2ce254c79b5 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:51:36 +0000 Subject: Utilisateur : Fcolin Date : 25/10/01 Heure : 11:44 Créé (vss 1) --- Horloge/Horloge.cpp | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 Horloge/Horloge.cpp (limited to 'Horloge') diff --git a/Horloge/Horloge.cpp b/Horloge/Horloge.cpp new file mode 100644 index 0000000..885f655 --- /dev/null +++ b/Horloge/Horloge.cpp @@ -0,0 +1,73 @@ +// Horloge.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "Horloge.h" +#include "HorlogeDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CHorlogeApp + +BEGIN_MESSAGE_MAP(CHorlogeApp, CWinApp) + //{{AFX_MSG_MAP(CHorlogeApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CHorlogeApp construction + +CHorlogeApp::CHorlogeApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CHorlogeApp object + +CHorlogeApp theApp; + +///////////////////////////////////////////////////////////////////////////// +// CHorlogeApp initialization + +BOOL CHorlogeApp::InitInstance() +{ + // Standard initialization + // If you are not using these features and wish to reduce the size + // of your final executable, you should remove from the following + // the specific initialization routines you do not need. + +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif + + AfxEnableControlContainer(); + CHorlogeDlg dlg; + m_pMainWnd = &dlg; + int nResponse = dlg.DoModal(); + if (nResponse == IDOK) + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + else if (nResponse == IDCANCEL) + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} -- cgit v1.1 From 0678d1746729e28482281a99ecf2fb7df6e48ace Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:51:38 +0000 Subject: Utilisateur : Fcolin Date : 19/12/05 Heure : 14:56 Archivé dans $/Bus/Horloge Commentaire: (vss 2) --- Horloge/Horloge.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'Horloge') diff --git a/Horloge/Horloge.cpp b/Horloge/Horloge.cpp index 885f655..cbe1774 100644 --- a/Horloge/Horloge.cpp +++ b/Horloge/Horloge.cpp @@ -41,21 +41,22 @@ CHorlogeApp theApp; BOOL CHorlogeApp::InitInstance() { - // Standard initialization - // If you are not using these features and wish to reduce the size - // of your final executable, you should remove from the following - // the specific initialization routines you do not need. + // InitCommonControlsEx() is required on Windows XP if an application + // manifest specifies use of ComCtl32.dll version 6 or later to enable + // visual styles. Otherwise, any window creation will fail. + INITCOMMONCONTROLSEX InitCtrls; + InitCtrls.dwSize = sizeof(InitCtrls); + // Set this to include all the common control classes you want to use + // in your application. + InitCtrls.dwICC = ICC_WIN95_CLASSES; + InitCommonControlsEx(&InitCtrls); -#ifdef _AFXDLL - Enable3dControls(); // Call this when using MFC in a shared DLL -#else - Enable3dControlsStatic(); // Call this when linking to MFC statically -#endif + CWinApp::InitInstance(); - AfxEnableControlContainer(); + //AfxEnableControlContainer(); CHorlogeDlg dlg; m_pMainWnd = &dlg; - int nResponse = dlg.DoModal(); + INT_PTR nResponse = dlg.DoModal(); if (nResponse == IDOK) { // TODO: Place code here to handle when the dialog is -- cgit v1.1 From 4413715eb4e1e46bb9161198c7a6eb5f27d8795e Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:51:45 +0000 Subject: Utilisateur : Fcolin Date : 25/10/01 Heure : 11:44 Créé (vss 1) --- Horloge/Horloge.dsp | 194 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 194 insertions(+) create mode 100644 Horloge/Horloge.dsp (limited to 'Horloge') diff --git a/Horloge/Horloge.dsp b/Horloge/Horloge.dsp new file mode 100644 index 0000000..9e11dc5 --- /dev/null +++ b/Horloge/Horloge.dsp @@ -0,0 +1,194 @@ +# Microsoft Developer Studio Project File - Name="Horloge" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=Horloge - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Horloge.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Horloge.mak" CFG="Horloge - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Horloge - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "Horloge - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName ""$/Bus/Horloge", JIEAAAAA" +# PROP Scc_LocalPath "." +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Horloge - Win32 Release" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x40c /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x40c /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 + +!ELSEIF "$(CFG)" == "Horloge - Win32 Debug" + +# PROP BASE Use_MFC 6 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 6 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x40c /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x40c /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "Horloge - Win32 Release" +# Name "Horloge - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\Curvefit.cpp +# End Source File +# Begin Source File + +SOURCE=.\Digistring.cpp +# End Source File +# Begin Source File + +SOURCE=.\Horloge.cpp +# End Source File +# Begin Source File + +SOURCE=.\Horloge.rc +# End Source File +# Begin Source File + +SOURCE=.\HorlogeDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\HorlogeParseCmdLine.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\Curvefit.h +# End Source File +# Begin Source File + +SOURCE=.\Digistring.h +# End Source File +# Begin Source File + +SOURCE=.\Horloge.h +# End Source File +# Begin Source File + +SOURCE=.\HorlogeDlg.h +# End Source File +# Begin Source File + +SOURCE=.\HorlogeParseCmdLine.h +# End Source File +# Begin Source File + +SOURCE=.\MemDC.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\Rgbcolor.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\Horloge.ico +# End Source File +# Begin Source File + +SOURCE=.\res\Horloge.rc2 +# End Source File +# Begin Source File + +SOURCE=.\res\ico00001.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ico00002.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ico00003.ico +# End Source File +# Begin Source File + +SOURCE=.\res\icon1.ico +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project -- cgit v1.1 From 7be288642cb64f554d3a20b660e9c2194b2ec8e1 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:51:46 +0000 Subject: Utilisateur : Fcolin Date : 27/11/01 Heure : 15:26 Archivé dans $/Bus/Horloge (vss 2) --- Horloge/Horloge.dsp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Horloge') diff --git a/Horloge/Horloge.dsp b/Horloge/Horloge.dsp index 9e11dc5..c10c181 100644 --- a/Horloge/Horloge.dsp +++ b/Horloge/Horloge.dsp @@ -65,9 +65,10 @@ LINK32=link.exe # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x40c /d "_DEBUG" /d "_AFXDLL" @@ -77,7 +78,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"c:\users\fcolin\Program Files\Debug\Horloge.exe" /pdbtype:sept !ENDIF @@ -183,6 +184,10 @@ SOURCE=.\res\ico00003.ico # End Source File # Begin Source File +SOURCE=.\res\ico00004.ico +# End Source File +# Begin Source File + SOURCE=.\res\icon1.ico # End Source File # End Group -- cgit v1.1 From 28e820d1cc74f65f87adb01ecd4fa4b1820a1591 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:51:49 +0000 Subject: Utilisateur : Fcolin Date : 25/10/01 Heure : 11:44 Créé (vss 1) --- Horloge/Horloge.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Horloge/Horloge.h (limited to 'Horloge') diff --git a/Horloge/Horloge.h b/Horloge/Horloge.h new file mode 100644 index 0000000..a7ab3d9 --- /dev/null +++ b/Horloge/Horloge.h @@ -0,0 +1,50 @@ +// Horloge.h : main header file for the HORLOGE application +// + +#if !defined(AFX_HORLOGE_H__0FD083D1_0B1D_43C1_9501_73E55EBEDE61__INCLUDED_) +#define AFX_HORLOGE_H__0FD083D1_0B1D_43C1_9501_73E55EBEDE61__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols +#include "Digistring.h" + +///////////////////////////////////////////////////////////////////////////// +// CHorlogeApp: +// See Horloge.cpp for the implementation of this class +// + +class CHorlogeApp : public CWinApp +{ +public: + CHorlogeApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CHorlogeApp) + public: + virtual BOOL InitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CHorlogeApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_HORLOGE_H__0FD083D1_0B1D_43C1_9501_73E55EBEDE61__INCLUDED_) -- cgit v1.1 From d48438c419d2186a270d5ef6c35db75a1b02fdfb Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:51:51 +0000 Subject: Utilisateur : Fcolin Date : 25/10/01 Heure : 11:44 Créé (vss 1) --- Horloge/Horloge.rc | 201 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 Horloge/Horloge.rc (limited to 'Horloge') diff --git a/Horloge/Horloge.rc b/Horloge/Horloge.rc new file mode 100644 index 0000000..f47ef38 --- /dev/null +++ b/Horloge/Horloge.rc @@ -0,0 +1,201 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// French (France) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA) +#ifdef _WIN32 +LANGUAGE LANG_FRENCH, SUBLANG_FRENCH +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#define _AFX_NO_SPLITTER_RESOURCES\r\n" + "#define _AFX_NO_OLE_RESOURCES\r\n" + "#define _AFX_NO_TRACKER_RESOURCES\r\n" + "#define _AFX_NO_PROPERTY_RESOURCES\r\n" + "\r\n" + "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)\r\n" + "#ifdef _WIN32\r\n" + "LANGUAGE 12, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\Horloge.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""l.fra\\afxres.rc"" // Standard components\r\n" + "#endif\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDR_MAINFRAME ICON DISCARDABLE "res\\Horloge.ico" +IDI_FORWARD ICON DISCARDABLE "res\\icon1.ico" +IDI_BACKWARD ICON DISCARDABLE "res\\ico00001.ico" +IDI_PAUSE ICON DISCARDABLE "res\\ico00002.ico" +IDI_START ICON DISCARDABLE "res\\ico00003.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_HORLOGE_DIALOG DIALOGEX 0, 0, 320, 200 +STYLE WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | + WS_SYSMENU | WS_THICKFRAME +EXSTYLE WS_EX_APPWINDOW +CAPTION "Horloge" +FONT 8, "MS Sans Serif" +BEGIN + PUSHBUTTON "Pause",IDC_PAUSE,115,82,61,28,BS_ICON + PUSHBUTTON "Start",IDC_START,179,82,58,28,BS_ICON + PUSHBUTTON "Backward",IDC_BACKWARD,115,54,37,22,BS_ICON + PUSHBUTTON "Forward",IDC_FORWARD,206,55,30,22,BS_ICON + CTEXT "SPEED",IDC_SPEED,156,55,47,22,SS_CENTERIMAGE | + SS_SUNKEN + CTEXT "HH:MM:SS",IDC_TIME,115,12,190,34,SS_CENTERIMAGE | + SS_SUNKEN + GROUPBOX "Ivy",IDC_STATIC,7,5,102,187 + EDITTEXT IDC_BUSNUMBER,20,18,74,14,ES_AUTOHSCROLL + PUSHBUTTON "Ivy Start",IDC_IVYSTART,41,38,31,14 + CONTROL "Big Speed",IDC_BIGSPEED,"Button",BS_AUTOCHECKBOX | + BS_LEFTTEXT | WS_DISABLED | WS_TABSTOP,243,57,58,16 + LISTBOX IDC_APPLIST,13,59,91,128,LBS_SORT | LBS_NOINTEGRALHEIGHT | + WS_VSCROLL | WS_TABSTOP + CONTROL "DateTimePicker1",IDC_SETTIME,"SysDateTimePick32", + DTS_RIGHTALIGN | DTS_UPDOWN | WS_TABSTOP | 0x8,251,86,54, + 13 + PUSHBUTTON "-5 min",IDC_BACK_5,119,119,28,24 + PUSHBUTTON "- 2 min",IDC_BACK_2,150,119,28,24 + PUSHBUTTON "+2 min",IDC_FORW_2,243,119,28,24 + PUSHBUTTON "+5 min",IDC_FORW_5,274,119,28,24 + PUSHBUTTON "-1 min",IDC_BACK_1,181,119,28,24 + PUSHBUTTON "+1 min",IDC_FORW_1,212,119,28,24 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,1 + PRODUCTVERSION 1,0,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040C04B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "Application MFC Horloge\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "Horloge\0" + VALUE "LegalCopyright", "Copyright (C) 2001\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "Horloge.EXE\0" + VALUE "ProductName", "Application Horloge\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x40c, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_HORLOGE_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 313 + TOPMARGIN, 5 + BOTTOMMARGIN, 192 + END +END +#endif // APSTUDIO_INVOKED + +#endif // French (France) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#define _AFX_NO_SPLITTER_RESOURCES +#define _AFX_NO_OLE_RESOURCES +#define _AFX_NO_TRACKER_RESOURCES +#define _AFX_NO_PROPERTY_RESOURCES + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA) +#ifdef _WIN32 +LANGUAGE 12, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\Horloge.rc2" // non-Microsoft Visual C++ edited resources +#include "l.fra\afxres.rc" // Standard components +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + -- cgit v1.1 From 68a2ccdb918f821331677f0d2614a2f4794e2b2b Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:51:52 +0000 Subject: Utilisateur : Fcolin Date : 27/11/01 Heure : 15:26 Archivé dans $/Bus/Horloge (vss 2) --- Horloge/Horloge.rc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'Horloge') diff --git a/Horloge/Horloge.rc b/Horloge/Horloge.rc index f47ef38..6f04b7a 100644 --- a/Horloge/Horloge.rc +++ b/Horloge/Horloge.rc @@ -71,6 +71,7 @@ IDI_FORWARD ICON DISCARDABLE "res\\icon1.ico" IDI_BACKWARD ICON DISCARDABLE "res\\ico00001.ico" IDI_PAUSE ICON DISCARDABLE "res\\ico00002.ico" IDI_START ICON DISCARDABLE "res\\ico00003.ico" +IDI_NORMAL_SPEED ICON DISCARDABLE "res\\ico00004.ico" ///////////////////////////////////////////////////////////////////////////// // @@ -86,9 +87,9 @@ FONT 8, "MS Sans Serif" BEGIN PUSHBUTTON "Pause",IDC_PAUSE,115,82,61,28,BS_ICON PUSHBUTTON "Start",IDC_START,179,82,58,28,BS_ICON - PUSHBUTTON "Backward",IDC_BACKWARD,115,54,37,22,BS_ICON - PUSHBUTTON "Forward",IDC_FORWARD,206,55,30,22,BS_ICON - CTEXT "SPEED",IDC_SPEED,156,55,47,22,SS_CENTERIMAGE | + PUSHBUTTON "Backward",IDC_BACKWARD,111,55,30,22,BS_ICON + PUSHBUTTON "Forward",IDC_FORWARD,175,55,30,22,BS_ICON + CTEXT "SPEED",IDC_SPEED,212,55,47,22,SS_CENTERIMAGE | SS_SUNKEN CTEXT "HH:MM:SS",IDC_TIME,115,12,190,34,SS_CENTERIMAGE | SS_SUNKEN @@ -96,7 +97,7 @@ BEGIN EDITTEXT IDC_BUSNUMBER,20,18,74,14,ES_AUTOHSCROLL PUSHBUTTON "Ivy Start",IDC_IVYSTART,41,38,31,14 CONTROL "Big Speed",IDC_BIGSPEED,"Button",BS_AUTOCHECKBOX | - BS_LEFTTEXT | WS_DISABLED | WS_TABSTOP,243,57,58,16 + BS_LEFTTEXT | WS_DISABLED | WS_TABSTOP,264,62,49,10 LISTBOX IDC_APPLIST,13,59,91,128,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP CONTROL "DateTimePicker1",IDC_SETTIME,"SysDateTimePick32", @@ -108,6 +109,9 @@ BEGIN PUSHBUTTON "+5 min",IDC_FORW_5,274,119,28,24 PUSHBUTTON "-1 min",IDC_BACK_1,181,119,28,24 PUSHBUTTON "+1 min",IDC_FORW_1,212,119,28,24 + PUSHBUTTON "Change File...",IDC_FILE,113,167,48,14 + EDITTEXT IDC_FILENAME,165,167,142,14,ES_AUTOHSCROLL | ES_READONLY + PUSHBUTTON "Normal Speed",IDC_NORMAL_SPEED,143,55,30,22,BS_ICON END -- cgit v1.1 From 84abba6b118623c2b269686311a8961da128310f Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:51:54 +0000 Subject: Utilisateur : Fcolin Date : 19/12/05 Heure : 14:56 Archivé dans $/Bus/Horloge Commentaire: (vss 3) --- Horloge/Horloge.rc | 71 +++++++++++++++++++++++------------------------------- 1 file changed, 30 insertions(+), 41 deletions(-) (limited to 'Horloge') diff --git a/Horloge/Horloge.rc b/Horloge/Horloge.rc index 6f04b7a..a7c0582 100644 --- a/Horloge/Horloge.rc +++ b/Horloge/Horloge.rc @@ -1,4 +1,4 @@ -//Microsoft Developer Studio generated resource script. +// Microsoft Visual C++ generated resource script. // #include "resource.h" @@ -27,18 +27,18 @@ LANGUAGE LANG_FRENCH, SUBLANG_FRENCH // TEXTINCLUDE // -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#include ""afxres.h""\r\n" "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "#define _AFX_NO_SPLITTER_RESOURCES\r\n" "#define _AFX_NO_OLE_RESOURCES\r\n" @@ -66,44 +66,37 @@ END // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. -IDR_MAINFRAME ICON DISCARDABLE "res\\Horloge.ico" -IDI_FORWARD ICON DISCARDABLE "res\\icon1.ico" -IDI_BACKWARD ICON DISCARDABLE "res\\ico00001.ico" -IDI_PAUSE ICON DISCARDABLE "res\\ico00002.ico" -IDI_START ICON DISCARDABLE "res\\ico00003.ico" -IDI_NORMAL_SPEED ICON DISCARDABLE "res\\ico00004.ico" +IDR_MAINFRAME ICON "res\\Horloge.ico" +IDI_FORWARD ICON "res\\icon1.ico" +IDI_BACKWARD ICON "res\\ico00001.ico" +IDI_PAUSE ICON "res\\ico00002.ico" +IDI_START ICON "res\\ico00003.ico" +IDI_NORMAL_SPEED ICON "res\\ico00004.ico" ///////////////////////////////////////////////////////////////////////////// // // Dialog // -IDD_HORLOGE_DIALOG DIALOGEX 0, 0, 320, 200 -STYLE WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | - WS_SYSMENU | WS_THICKFRAME +IDD_HORLOGE_DIALOG DIALOGEX 0, 0, 320, 201 +STYLE DS_SETFONT | DS_MODALFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_APPWINDOW CAPTION "Horloge" -FONT 8, "MS Sans Serif" +FONT 8, "MS Sans Serif", 0, 0, 0x1 BEGIN PUSHBUTTON "Pause",IDC_PAUSE,115,82,61,28,BS_ICON PUSHBUTTON "Start",IDC_START,179,82,58,28,BS_ICON PUSHBUTTON "Backward",IDC_BACKWARD,111,55,30,22,BS_ICON PUSHBUTTON "Forward",IDC_FORWARD,175,55,30,22,BS_ICON - CTEXT "SPEED",IDC_SPEED,212,55,47,22,SS_CENTERIMAGE | - SS_SUNKEN - CTEXT "HH:MM:SS",IDC_TIME,115,12,190,34,SS_CENTERIMAGE | - SS_SUNKEN - GROUPBOX "Ivy",IDC_STATIC,7,5,102,187 + CTEXT "SPEED",IDC_SPEED,212,55,47,22,SS_CENTERIMAGE | SS_SUNKEN + CTEXT "HH:MM:SS",IDC_TIME,115,12,190,34,SS_CENTERIMAGE | SS_SUNKEN + GROUPBOX "Ivy",IDC_STATIC,7,5,102,188 EDITTEXT IDC_BUSNUMBER,20,18,74,14,ES_AUTOHSCROLL PUSHBUTTON "Ivy Start",IDC_IVYSTART,41,38,31,14 - CONTROL "Big Speed",IDC_BIGSPEED,"Button",BS_AUTOCHECKBOX | - BS_LEFTTEXT | WS_DISABLED | WS_TABSTOP,264,62,49,10 - LISTBOX IDC_APPLIST,13,59,91,128,LBS_SORT | LBS_NOINTEGRALHEIGHT | - WS_VSCROLL | WS_TABSTOP - CONTROL "DateTimePicker1",IDC_SETTIME,"SysDateTimePick32", - DTS_RIGHTALIGN | DTS_UPDOWN | WS_TABSTOP | 0x8,251,86,54, - 13 - PUSHBUTTON "-5 min",IDC_BACK_5,119,119,28,24 + CONTROL "Big Speed",IDC_BIGSPEED,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_DISABLED | WS_TABSTOP,264,62,49,10 + LISTBOX IDC_APPLIST,13,59,91,128,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP + CONTROL "DateTimePicker1",IDC_SETTIME,"SysDateTimePick32",DTS_RIGHTALIGN | DTS_UPDOWN | WS_TABSTOP | 0x8,251,86,54,13 + PUSHBUTTON "-5 min",IDC_BACK_5,117,119,28,24 PUSHBUTTON "- 2 min",IDC_BACK_2,150,119,28,24 PUSHBUTTON "+2 min",IDC_FORW_2,243,119,28,24 PUSHBUTTON "+5 min",IDC_FORW_5,274,119,28,24 @@ -112,10 +105,10 @@ BEGIN PUSHBUTTON "Change File...",IDC_FILE,113,167,48,14 EDITTEXT IDC_FILENAME,165,167,142,14,ES_AUTOHSCROLL | ES_READONLY PUSHBUTTON "Normal Speed",IDC_NORMAL_SPEED,143,55,30,22,BS_ICON + CONTROL "",IDC_FILEPROGRESS,"msctls_progress32",WS_BORDER,110,148,203,14 END -#ifndef _MAC ///////////////////////////////////////////////////////////////////////////// // // Version @@ -138,15 +131,13 @@ BEGIN BEGIN BLOCK "040C04B0" BEGIN - VALUE "CompanyName", "\0" - VALUE "FileDescription", "Application MFC Horloge\0" - VALUE "FileVersion", "1, 0, 0, 1\0" - VALUE "InternalName", "Horloge\0" - VALUE "LegalCopyright", "Copyright (C) 2001\0" - VALUE "LegalTrademarks", "\0" - VALUE "OriginalFilename", "Horloge.EXE\0" - VALUE "ProductName", "Application Horloge\0" - VALUE "ProductVersion", "1, 0, 0, 1\0" + VALUE "FileDescription", "Application MFC Horloge" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "Horloge" + VALUE "LegalCopyright", "Copyright (C) 2001" + VALUE "OriginalFilename", "Horloge.EXE" + VALUE "ProductName", "Application Horloge" + VALUE "ProductVersion", "1, 0, 0, 1" END END BLOCK "VarFileInfo" @@ -155,8 +146,6 @@ BEGIN END END -#endif // !_MAC - ///////////////////////////////////////////////////////////////////////////// // @@ -164,14 +153,14 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_HORLOGE_DIALOG, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 313 TOPMARGIN, 5 - BOTTOMMARGIN, 192 + BOTTOMMARGIN, 193 END END #endif // APSTUDIO_INVOKED -- cgit v1.1 From 834e692b11592ea32cb5ea0f04f041b0dd520451 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:51:57 +0000 Subject: Utilisateur : Fcolin Date : 10/06/02 Heure : 11:34 Créé Commentaire: (vss 1) --- Horloge/Horloge.vcproj | 229 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 229 insertions(+) create mode 100644 Horloge/Horloge.vcproj (limited to 'Horloge') diff --git a/Horloge/Horloge.vcproj b/Horloge/Horloge.vcproj new file mode 100644 index 0000000..b5235bd --- /dev/null +++ b/Horloge/Horloge.vcproj @@ -0,0 +1,229 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.1 From 201fac491654302aa049f0ab80a4f2266a996fdc Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:51:59 +0000 Subject: Utilisateur : Fcolin Date : 10/06/02 Heure : 11:50 Archivé dans $/Bus/Horloge Commentaire: (vss 2) --- Horloge/Horloge.vcproj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Horloge') diff --git a/Horloge/Horloge.vcproj b/Horloge/Horloge.vcproj index b5235bd..89e3b70 100644 --- a/Horloge/Horloge.vcproj +++ b/Horloge/Horloge.vcproj @@ -24,6 +24,7 @@ + Culture="1036" + AdditionalIncludeDirectories=""/> + Culture="1036"/> + + + + + Name="VCPostBuildEventTool" + CommandLine="copy "$(TargetPath)" "C:\users\fcolin\Program Files\$(OutDir)""/> + + + + + + + + + + -- cgit v1.1 From 9ee8b19ce84b2e59bb574d34375211cb139a185c Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:52:08 +0000 Subject: Utilisateur : Fcolin Date : 7/11/03 Heure : 17:50 Archivé dans $/Bus/Horloge Commentaire: (vss 7) --- Horloge/Horloge.vcproj | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'Horloge') diff --git a/Horloge/Horloge.vcproj b/Horloge/Horloge.vcproj index 6c8da7f..0328a96 100644 --- a/Horloge/Horloge.vcproj +++ b/Horloge/Horloge.vcproj @@ -221,7 +221,8 @@ Name="Resource Files" Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"> + RelativePath="Horloge.exe.manifest" + DeploymentContent="TRUE"> @@ -246,9 +247,6 @@ - - -- cgit v1.1 From f2cecd7f6487c7c0b3b6886dff91f9cdd0e05e56 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:52:10 +0000 Subject: Utilisateur : Fcolin Date : 6/12/04 Heure : 11:23 Archivé dans $/Bus/Horloge Commentaire: (vss 8) --- Horloge/Horloge.vcproj | 3 --- 1 file changed, 3 deletions(-) (limited to 'Horloge') diff --git a/Horloge/Horloge.vcproj b/Horloge/Horloge.vcproj index 0328a96..b8c2606 100644 --- a/Horloge/Horloge.vcproj +++ b/Horloge/Horloge.vcproj @@ -144,9 +144,6 @@ - + Keyword="MFCProj" + > + Name="Win32" + /> + + + + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + + + + + + SuppressStartupBanner="true" + DebugInformationFormat="4" + /> + + + Name="VCPreLinkEventTool" + /> + SuppressStartupBanner="true" + GenerateDebugInformation="true" + SubSystem="2" + /> + + + + + + + + + + + + + + - + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="3" + TypeLibraryName=".\Debug/Horloge.tlb" + /> + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\Ivy;"..\..\..\pcre-6.4"" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="stdafx.h" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + /> + Name="VCManagedResourceCompilerTool" + /> + Culture="1036" + AdditionalIncludeDirectories="$(IntDir)/" + /> + + + + + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + + + + + + SuppressStartupBanner="true" + /> + Name="VCManagedResourceCompilerTool" + /> + + + SuppressStartupBanner="true" + SubSystem="2" + /> + Name="VCALinkTool" + /> + + + + + + + CommandLine="rem copy "$(TargetPath)" "C:\users\fcolin\Program Files\$(OutDir)"" + /> + + + + + + + + Name="VCCLCompilerTool" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="..\Ivy;"..\..\..\pcre-6.4"" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" + StringPooling="true" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="stdafx.h" + WarningLevel="3" + SuppressStartupBanner="true" + /> + Name="VCManagedResourceCompilerTool" + /> + Culture="1036" + /> + + + + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + + + + + Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" + > + RelativePath=".\Curvefit.cpp" + > + RelativePath=".\Digistring.cpp" + > + RelativePath=".\Horloge.cpp" + > + RelativePath=".\HorlogeDlg.cpp" + > + RelativePath=".\HorlogeParseCmdLine.cpp" + > - - + RelativePath=".\StdAfx.cpp" + > + + + + + + + Name="Release|Win32" + > + UsePrecompiledHeader="1" + /> + Name="Release|x64" + > + UsePrecompiledHeader="1" + /> + Filter="h;hpp;hxx;hm;inl" + > + RelativePath=".\Curvefit.h" + > + RelativePath=".\Digistring.h" + > + RelativePath=".\Horloge.h" + > + RelativePath=".\HorlogeDlg.h" + > + RelativePath=".\HorlogeParseCmdLine.h" + > + RelativePath=".\MemDC.h" + > + RelativePath=".\Resource.h" + > + RelativePath=".\Rgbcolor.h" + > + RelativePath=".\StdAfx.h" + > + Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" + > + RelativePath=".\res\Horloge.ico" + > + RelativePath=".\Horloge.rc" + > + RelativePath=".\res\Horloge.rc2" + > + RelativePath=".\res\ico00001.ico" + > + RelativePath=".\res\ico00002.ico" + > + RelativePath=".\res\ico00003.ico" + > + RelativePath=".\res\ico00004.ico" + > + RelativePath=".\res\icon1.ico" + > + RelativePath=".\ReadMe.txt" + > + -- cgit v1.1 From 54d7df6531441cfc201713feaa432a8bf9ab9549 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:52:17 +0000 Subject: Utilisateur : Fcolin Date : 10/06/02 Heure : 11:50 Créé Commentaire: (vss 1) --- Horloge/Horloge.vcproj.vspscc | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Horloge/Horloge.vcproj.vspscc (limited to 'Horloge') diff --git a/Horloge/Horloge.vcproj.vspscc b/Horloge/Horloge.vcproj.vspscc new file mode 100644 index 0000000..794f014 --- /dev/null +++ b/Horloge/Horloge.vcproj.vspscc @@ -0,0 +1,10 @@ +"" +{ +"FILE_VERSION" = "9237" +"ENLISTMENT_CHOICE" = "NEVER" +"PROJECT_FILE_RELATIVE_PATH" = "" +"NUMBER_OF_EXCLUDED_FILES" = "0" +"ORIGINAL_PROJECT_FILE_PATH" = "" +"NUMBER_OF_NESTED_PROJECTS" = "0" +"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT" +} -- cgit v1.1 From 8bed7960b99979ec40cae299adae9c714dd78f5c Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:52:19 +0000 Subject: Utilisateur : Fcolin Date : 25/10/01 Heure : 11:44 Créé (vss 1) --- Horloge/HorlogeDlg.cpp | 259 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 259 insertions(+) create mode 100644 Horloge/HorlogeDlg.cpp (limited to 'Horloge') diff --git a/Horloge/HorlogeDlg.cpp b/Horloge/HorlogeDlg.cpp new file mode 100644 index 0000000..1bce992 --- /dev/null +++ b/Horloge/HorlogeDlg.cpp @@ -0,0 +1,259 @@ +// HorlogeDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "Horloge.h" +#include "HorlogeDlg.h" +#include "HorlogeParseCmdLine.h" + +#include "IvyApplication.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CHorlogeDlg dialog + +CHorlogeDlg::CHorlogeDlg(CWnd* pParent /*=NULL*/) + : CDialog(CHorlogeDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CHorlogeDlg) + m_busnumber = _T(""); + m_big_speed = FALSE; + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); + + bus = NULL; + rate = 1.0; +} + +void CHorlogeDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CHorlogeDlg) + DDX_Control(pDX, IDC_SETTIME, m_setTime); + DDX_Control(pDX, IDC_APPLIST, m_applist); + DDX_Control(pDX, IDC_SPEED, m_Speed); + DDX_Control(pDX, IDC_TIME, m_Time); + DDX_Text(pDX, IDC_BUSNUMBER, m_busnumber); + DDX_Check(pDX, IDC_BIGSPEED, m_big_speed); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CHorlogeDlg, CDialog) + //{{AFX_MSG_MAP(CHorlogeDlg) + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_IVYSTART, OnIvystart) + ON_BN_CLICKED(IDC_PAUSE, OnPause) + ON_BN_CLICKED(IDC_START, OnStart) + ON_NOTIFY(DTN_DATETIMECHANGE, IDC_SETTIME, OnDatetimechangeSettime) + ON_BN_CLICKED(IDC_BACKWARD, OnBackward) + ON_BN_CLICKED(IDC_FORWARD, OnForward) + ON_BN_CLICKED(IDC_BACK_5, OnBack5) + ON_BN_CLICKED(IDC_BACK_2, OnBack2) + ON_BN_CLICKED(IDC_BACK_1, OnBack1) + ON_BN_CLICKED(IDC_FORW_1, OnForw1) + ON_BN_CLICKED(IDC_FORW_2, OnForw2) + ON_BN_CLICKED(IDC_FORW_5, OnForw5) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CHorlogeDlg message handlers + +BOOL CHorlogeDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + //SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + ((CButton*)GetDlgItem(IDC_FORWARD))->SetIcon( AfxGetApp()->LoadIcon(IDI_FORWARD)); + ((CButton*)GetDlgItem(IDC_BACKWARD))->SetIcon(AfxGetApp()->LoadIcon(IDI_BACKWARD)); + ((CButton*)GetDlgItem(IDC_PAUSE))->SetIcon(AfxGetApp()->LoadIcon(IDI_PAUSE)); + ((CButton*)GetDlgItem(IDC_START))->SetIcon(AfxGetApp()->LoadIcon(IDI_START)); + + + m_Time.Format("%02d:%02d:%02d", 0,0,0); + m_Speed.Format("%.2f", rate ); + + bus = new Ivy( "Horloge","Horloge READY",this,TRUE); + + // parse command Line Info + HorlogeParseCmdLine cmd; + cmd.m_busNumber = bus->GetDomain( NULL ); + + AfxGetApp()->ParseCommandLine( cmd ); + + // Set Argument from Command Line + m_busnumber = cmd.m_busNumber; + + + bus->BindMsg("^ClockEvent Time=([0-9]+):([0-9]+):([0-9]+) Rate=([-.0-9]+) Bs=([0-9]+)", BUS_CALLBACK_OF(CHorlogeDlg, IvyClockEvent )); + bus->BindMsg("^ClockDatas Time=([0-9]+):([0-9]+):([0-9]+) Rate=([-.0-9]+) Bs=([0-9]+)", BUS_CALLBACK_OF(CHorlogeDlg, IvyClockEvent )); + bus->BindMsg("^rejeu READY", BUS_CALLBACK_OF(CHorlogeDlg, IvyRejeuReady)); + + m_busnumber = bus->GetDomain( m_busnumber ); + UpdateData(FALSE); + + // force bus start in case of start + if ( cmd.m_start ) + OnIvystart(); + + return TRUE; // return TRUE unless you set the focus to a control +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CHorlogeDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CHorlogeDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CHorlogeDlg::OnIvystart() +{ + UpdateData(TRUE); + bus->stop(); + m_busnumber = bus->GetDomain( m_busnumber ); + bus->start(m_busnumber); + m_applist.ResetContent(); + UpdateData(FALSE); +} +void CHorlogeDlg::OnApplicationConnected(IvyApplication *app) +{ + m_applist.AddString( app->GetName() ); +} +void CHorlogeDlg::OnApplicationDisconnected(IvyApplication *app) +{ + m_applist.DeleteString(m_applist.FindString(0, app->GetName()) ); +} +void CHorlogeDlg::IvyClockEvent( IvyApplication *app, int argc, const char **argv ) +{ + // Ivy ClockEvent Time=10:23:45 Rate=3 Bs=0 + time.wHour = atoi( *argv++ ); + time.wMinute = atoi( *argv++ ); + time.wSecond = atoi( *argv++ ); + rate = atof( *argv++ ); + int BigSpeed = atoi( *argv++ ); + m_Time.Format("%02d:%02d:%02d", time.wHour, time.wMinute, time.wSecond); + m_Speed.Format("%.2f", rate ); + m_big_speed = BigSpeed; + m_setTime.SetTime(&time); + UpdateData(FALSE); +} +void CHorlogeDlg::IvyRejeuReady( IvyApplication *app, int argc, const char **argv ) +{ + bus->SendMsg("GetClockDatas"); +} + +void CHorlogeDlg::OnPause() +{ + bus->SendMsg("ClockPause"); +} + +void CHorlogeDlg::OnStart() +{ + bus->SendMsg("ClockStart"); +} + +void CHorlogeDlg::OnBackward() +{ + rate -= 0.5; + m_Speed.Format("%.2f", rate ); + bus->SendMsg("SetClock Rate=%f",rate); +} + +void CHorlogeDlg::OnForward() +{ + rate += 0.5; + m_Speed.Format("%.2f", rate ); + bus->SendMsg("SetClock Rate=%f",rate); +} + + +void CHorlogeDlg::OnDatetimechangeSettime(NMHDR* pNMHDR, LRESULT* pResult) +{ + m_setTime.GetTime(&time); + bus->SendMsg( "SetClock Time=%d:%d:%d", time.wHour, time.wMinute, time.wSecond ); + m_Time.Format("%02d:%02d:%02d", time.wHour, time.wMinute, time.wSecond); + *pResult = 0; +} + + +void CHorlogeDlg::OnBack5() +{ + time.wMinute -= 5; + bus->SendMsg( "SetClock Time=%d:%d:%d", time.wHour, time.wMinute, time.wSecond ); + m_Time.Format("%02d:%02d:%02d", time.wHour, time.wMinute, time.wSecond); +} + +void CHorlogeDlg::OnBack2() +{ + time.wMinute -= 2; + bus->SendMsg( "SetClock Time=%d:%d:%d", time.wHour, time.wMinute, time.wSecond ); + m_Time.Format("%02d:%02d:%02d", time.wHour, time.wMinute, time.wSecond); +} + +void CHorlogeDlg::OnBack1() +{ + time.wMinute -= 1; + bus->SendMsg( "SetClock Time=%d:%d:%d", time.wHour, time.wMinute, time.wSecond ); + m_Time.Format("%02d:%02d:%02d", time.wHour, time.wMinute, time.wSecond); +} + +void CHorlogeDlg::OnForw1() +{ + time.wMinute += 1; + bus->SendMsg( "SetClock Time=%d:%d:%d", time.wHour, time.wMinute, time.wSecond ); + m_Time.Format("%02d:%02d:%02d", time.wHour, time.wMinute, time.wSecond); +} + +void CHorlogeDlg::OnForw2() +{ + time.wMinute += 2; + bus->SendMsg( "SetClock Time=%d:%d:%d", time.wHour, time.wMinute, time.wSecond ); + m_Time.Format("%02d:%02d:%02d", time.wHour, time.wMinute, time.wSecond); +} + +void CHorlogeDlg::OnForw5() +{ + time.wMinute += 5; + bus->SendMsg( "SetClock Time=%d:%d:%d", time.wHour, time.wMinute, time.wSecond ); + m_Time.Format("%02d:%02d:%02d", time.wHour, time.wMinute, time.wSecond); +} -- cgit v1.1 From 0cd203ab7d56dd302f0f0338516d6fa18f21cbaf Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:52:20 +0000 Subject: Utilisateur : Fcolin Date : 27/11/01 Heure : 15:26 Archivé dans $/Bus/Horloge (vss 2) --- Horloge/HorlogeDlg.cpp | 89 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 80 insertions(+), 9 deletions(-) (limited to 'Horloge') diff --git a/Horloge/HorlogeDlg.cpp b/Horloge/HorlogeDlg.cpp index 1bce992..b02352d 100644 --- a/Horloge/HorlogeDlg.cpp +++ b/Horloge/HorlogeDlg.cpp @@ -23,10 +23,11 @@ CHorlogeDlg::CHorlogeDlg(CWnd* pParent /*=NULL*/) //{{AFX_DATA_INIT(CHorlogeDlg) m_busnumber = _T(""); m_big_speed = FALSE; + m_filename = _T(""); //}}AFX_DATA_INIT // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); - + memset( &time, 0, sizeof( time ) ); bus = NULL; rate = 1.0; } @@ -41,6 +42,7 @@ void CHorlogeDlg::DoDataExchange(CDataExchange* pDX) DDX_Control(pDX, IDC_TIME, m_Time); DDX_Text(pDX, IDC_BUSNUMBER, m_busnumber); DDX_Check(pDX, IDC_BIGSPEED, m_big_speed); + DDX_Text(pDX, IDC_FILENAME, m_filename); //}}AFX_DATA_MAP } @@ -60,6 +62,9 @@ BEGIN_MESSAGE_MAP(CHorlogeDlg, CDialog) ON_BN_CLICKED(IDC_FORW_1, OnForw1) ON_BN_CLICKED(IDC_FORW_2, OnForw2) ON_BN_CLICKED(IDC_FORW_5, OnForw5) + ON_BN_CLICKED(IDC_FILE, OnFile) + ON_BN_CLICKED(IDC_NORMAL_SPEED, OnNormalSpeed) + ON_LBN_DBLCLK(IDC_APPLIST, OnDblclkApplist) //}}AFX_MSG_MAP END_MESSAGE_MAP() @@ -79,10 +84,12 @@ BOOL CHorlogeDlg::OnInitDialog() ((CButton*)GetDlgItem(IDC_BACKWARD))->SetIcon(AfxGetApp()->LoadIcon(IDI_BACKWARD)); ((CButton*)GetDlgItem(IDC_PAUSE))->SetIcon(AfxGetApp()->LoadIcon(IDI_PAUSE)); ((CButton*)GetDlgItem(IDC_START))->SetIcon(AfxGetApp()->LoadIcon(IDI_START)); + ((CButton*)GetDlgItem(IDC_NORMAL_SPEED))->SetIcon(AfxGetApp()->LoadIcon(IDI_NORMAL_SPEED)); m_Time.Format("%02d:%02d:%02d", 0,0,0); m_Speed.Format("%.2f", rate ); + m_setTime.GetTime(&time); bus = new Ivy( "Horloge","Horloge READY",this,TRUE); @@ -98,6 +105,7 @@ BOOL CHorlogeDlg::OnInitDialog() bus->BindMsg("^ClockEvent Time=([0-9]+):([0-9]+):([0-9]+) Rate=([-.0-9]+) Bs=([0-9]+)", BUS_CALLBACK_OF(CHorlogeDlg, IvyClockEvent )); bus->BindMsg("^ClockDatas Time=([0-9]+):([0-9]+):([0-9]+) Rate=([-.0-9]+) Bs=([0-9]+)", BUS_CALLBACK_OF(CHorlogeDlg, IvyClockEvent )); + bus->BindMsg("^FileReadEvent Type=REJEU Name=([^ ]+) StartTime=([0-9]+):([0-9]+):([0-9]+) EndTime=([0-9]+):([0-9]+):([0-9]+)", BUS_CALLBACK_OF(CHorlogeDlg, IvyFileReadEvent )); bus->BindMsg("^rejeu READY", BUS_CALLBACK_OF(CHorlogeDlg, IvyRejeuReady)); m_busnumber = bus->GetDomain( m_busnumber ); @@ -163,6 +171,21 @@ void CHorlogeDlg::OnApplicationDisconnected(IvyApplication *app) { m_applist.DeleteString(m_applist.FindString(0, app->GetName()) ); } + +void CHorlogeDlg::OnDblclkApplist() +{ + CString name; + int sel = m_applist.GetCurSel(); + m_applist.GetText( sel, name ); + IvyApplication *app = bus->GetApplication( name ); + if ( app ) + { + bus->SendDieMsg(app); + m_applist.DeleteString( sel ); + } + +} + void CHorlogeDlg::IvyClockEvent( IvyApplication *app, int argc, const char **argv ) { // Ivy ClockEvent Time=10:23:45 Rate=3 Bs=0 @@ -177,6 +200,26 @@ void CHorlogeDlg::IvyClockEvent( IvyApplication *app, int argc, const char **arg m_setTime.SetTime(&time); UpdateData(FALSE); } +void CHorlogeDlg::IvyFileReadEvent( IvyApplication *app, int argc, const char **argv ) +{ + // Ivy FileReadEvent Type=REJEU Name=/home/fcolin/asterix/EAF3534D.rej StartTime=19:57:00 EndTime=20:09:59 + const char* name = *argv++; + int hh_start = atoi( *argv++ ); + int mm_start = atoi( *argv++ ); + int ss_start = atoi( *argv++ ); + int hh_end = atoi( *argv++ ); + int mm_end = atoi( *argv++ ); + int ss_end = atoi( *argv++ ); + + time.wHour = hh_start; + time.wMinute = mm_start; + time.wSecond = ss_start; + + m_Time.Format("%02d:%02d:%02d", time.wHour, time.wMinute, time.wSecond); + VERIFY(m_setTime.SetTime(&time)); + m_filename = name; + UpdateData(FALSE); +} void CHorlogeDlg::IvyRejeuReady( IvyApplication *app, int argc, const char **argv ) { bus->SendMsg("GetClockDatas"); @@ -196,14 +239,20 @@ void CHorlogeDlg::OnBackward() { rate -= 0.5; m_Speed.Format("%.2f", rate ); - bus->SendMsg("SetClock Rate=%f",rate); + bus->SendMsg("SetClock Rate=%.2f",rate); } void CHorlogeDlg::OnForward() { rate += 0.5; m_Speed.Format("%.2f", rate ); - bus->SendMsg("SetClock Rate=%f",rate); + bus->SendMsg("SetClock Rate=%.2f",rate); +} +void CHorlogeDlg::OnNormalSpeed() +{ + rate = 1.0; + m_Speed.Format("%.2f", rate ); + bus->SendMsg("SetClock Rate=%.2f",rate); } @@ -218,42 +267,64 @@ void CHorlogeDlg::OnDatetimechangeSettime(NMHDR* pNMHDR, LRESULT* pResult) void CHorlogeDlg::OnBack5() { - time.wMinute -= 5; + CTime new_time( time ); + new_time -= CTimeSpan( 0, 0, 5, 0 ); + new_time. GetAsSystemTime(time); bus->SendMsg( "SetClock Time=%d:%d:%d", time.wHour, time.wMinute, time.wSecond ); m_Time.Format("%02d:%02d:%02d", time.wHour, time.wMinute, time.wSecond); } void CHorlogeDlg::OnBack2() { - time.wMinute -= 2; + CTime new_time( time ); + new_time -= CTimeSpan( 0, 0, 2, 0 ); + new_time. GetAsSystemTime(time); bus->SendMsg( "SetClock Time=%d:%d:%d", time.wHour, time.wMinute, time.wSecond ); m_Time.Format("%02d:%02d:%02d", time.wHour, time.wMinute, time.wSecond); } void CHorlogeDlg::OnBack1() { - time.wMinute -= 1; + CTime new_time( time ); + new_time -= CTimeSpan( 0, 0, 1, 0 ); + new_time. GetAsSystemTime(time); bus->SendMsg( "SetClock Time=%d:%d:%d", time.wHour, time.wMinute, time.wSecond ); m_Time.Format("%02d:%02d:%02d", time.wHour, time.wMinute, time.wSecond); } void CHorlogeDlg::OnForw1() { - time.wMinute += 1; + CTime new_time( time ); + new_time += CTimeSpan( 0, 0, 1, 0 ); + new_time. GetAsSystemTime(time); bus->SendMsg( "SetClock Time=%d:%d:%d", time.wHour, time.wMinute, time.wSecond ); m_Time.Format("%02d:%02d:%02d", time.wHour, time.wMinute, time.wSecond); } void CHorlogeDlg::OnForw2() { - time.wMinute += 2; + CTime new_time( time ); + new_time += CTimeSpan( 0, 0, 2, 0 ); + new_time. GetAsSystemTime(time); bus->SendMsg( "SetClock Time=%d:%d:%d", time.wHour, time.wMinute, time.wSecond ); m_Time.Format("%02d:%02d:%02d", time.wHour, time.wMinute, time.wSecond); } void CHorlogeDlg::OnForw5() { - time.wMinute += 5; + CTime new_time( time ); + new_time += CTimeSpan( 0, 0, 5, 0 ); + new_time. GetAsSystemTime(time); bus->SendMsg( "SetClock Time=%d:%d:%d", time.wHour, time.wMinute, time.wSecond ); m_Time.Format("%02d:%02d:%02d", time.wHour, time.wMinute, time.wSecond); } + +void CHorlogeDlg::OnFile() +{ + CFileDialog file(TRUE,TEXT(".rej"),NULL, OFN_FILEMUSTEXIST,"Rejeu Files (*.rej)|*.rej|All Files (*.*)|*.*||"); + if ( file.DoModal() == IDOK ) + { + bus->SendMsg( "FileRead Type=rejeu Name=%s", file.GetPathName() ); + } +} + -- cgit v1.1 From e39b169d9d4070082046f55cbd6c3efbbd048fb1 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:52:22 +0000 Subject: Utilisateur : Fcolin Date : 26/03/02 Heure : 15:45 Archivé dans $/Bus/Horloge Commentaire: Setclock of rejeu (vss 3) --- Horloge/HorlogeDlg.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'Horloge') diff --git a/Horloge/HorlogeDlg.cpp b/Horloge/HorlogeDlg.cpp index b02352d..6e26f61 100644 --- a/Horloge/HorlogeDlg.cpp +++ b/Horloge/HorlogeDlg.cpp @@ -232,6 +232,7 @@ void CHorlogeDlg::OnPause() void CHorlogeDlg::OnStart() { + bus->SendMsg("SetClock Time=%d:%d:%d", time.wHour, time.wMinute, time.wSecond ); bus->SendMsg("ClockStart"); } -- cgit v1.1 From 26076079b8fecd9cbf432c01f980c78ce3808fdf Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:52:25 +0000 Subject: Utilisateur : Fcolin Date : 19/12/05 Heure : 14:56 Archivé dans $/Bus/Horloge Commentaire: (vss 4) --- Horloge/HorlogeDlg.cpp | 122 ++++++++++++++++++++++++++++--------------------- 1 file changed, 69 insertions(+), 53 deletions(-) (limited to 'Horloge') diff --git a/Horloge/HorlogeDlg.cpp b/Horloge/HorlogeDlg.cpp index 6e26f61..0521d90 100644 --- a/Horloge/HorlogeDlg.cpp +++ b/Horloge/HorlogeDlg.cpp @@ -27,7 +27,8 @@ CHorlogeDlg::CHorlogeDlg(CWnd* pParent /*=NULL*/) //}}AFX_DATA_INIT // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); - memset( &time, 0, sizeof( time ) ); + GetSystemTime(¤t_time); + GetSystemTime(&start_time); bus = NULL; rate = 1.0; } @@ -44,6 +45,7 @@ void CHorlogeDlg::DoDataExchange(CDataExchange* pDX) DDX_Check(pDX, IDC_BIGSPEED, m_big_speed); DDX_Text(pDX, IDC_FILENAME, m_filename); //}}AFX_DATA_MAP + DDX_Control(pDX, IDC_FILEPROGRESS, file_progress); } BEGIN_MESSAGE_MAP(CHorlogeDlg, CDialog) @@ -87,9 +89,9 @@ BOOL CHorlogeDlg::OnInitDialog() ((CButton*)GetDlgItem(IDC_NORMAL_SPEED))->SetIcon(AfxGetApp()->LoadIcon(IDI_NORMAL_SPEED)); - m_Time.Format("%02d:%02d:%02d", 0,0,0); - m_Speed.Format("%.2f", rate ); - m_setTime.GetTime(&time); + m_Time.Format(TEXT("%02d:%02d:%02d"), 0,0,0); + m_Speed.Format(TEXT("%.2f"), rate ); + m_setTime.GetTime(¤t_time); bus = new Ivy( "Horloge","Horloge READY",this,TRUE); @@ -108,7 +110,7 @@ BOOL CHorlogeDlg::OnInitDialog() bus->BindMsg("^FileReadEvent Type=REJEU Name=([^ ]+) StartTime=([0-9]+):([0-9]+):([0-9]+) EndTime=([0-9]+):([0-9]+):([0-9]+)", BUS_CALLBACK_OF(CHorlogeDlg, IvyFileReadEvent )); bus->BindMsg("^rejeu READY", BUS_CALLBACK_OF(CHorlogeDlg, IvyRejeuReady)); - m_busnumber = bus->GetDomain( m_busnumber ); + m_busnumber = bus->GetDomain( CStringA( m_busnumber ) ); UpdateData(FALSE); // force bus start in case of start @@ -158,18 +160,18 @@ void CHorlogeDlg::OnIvystart() { UpdateData(TRUE); bus->stop(); - m_busnumber = bus->GetDomain( m_busnumber ); - bus->start(m_busnumber); + m_busnumber = bus->GetDomain( CStringA( m_busnumber ) ); + bus->start( CStringA(m_busnumber)); m_applist.ResetContent(); UpdateData(FALSE); } void CHorlogeDlg::OnApplicationConnected(IvyApplication *app) { - m_applist.AddString( app->GetName() ); + m_applist.AddString( CString(app->GetName()) ); } void CHorlogeDlg::OnApplicationDisconnected(IvyApplication *app) { - m_applist.DeleteString(m_applist.FindString(0, app->GetName()) ); + m_applist.DeleteString(m_applist.FindString(0, CString(app->GetName())) ); } void CHorlogeDlg::OnDblclkApplist() @@ -177,7 +179,7 @@ void CHorlogeDlg::OnDblclkApplist() CString name; int sel = m_applist.GetCurSel(); m_applist.GetText( sel, name ); - IvyApplication *app = bus->GetApplication( name ); + IvyApplication *app = bus->GetApplication( CStringA(name) ); if ( app ) { bus->SendDieMsg(app); @@ -189,15 +191,20 @@ void CHorlogeDlg::OnDblclkApplist() void CHorlogeDlg::IvyClockEvent( IvyApplication *app, int argc, const char **argv ) { // Ivy ClockEvent Time=10:23:45 Rate=3 Bs=0 - time.wHour = atoi( *argv++ ); - time.wMinute = atoi( *argv++ ); - time.wSecond = atoi( *argv++ ); + current_time.wHour = atoi( *argv++ ); + current_time.wMinute = atoi( *argv++ ); + current_time.wSecond = atoi( *argv++ ); rate = atof( *argv++ ); int BigSpeed = atoi( *argv++ ); - m_Time.Format("%02d:%02d:%02d", time.wHour, time.wMinute, time.wSecond); - m_Speed.Format("%.2f", rate ); + m_Time.Format(TEXT("%02d:%02d:%02d"), current_time.wHour, current_time.wMinute, current_time.wSecond); + m_Speed.Format(TEXT("%.2f"), rate ); m_big_speed = BigSpeed; - m_setTime.SetTime(&time); + m_setTime.SetTime(¤t_time); + CTime cur_time( current_time ); + CTime sta_time( start_time ); + CTimeSpan span = cur_time - sta_time; + file_progress.SetPos( span.GetTotalSeconds() ); + TRACE("CHorlogeDlg::IvyClockEvent %d\n", span.GetTotalSeconds() ); UpdateData(FALSE); } void CHorlogeDlg::IvyFileReadEvent( IvyApplication *app, int argc, const char **argv ) @@ -211,13 +218,23 @@ void CHorlogeDlg::IvyFileReadEvent( IvyApplication *app, int argc, const char ** int mm_end = atoi( *argv++ ); int ss_end = atoi( *argv++ ); - time.wHour = hh_start; - time.wMinute = mm_start; - time.wSecond = ss_start; + start_time.wHour = hh_start; + start_time.wMinute = mm_start; + start_time.wSecond = ss_start; + current_time = start_time; - m_Time.Format("%02d:%02d:%02d", time.wHour, time.wMinute, time.wSecond); - VERIFY(m_setTime.SetTime(&time)); + long start = (( hh_start * 60 ) + mm_start ) * 60 + ss_start; + long end = (( hh_end * 60 ) + mm_end ) * 60 + ss_end; + + TRACE("CHorlogeDlg::IvyFileReadEvent range 0 %d\n", end - start ); + file_progress.SetRange32(0, end - start ); + file_progress.SetStep( 1 ); + file_progress.SetPos( 0 ); + + m_Time.Format(TEXT("%02d:%02d:%02d"), current_time.wHour, current_time.wMinute, current_time.wSecond); + VERIFY(m_setTime.SetTime(¤t_time)); m_filename = name; + bus->SendMsg("SetClock Time=%d:%d:%d", current_time.wHour, current_time.wMinute, current_time.wSecond ); UpdateData(FALSE); } void CHorlogeDlg::IvyRejeuReady( IvyApplication *app, int argc, const char **argv ) @@ -232,97 +249,96 @@ void CHorlogeDlg::OnPause() void CHorlogeDlg::OnStart() { - bus->SendMsg("SetClock Time=%d:%d:%d", time.wHour, time.wMinute, time.wSecond ); bus->SendMsg("ClockStart"); } void CHorlogeDlg::OnBackward() { rate -= 0.5; - m_Speed.Format("%.2f", rate ); + m_Speed.Format(TEXT("%.2f"), rate ); bus->SendMsg("SetClock Rate=%.2f",rate); } void CHorlogeDlg::OnForward() { rate += 0.5; - m_Speed.Format("%.2f", rate ); + m_Speed.Format(TEXT("%.2f"), rate ); bus->SendMsg("SetClock Rate=%.2f",rate); } void CHorlogeDlg::OnNormalSpeed() { rate = 1.0; - m_Speed.Format("%.2f", rate ); + m_Speed.Format(TEXT("%.2f"), rate ); bus->SendMsg("SetClock Rate=%.2f",rate); } void CHorlogeDlg::OnDatetimechangeSettime(NMHDR* pNMHDR, LRESULT* pResult) { - m_setTime.GetTime(&time); - bus->SendMsg( "SetClock Time=%d:%d:%d", time.wHour, time.wMinute, time.wSecond ); - m_Time.Format("%02d:%02d:%02d", time.wHour, time.wMinute, time.wSecond); + m_setTime.GetTime(¤t_time); + bus->SendMsg( "SetClock Time=%d:%d:%d", current_time.wHour, current_time.wMinute, current_time.wSecond ); + m_Time.Format(TEXT("%02d:%02d:%02d"), current_time.wHour, current_time.wMinute, current_time.wSecond); *pResult = 0; } void CHorlogeDlg::OnBack5() { - CTime new_time( time ); + CTime new_time( current_time ); new_time -= CTimeSpan( 0, 0, 5, 0 ); - new_time. GetAsSystemTime(time); - bus->SendMsg( "SetClock Time=%d:%d:%d", time.wHour, time.wMinute, time.wSecond ); - m_Time.Format("%02d:%02d:%02d", time.wHour, time.wMinute, time.wSecond); + new_time. GetAsSystemTime(current_time); + bus->SendMsg( "SetClock Time=%d:%d:%d", current_time.wHour, current_time.wMinute, current_time.wSecond ); + m_Time.Format(TEXT("%02d:%02d:%02d"), current_time.wHour, current_time.wMinute, current_time.wSecond); } void CHorlogeDlg::OnBack2() { - CTime new_time( time ); + CTime new_time( current_time ); new_time -= CTimeSpan( 0, 0, 2, 0 ); - new_time. GetAsSystemTime(time); - bus->SendMsg( "SetClock Time=%d:%d:%d", time.wHour, time.wMinute, time.wSecond ); - m_Time.Format("%02d:%02d:%02d", time.wHour, time.wMinute, time.wSecond); + new_time. GetAsSystemTime(current_time); + bus->SendMsg( "SetClock Time=%d:%d:%d", current_time.wHour, current_time.wMinute, current_time.wSecond ); + m_Time.Format(TEXT("%02d:%02d:%02d"), current_time.wHour, current_time.wMinute, current_time.wSecond); } void CHorlogeDlg::OnBack1() { - CTime new_time( time ); + CTime new_time( current_time ); new_time -= CTimeSpan( 0, 0, 1, 0 ); - new_time. GetAsSystemTime(time); - bus->SendMsg( "SetClock Time=%d:%d:%d", time.wHour, time.wMinute, time.wSecond ); - m_Time.Format("%02d:%02d:%02d", time.wHour, time.wMinute, time.wSecond); + new_time. GetAsSystemTime(current_time); + bus->SendMsg( "SetClock Time=%d:%d:%d", current_time.wHour, current_time.wMinute, current_time.wSecond ); + m_Time.Format(TEXT("%02d:%02d:%02d"), current_time.wHour, current_time.wMinute, current_time.wSecond); } void CHorlogeDlg::OnForw1() { - CTime new_time( time ); + CTime new_time( current_time ); new_time += CTimeSpan( 0, 0, 1, 0 ); - new_time. GetAsSystemTime(time); - bus->SendMsg( "SetClock Time=%d:%d:%d", time.wHour, time.wMinute, time.wSecond ); - m_Time.Format("%02d:%02d:%02d", time.wHour, time.wMinute, time.wSecond); + new_time. GetAsSystemTime(current_time); + bus->SendMsg( "SetClock Time=%d:%d:%d", current_time.wHour, current_time.wMinute, current_time.wSecond ); + m_Time.Format(TEXT("%02d:%02d:%02d"), current_time.wHour, current_time.wMinute, current_time.wSecond); } void CHorlogeDlg::OnForw2() { - CTime new_time( time ); + CTime new_time( current_time ); new_time += CTimeSpan( 0, 0, 2, 0 ); - new_time. GetAsSystemTime(time); - bus->SendMsg( "SetClock Time=%d:%d:%d", time.wHour, time.wMinute, time.wSecond ); - m_Time.Format("%02d:%02d:%02d", time.wHour, time.wMinute, time.wSecond); + new_time. GetAsSystemTime(current_time); + bus->SendMsg( "SetClock Time=%d:%d:%d", current_time.wHour, current_time.wMinute, current_time.wSecond ); + m_Time.Format(TEXT("%02d:%02d:%02d"), current_time.wHour, current_time.wMinute, current_time.wSecond); } void CHorlogeDlg::OnForw5() { - CTime new_time( time ); + CTime new_time( current_time ); new_time += CTimeSpan( 0, 0, 5, 0 ); - new_time. GetAsSystemTime(time); - bus->SendMsg( "SetClock Time=%d:%d:%d", time.wHour, time.wMinute, time.wSecond ); - m_Time.Format("%02d:%02d:%02d", time.wHour, time.wMinute, time.wSecond); + new_time. GetAsSystemTime(current_time); + bus->SendMsg( "SetClock Time=%d:%d:%d", current_time.wHour, current_time.wMinute, current_time.wSecond ); + m_Time.Format(TEXT("%02d:%02d:%02d"), current_time.wHour, current_time.wMinute, current_time.wSecond); } void CHorlogeDlg::OnFile() { - CFileDialog file(TRUE,TEXT(".rej"),NULL, OFN_FILEMUSTEXIST,"Rejeu Files (*.rej)|*.rej|All Files (*.*)|*.*||"); + CFileDialog file(TRUE,TEXT(".rej"),NULL, OFN_FILEMUSTEXIST,TEXT("Rejeu Files (*.rej)|*.rej|All Files (*.*)|*.*||")); if ( file.DoModal() == IDOK ) { bus->SendMsg( "FileRead Type=rejeu Name=%s", file.GetPathName() ); -- cgit v1.1 From 29130760bbf5696ea3ee2ecc4b5a4fa98fc2bfb5 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:52:27 +0000 Subject: Utilisateur : Fcolin Date : 31/08/06 Heure : 13:59 Archivé dans $/Bus/Horloge Commentaire: (vss 5) --- Horloge/HorlogeDlg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Horloge') diff --git a/Horloge/HorlogeDlg.cpp b/Horloge/HorlogeDlg.cpp index 0521d90..b6ac3d9 100644 --- a/Horloge/HorlogeDlg.cpp +++ b/Horloge/HorlogeDlg.cpp @@ -341,7 +341,7 @@ void CHorlogeDlg::OnFile() CFileDialog file(TRUE,TEXT(".rej"),NULL, OFN_FILEMUSTEXIST,TEXT("Rejeu Files (*.rej)|*.rej|All Files (*.*)|*.*||")); if ( file.DoModal() == IDOK ) { - bus->SendMsg( "FileRead Type=rejeu Name=%s", file.GetPathName() ); + bus->SendMsg( "FileRead Type=rejeu Name=%S", file.GetPathName() ); } } -- cgit v1.1 From 7ad955791ae43a15eab3b89fa2c899d9ee98c148 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:52:29 +0000 Subject: Utilisateur : Fcolin Date : 25/10/01 Heure : 11:44 Créé (vss 1) --- Horloge/HorlogeDlg.h | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 Horloge/HorlogeDlg.h (limited to 'Horloge') diff --git a/Horloge/HorlogeDlg.h b/Horloge/HorlogeDlg.h new file mode 100644 index 0000000..366f6a2 --- /dev/null +++ b/Horloge/HorlogeDlg.h @@ -0,0 +1,73 @@ +// HorlogeDlg.h : header file +// + +#if !defined(AFX_HORLOGEDLG_H__8AB6D6CD_4D9E_450D_B42C_E5A6F72FCA32__INCLUDED_) +#define AFX_HORLOGEDLG_H__8AB6D6CD_4D9E_450D_B42C_E5A6F72FCA32__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "Ivy.h" +///////////////////////////////////////////////////////////////////////////// +// CHorlogeDlg dialog + +class CHorlogeDlg : public CDialog, public IvyApplicationCallback +{ +// Construction +public: + CHorlogeDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CHorlogeDlg) + enum { IDD = IDD_HORLOGE_DIALOG }; + CDateTimeCtrl m_setTime; + CListBox m_applist; + CDigistring m_Speed; + CDigistring m_Time; + CString m_busnumber; + BOOL m_big_speed; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CHorlogeDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + Ivy *bus; + float rate; + SYSTEMTIME time; + void IvyClockEvent( IvyApplication *app, int argc, const char **argv ); + void IvyRejeuReady( IvyApplication *app, int argc, const char **argv ); + void OnApplicationConnected( IvyApplication *app ); + void OnApplicationDisconnected( IvyApplication *app ); + + // Generated message map functions + //{{AFX_MSG(CHorlogeDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnIvystart(); + afx_msg void OnPause(); + afx_msg void OnStart(); + afx_msg void OnDatetimechangeSettime(NMHDR* pNMHDR, LRESULT* pResult); + afx_msg void OnBackward(); + afx_msg void OnForward(); + afx_msg void OnBack5(); + afx_msg void OnBack2(); + afx_msg void OnBack1(); + afx_msg void OnForw1(); + afx_msg void OnForw2(); + afx_msg void OnForw5(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_HORLOGEDLG_H__8AB6D6CD_4D9E_450D_B42C_E5A6F72FCA32__INCLUDED_) -- cgit v1.1 From ee8e715afecefe1780f63004e3dac0e0810ea648 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:52:30 +0000 Subject: Utilisateur : Fcolin Date : 27/11/01 Heure : 15:26 Archivé dans $/Bus/Horloge (vss 2) --- Horloge/HorlogeDlg.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Horloge') diff --git a/Horloge/HorlogeDlg.h b/Horloge/HorlogeDlg.h index 366f6a2..5550961 100644 --- a/Horloge/HorlogeDlg.h +++ b/Horloge/HorlogeDlg.h @@ -27,6 +27,7 @@ public: CDigistring m_Time; CString m_busnumber; BOOL m_big_speed; + CString m_filename; //}}AFX_DATA // ClassWizard generated virtual function overrides @@ -43,6 +44,7 @@ protected: SYSTEMTIME time; void IvyClockEvent( IvyApplication *app, int argc, const char **argv ); void IvyRejeuReady( IvyApplication *app, int argc, const char **argv ); + void IvyFileReadEvent( IvyApplication *app, int argc, const char **argv ); void OnApplicationConnected( IvyApplication *app ); void OnApplicationDisconnected( IvyApplication *app ); @@ -63,6 +65,9 @@ protected: afx_msg void OnForw1(); afx_msg void OnForw2(); afx_msg void OnForw5(); + afx_msg void OnFile(); + afx_msg void OnNormalSpeed(); + afx_msg void OnDblclkApplist(); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; -- cgit v1.1 From 0c001528d09e59fe04ffd0f948503c4a03a51c51 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:52:32 +0000 Subject: Utilisateur : Fcolin Date : 19/12/05 Heure : 14:56 Archivé dans $/Bus/Horloge Commentaire: (vss 3) --- Horloge/HorlogeDlg.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Horloge') diff --git a/Horloge/HorlogeDlg.h b/Horloge/HorlogeDlg.h index 5550961..93cb915 100644 --- a/Horloge/HorlogeDlg.h +++ b/Horloge/HorlogeDlg.h @@ -9,6 +9,7 @@ #endif // _MSC_VER > 1000 #include "Ivy.h" +#include "afxcmn.h" ///////////////////////////////////////////////////////////////////////////// // CHorlogeDlg dialog @@ -40,8 +41,9 @@ public: protected: HICON m_hIcon; Ivy *bus; - float rate; - SYSTEMTIME time; + double rate; + SYSTEMTIME start_time; + SYSTEMTIME current_time; void IvyClockEvent( IvyApplication *app, int argc, const char **argv ); void IvyRejeuReady( IvyApplication *app, int argc, const char **argv ); void IvyFileReadEvent( IvyApplication *app, int argc, const char **argv ); @@ -70,6 +72,8 @@ protected: afx_msg void OnDblclkApplist(); //}}AFX_MSG DECLARE_MESSAGE_MAP() +public: + CProgressCtrl file_progress; }; //{{AFX_INSERT_LOCATION}} -- cgit v1.1 From ee7603b7ba3e487608b91bdeb6f8674899e6ed3f Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:52:34 +0000 Subject: Utilisateur : Fcolin Date : 25/10/01 Heure : 11:44 Créé (vss 1) --- Horloge/HorlogeParseCmdLine.cpp | 58 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 Horloge/HorlogeParseCmdLine.cpp (limited to 'Horloge') diff --git a/Horloge/HorlogeParseCmdLine.cpp b/Horloge/HorlogeParseCmdLine.cpp new file mode 100644 index 0000000..bd3e4e9 --- /dev/null +++ b/Horloge/HorlogeParseCmdLine.cpp @@ -0,0 +1,58 @@ +// HorlogeParseCmdLine.cpp: implementation of the HorlogeParseCmdLine class. +// +////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" + +#include "HorlogeParseCmdLine.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char THIS_FILE[]=__FILE__; +#define new DEBUG_NEW +#endif + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +HorlogeParseCmdLine::HorlogeParseCmdLine() +{ + m_start = FALSE; + m_busNumber = ""; +} + +HorlogeParseCmdLine::~HorlogeParseCmdLine() +{ + +} + +void HorlogeParseCmdLine::ParseParam(LPCTSTR lpszParam, BOOL bFlag, BOOL bLast) +{ + if (bFlag) + { + ParseParamFlag(lpszParam); + } + else + ParseParamNotFlag(lpszParam); + +} + +void HorlogeParseCmdLine::ParseParamFlag(LPCTSTR pszParam) +{ + + if (lstrcmpi(pszParam, TEXT("start")) == 0) + m_start = TRUE; + else if (lstrcmpi(pszParam, TEXT("bus")) == 0) + m_shellCommand = BusNumber; +} + +void HorlogeParseCmdLine::ParseParamNotFlag(LPCTSTR pszParam) +{ + switch ( m_shellCommand ) + { + case BusNumber: + m_busNumber = pszParam; + break; + } +} -- cgit v1.1 From ece5d35d0b9b56c308ad4faa5878c75a93725b6e Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:52:37 +0000 Subject: Utilisateur : Fcolin Date : 25/10/01 Heure : 11:44 Créé (vss 1) --- Horloge/HorlogeParseCmdLine.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Horloge/HorlogeParseCmdLine.h (limited to 'Horloge') diff --git a/Horloge/HorlogeParseCmdLine.h b/Horloge/HorlogeParseCmdLine.h new file mode 100644 index 0000000..3ececad --- /dev/null +++ b/Horloge/HorlogeParseCmdLine.h @@ -0,0 +1,31 @@ +// TestParseCmdLine.h: interface for the TestParseCmdLine class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_FXParseCMDLINE_H__20232B92_AB99_11D2_898F_00A0245B298A__INCLUDED_) +#define AFX_FXParseCMDLINE_H__20232B92_AB99_11D2_898F_00A0245B298A__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +class HorlogeParseCmdLine : public CCommandLineInfo +{ +public: + + BOOL m_start; + CString m_busNumber; + virtual void ParseParam( LPCTSTR lpszParam, BOOL bFlag, BOOL bLast ); + HorlogeParseCmdLine(); + virtual ~HorlogeParseCmdLine(); + enum { + BusNumber, + Start, + }m_shellCommand; + +protected: + void ParseParamNotFlag(LPCTSTR pszParam); + void ParseParamFlag(LPCTSTR pszParam); +}; + +#endif // !defined(AFX_FXParseCMDLINE_H__20232B92_AB99_11D2_898F_00A0245B298A__INCLUDED_) -- cgit v1.1 From e5755647cb9dd3135e6b5556482f76f7f21b6cff Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:52:38 +0000 Subject: Utilisateur : Fcolin Date : 25/10/01 Heure : 11:44 Créé (vss 1) --- Horloge/MemDC.h | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 Horloge/MemDC.h (limited to 'Horloge') diff --git a/Horloge/MemDC.h b/Horloge/MemDC.h new file mode 100644 index 0000000..494fbbe --- /dev/null +++ b/Horloge/MemDC.h @@ -0,0 +1,104 @@ +#ifndef _MEMDC_H_ +#define _MEMDC_H_ + +////////////////////////////////////////////////// +// CMemDC - memory DC +// +// Author: Keith Rule +// Email: keithr@europa.com +// Copyright 1996-1999, Keith Rule +// +// You may freely use or modify this code provided this +// Copyright is included in all derived versions. +// +// History - 10/3/97 Fixed scrolling bug. +// Added print support. - KR +// +// 11/3/99 Fixed most common complaint. Added +// background color fill. - KR +// +// 11/3/99 Added support for mapping modes other than +// MM_TEXT as suggested by Lee Sang Hun. - KR +// +// This class implements a memory Device Context which allows +// flicker free drawing. + +class CMemDC : public CDC { +private: + CBitmap m_bitmap; // Offscreen bitmap + CBitmap* m_oldBitmap; // bitmap originally found in CMemDC + CDC* m_pDC; // Saves CDC passed in constructor + CRect m_rect; // Rectangle of drawing area. + BOOL m_bMemDC; // TRUE if CDC really is a Memory DC. +public: + + CMemDC(CDC* pDC, const CRect* pRect = NULL) : CDC() + { + ASSERT(pDC != NULL); + + // Some initialization + m_pDC = pDC; + m_oldBitmap = NULL; + m_bMemDC = !pDC->IsPrinting(); + + // Get the rectangle to draw + if (pRect == NULL) { + pDC->GetClipBox(&m_rect); + } else { + m_rect = *pRect; + } + + if (m_bMemDC) { + // Create a Memory DC + CreateCompatibleDC(pDC); + pDC->LPtoDP(&m_rect); + + m_bitmap.CreateCompatibleBitmap(pDC, m_rect.Width(), m_rect.Height()); + m_oldBitmap = SelectObject(&m_bitmap); + + SetMapMode(pDC->GetMapMode()); + pDC->DPtoLP(&m_rect); + SetWindowOrg(m_rect.left, m_rect.top); + } else { + // Make a copy of the relevent parts of the current DC for printing + m_bPrinting = pDC->m_bPrinting; + m_hDC = pDC->m_hDC; + m_hAttribDC = pDC->m_hAttribDC; + } + + // Fill background + FillSolidRect(m_rect, pDC->GetBkColor()); + } + + + ~CMemDC() + { + if (m_bMemDC) { + // Copy the offscreen bitmap onto the screen. + m_pDC->BitBlt(m_rect.left, m_rect.top, m_rect.Width(), m_rect.Height(), + this, m_rect.left, m_rect.top, SRCCOPY); + + //Swap back the original bitmap. + SelectObject(m_oldBitmap); + } else { + // All we need to do is replace the DC with an illegal value, + // this keeps us from accidently deleting the handles associated with + // the CDC that was passed to the constructor. + m_hDC = m_hAttribDC = NULL; + } + } + + // Allow usage as a pointer + CMemDC* operator->() + { + return this; + } + + // Allow usage as a pointer + operator CMemDC*() + { + return this; + } +}; + +#endif \ No newline at end of file -- cgit v1.1 From 72014dcd9e32004bb697255e5744b3c3aa894a62 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:52:41 +0000 Subject: Utilisateur : Fcolin Date : 25/10/01 Heure : 11:44 Créé (vss 1) --- Horloge/ReadMe.txt | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 Horloge/ReadMe.txt (limited to 'Horloge') diff --git a/Horloge/ReadMe.txt b/Horloge/ReadMe.txt new file mode 100644 index 0000000..4065fc4 --- /dev/null +++ b/Horloge/ReadMe.txt @@ -0,0 +1,88 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : Horloge +======================================================================== + + +AppWizard has created this Horloge application for you. This application +not only demonstrates the basics of using the Microsoft Foundation classes +but is also a starting point for writing your application. + +This file contains a summary of what you will find in each of the files that +make up your Horloge application. + +Horloge.dsp + This file (the project file) contains information at the project level and + is used to build a single project or subproject. Other users can share the + project (.dsp) file, but they should export the makefiles locally. + +Horloge.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CHorlogeApp application class. + +Horloge.cpp + This is the main application source file that contains the application + class CHorlogeApp. + +Horloge.rc + This is a listing of all of the Microsoft Windows resources that the + program uses. It includes the icons, bitmaps, and cursors that are stored + in the RES subdirectory. This file can be directly edited in Microsoft + Visual C++. + +Horloge.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +res\Horloge.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file Horloge.rc. + +res\Horloge.rc2 + This file contains resources that are not edited by Microsoft + Visual C++. You should place all resources not editable by + the resource editor in this file. + + + + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one dialog class: + +HorlogeDlg.h, HorlogeDlg.cpp - the dialog + These files contain your CHorlogeDlg class. This class defines + the behavior of your application's main dialog. The dialog's + template is in Horloge.rc, which can be edited in Microsoft + Visual C++. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named Horloge.pch and a precompiled types file named StdAfx.obj. + +Resource.h + This is the standard header file, which defines new resource IDs. + Microsoft Visual C++ reads and updates this file. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard uses "TODO:" to indicate parts of the source code you +should add to or customize. + +If your application uses MFC in a shared DLL, and your application is +in a language other than the operating system's current language, you +will need to copy the corresponding localized resources MFC42XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC42DEU.DLL contains resources translated to German.) If you +don't do this, some of the UI elements of your application will remain in the +language of the operating system. + +///////////////////////////////////////////////////////////////////////////// -- cgit v1.1 From 1abef0cf903b80c38c0b1b686b130e13d76e2351 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:52:42 +0000 Subject: Utilisateur : Fcolin Date : 25/10/01 Heure : 11:44 Créé (vss 1) --- Horloge/Rgbcolor.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Horloge/Rgbcolor.h (limited to 'Horloge') diff --git a/Horloge/Rgbcolor.h b/Horloge/Rgbcolor.h new file mode 100644 index 0000000..1c45453 --- /dev/null +++ b/Horloge/Rgbcolor.h @@ -0,0 +1,40 @@ +///////////////////////////////////////////////////////////////////////////// +// Copyright (C) 2000 by Michel Wassink +// All rights reserved +// +// This is free software. +// You may redistribute it by any means providing it is not sold for profit +// without the author written consent. +// +// No warrantee of any kind, expressed or implied, is included with this +// software; use at your own risk, responsibility for damages (if any) to +// anyone resulting from the use of this software rests entirely with the +// user. +// +// Send bug reports, bug fixes, enhancements, requests, flames, etc., and +// I'll try to keep a version up to date. I can be reached as follows: +// mwassink@csi.com (private site) +///////////////////////////////////////////////////////////////////////////// + +#ifndef __RGBCOLOR_H__ +#define __RGBCOLOR_H__ + +#define BLACK RGB( 000, 000, 000 ) +#define DARKBLUE RGB( 000, 000, 128 ) +#define DARKGREEN RGB( 000, 064, 000 ) +#define DARKCYAN RGB( 000, 064, 064 ) +#define DARKRED RGB( 064, 000, 000 ) +#define DARKMAGENTA RGB( 128, 000, 128 ) +#define BROWN RGB( 128, 128, 000 ) +#define DARKGRAY RGB( 128, 128, 128 ) + +#define LIGHTGRAY RGB( 192, 192, 192 ) +#define LIGHTBLUE RGB( 000, 000, 255 ) +#define LIGHTGREEN RGB( 000, 255, 000 ) +#define LIGHTCYAN RGB( 000, 255, 255 ) +#define LIGHTRED RGB( 255, 000, 000 ) +#define LIGHTMAGENTA RGB( 255, 000, 255 ) +#define YELLOW RGB( 255, 255, 000 ) +#define WHITE RGB( 255, 255, 255 ) + +#endif // __RGBCOLOR_H__ -- cgit v1.1 From 1bf10bc1bdc586e2dead5b974ec3238235587276 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:52:44 +0000 Subject: Utilisateur : Fcolin Date : 25/10/01 Heure : 11:44 Créé (vss 1) --- Horloge/StdAfx.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Horloge/StdAfx.cpp (limited to 'Horloge') diff --git a/Horloge/StdAfx.cpp b/Horloge/StdAfx.cpp new file mode 100644 index 0000000..ec4138a --- /dev/null +++ b/Horloge/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// Horloge.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + -- cgit v1.1 From 589f712ff9ccd0631033fb54de1a4cadb49c2f30 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:52:47 +0000 Subject: Utilisateur : Fcolin Date : 25/10/01 Heure : 11:44 Créé (vss 1) --- Horloge/StdAfx.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Horloge/StdAfx.h (limited to 'Horloge') diff --git a/Horloge/StdAfx.h b/Horloge/StdAfx.h new file mode 100644 index 0000000..bfc4c77 --- /dev/null +++ b/Horloge/StdAfx.h @@ -0,0 +1,27 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__71A27006_2E49_42EE_BE8E_4A7CB7E53C16__INCLUDED_) +#define AFX_STDAFX_H__71A27006_2E49_42EE_BE8E_4A7CB7E53C16__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include // MFC support for Internet Explorer 4 Common Controls +#include +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__71A27006_2E49_42EE_BE8E_4A7CB7E53C16__INCLUDED_) -- cgit v1.1 From d940df9c9065cd81bef9ae57c779c4625bfed33a Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:52:48 +0000 Subject: Utilisateur : Fcolin Date : 19/12/05 Heure : 14:56 Archivé dans $/Bus/Horloge Commentaire: (vss 2) --- Horloge/StdAfx.h | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) (limited to 'Horloge') diff --git a/Horloge/StdAfx.h b/Horloge/StdAfx.h index bfc4c77..18ddc2a 100644 --- a/Horloge/StdAfx.h +++ b/Horloge/StdAfx.h @@ -10,11 +10,49 @@ #pragma once #endif // _MSC_VER > 1000 +#ifndef _SECURE_ATL +#define _SECURE_ATL 1 +#endif + +#ifndef VC_EXTRALEAN #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers +#endif + +// Modify the following defines if you have to target a platform prior to the ones specified below. +// Refer to MSDN for the latest info on corresponding values for different platforms. +#ifndef WINVER // Allow use of features specific to Windows XP or later. +#define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows. +#endif + +#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later. +#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows. +#endif + +#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later. +#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later. +#endif + +#ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later. +#define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE. +#endif + +#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit + +// turns off MFC's hiding of some common and often safely ignored warning messages +#define _AFX_ALL_WARNINGS #include // MFC core and standard components #include // MFC extensions + + + +#ifndef _AFX_NO_OLE_SUPPORT #include // MFC support for Internet Explorer 4 Common Controls +#endif +//#include "commctrl.h" + + + #include #ifndef _AFX_NO_AFXCMN_SUPPORT #include // MFC support for Windows Common Controls @@ -24,4 +62,23 @@ //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. +#ifdef _UNICODE +#if defined _M_IX86 +#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"") +#elif defined _M_IA64 +#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"") +#elif defined _M_X64 +#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"") +#else +#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") +#endif +#endif + #endif // !defined(AFX_STDAFX_H__71A27006_2E49_42EE_BE8E_4A7CB7E53C16__INCLUDED_) + + + + + + + -- cgit v1.1 From dcbc98d0ee645716773967d806920c651d73be2f Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:52:51 +0000 Subject: Utilisateur : Fcolin Date : 25/10/01 Heure : 11:44 Créé (vss 1) --- Horloge/res/Horloge.ico | Bin 0 -> 1078 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 Horloge/res/Horloge.ico (limited to 'Horloge') diff --git a/Horloge/res/Horloge.ico b/Horloge/res/Horloge.ico new file mode 100644 index 0000000..7eef0bc Binary files /dev/null and b/Horloge/res/Horloge.ico differ -- cgit v1.1 From 0da937b9b8546531383e49e88d151433625860eb Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:52:52 +0000 Subject: Utilisateur : Fcolin Date : 27/11/01 Heure : 15:26 Archivé dans $/Bus/Horloge/res (vss 2) --- Horloge/res/Horloge.ico | Bin 1078 -> 766 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'Horloge') diff --git a/Horloge/res/Horloge.ico b/Horloge/res/Horloge.ico index 7eef0bc..da2c09d 100644 Binary files a/Horloge/res/Horloge.ico and b/Horloge/res/Horloge.ico differ -- cgit v1.1 From ac0d4ce4eed10933b7470be968638de2a2c8da86 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:52:54 +0000 Subject: Utilisateur : Fcolin Date : 25/10/01 Heure : 11:44 Créé (vss 1) --- Horloge/res/Horloge.rc2 | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Horloge/res/Horloge.rc2 (limited to 'Horloge') diff --git a/Horloge/res/Horloge.rc2 b/Horloge/res/Horloge.rc2 new file mode 100644 index 0000000..181da8f --- /dev/null +++ b/Horloge/res/Horloge.rc2 @@ -0,0 +1,13 @@ +// +// HORLOGE.RC2 - resources Microsoft Visual C++ does not edit directly +// + +#ifdef APSTUDIO_INVOKED + #error this file is not editable by Microsoft Visual C++ +#endif //APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// Add manually edited resources here... + +///////////////////////////////////////////////////////////////////////////// -- cgit v1.1 From 659082400ef82243c9a6cb4f400802040ab9d0cd Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:52:56 +0000 Subject: Utilisateur : Fcolin Date : 25/10/01 Heure : 11:44 Créé (vss 1) --- Horloge/res/ico00001.ico | Bin 0 -> 766 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 Horloge/res/ico00001.ico (limited to 'Horloge') diff --git a/Horloge/res/ico00001.ico b/Horloge/res/ico00001.ico new file mode 100644 index 0000000..f49a714 Binary files /dev/null and b/Horloge/res/ico00001.ico differ -- cgit v1.1 From 9844482cf6709f4cbf27fb9f8e3ac79cbf1da455 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:52:58 +0000 Subject: Utilisateur : Fcolin Date : 19/12/05 Heure : 14:56 Archivé dans $/Bus/Horloge/res Commentaire: (vss 2) --- Horloge/res/ico00001.ico | Bin 766 -> 4534 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'Horloge') diff --git a/Horloge/res/ico00001.ico b/Horloge/res/ico00001.ico index f49a714..aa862a1 100644 Binary files a/Horloge/res/ico00001.ico and b/Horloge/res/ico00001.ico differ -- cgit v1.1 From 5acb1acd0466b4dfeff59d3d9a15ecd00111577b Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:53:01 +0000 Subject: Utilisateur : Fcolin Date : 25/10/01 Heure : 11:44 Créé (vss 1) --- Horloge/res/ico00002.ico | Bin 0 -> 766 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 Horloge/res/ico00002.ico (limited to 'Horloge') diff --git a/Horloge/res/ico00002.ico b/Horloge/res/ico00002.ico new file mode 100644 index 0000000..47fcdbe Binary files /dev/null and b/Horloge/res/ico00002.ico differ -- cgit v1.1 From 1c1e8021a7d707382874d27bc3f352ddf8effc1d Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:53:03 +0000 Subject: Utilisateur : Fcolin Date : 25/10/01 Heure : 11:44 Créé (vss 1) --- Horloge/res/ico00003.ico | Bin 0 -> 766 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 Horloge/res/ico00003.ico (limited to 'Horloge') diff --git a/Horloge/res/ico00003.ico b/Horloge/res/ico00003.ico new file mode 100644 index 0000000..266ce4a Binary files /dev/null and b/Horloge/res/ico00003.ico differ -- cgit v1.1 From 4985a269f61d303a22c87d27c7293ccc35074d83 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:53:04 +0000 Subject: Utilisateur : Fcolin Date : 19/12/05 Heure : 14:56 Archivé dans $/Bus/Horloge/res Commentaire: (vss 2) --- Horloge/res/ico00003.ico | Bin 766 -> 766 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'Horloge') diff --git a/Horloge/res/ico00003.ico b/Horloge/res/ico00003.ico index 266ce4a..9eff079 100644 Binary files a/Horloge/res/ico00003.ico and b/Horloge/res/ico00003.ico differ -- cgit v1.1 From dc4572626c03dcef556d6694532f7f6567208d56 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:53:07 +0000 Subject: Utilisateur : Fcolin Date : 25/10/01 Heure : 16:46 Créé (vss 1) --- Horloge/res/ico00004.ico | Bin 0 -> 766 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 Horloge/res/ico00004.ico (limited to 'Horloge') diff --git a/Horloge/res/ico00004.ico b/Horloge/res/ico00004.ico new file mode 100644 index 0000000..cfc0a71 Binary files /dev/null and b/Horloge/res/ico00004.ico differ -- cgit v1.1 From 7852fa638c2510c968dbf3b2551ee03fcdf08939 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:53:08 +0000 Subject: Utilisateur : Fcolin Date : 27/11/01 Heure : 15:26 Archivé dans $/Bus/Horloge/res (vss 2) --- Horloge/res/ico00004.ico | Bin 766 -> 766 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'Horloge') diff --git a/Horloge/res/ico00004.ico b/Horloge/res/ico00004.ico index cfc0a71..ca9be36 100644 Binary files a/Horloge/res/ico00004.ico and b/Horloge/res/ico00004.ico differ -- cgit v1.1 From b24dd60b1bb9e60904b2103fef134b23fb771eb5 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:53:10 +0000 Subject: Utilisateur : Fcolin Date : 19/12/05 Heure : 14:56 Archivé dans $/Bus/Horloge/res Commentaire: (vss 3) --- Horloge/res/ico00004.ico | Bin 766 -> 766 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'Horloge') diff --git a/Horloge/res/ico00004.ico b/Horloge/res/ico00004.ico index ca9be36..b1e3652 100644 Binary files a/Horloge/res/ico00004.ico and b/Horloge/res/ico00004.ico differ -- cgit v1.1 From 051d2f1b869d3def96a8128e72dd816dedf6725a Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:53:13 +0000 Subject: Utilisateur : Fcolin Date : 25/10/01 Heure : 11:44 Créé (vss 1) --- Horloge/res/icon1.ico | Bin 0 -> 766 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 Horloge/res/icon1.ico (limited to 'Horloge') diff --git a/Horloge/res/icon1.ico b/Horloge/res/icon1.ico new file mode 100644 index 0000000..614b0a0 Binary files /dev/null and b/Horloge/res/icon1.ico differ -- cgit v1.1 From 0af51f6e6f18ab49c0e6deca70d6408bb7f89b13 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:53:15 +0000 Subject: Utilisateur : Fcolin Date : 25/10/01 Heure : 11:44 Créé (vss 1) --- Horloge/resource.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Horloge/resource.h (limited to 'Horloge') diff --git a/Horloge/resource.h b/Horloge/resource.h new file mode 100644 index 0000000..18cb515 --- /dev/null +++ b/Horloge/resource.h @@ -0,0 +1,38 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by Horloge.rc +// +#define IDD_HORLOGE_DIALOG 102 +#define IDR_MAINFRAME 128 +#define IDI_FORWARD 141 +#define IDI_BACKWARD 142 +#define IDI_PAUSE 143 +#define IDI_START 144 +#define IDC_PAUSE 1001 +#define IDC_START 1002 +#define IDC_BACKWARD 1003 +#define IDC_FORWARD 1004 +#define IDC_SPEED 1010 +#define IDC_TIME 1011 +#define IDC_BUSNUMBER 1026 +#define IDC_IVYSTART 1027 +#define IDC_BIGSPEED 1028 +#define IDC_APPLIST 1030 +#define IDC_SETTIME 1031 +#define IDC_BACK_5 1034 +#define IDC_BACK_2 1035 +#define IDC_FORW_2 1036 +#define IDC_FORW_5 1037 +#define IDC_BACK_1 1038 +#define IDC_FORW_1 1039 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 145 +#define _APS_NEXT_COMMAND_VALUE 32772 +#define _APS_NEXT_CONTROL_VALUE 1035 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif -- cgit v1.1 From 41ae7cb7122d44abb2f2ac1e0395aab83032383f Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:53:17 +0000 Subject: Utilisateur : Fcolin Date : 27/11/01 Heure : 15:26 Archivé dans $/Bus/Horloge (vss 2) --- Horloge/resource.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Horloge') diff --git a/Horloge/resource.h b/Horloge/resource.h index 18cb515..2322c01 100644 --- a/Horloge/resource.h +++ b/Horloge/resource.h @@ -8,10 +8,12 @@ #define IDI_BACKWARD 142 #define IDI_PAUSE 143 #define IDI_START 144 +#define IDI_NORMAL_SPEED 146 #define IDC_PAUSE 1001 #define IDC_START 1002 #define IDC_BACKWARD 1003 #define IDC_FORWARD 1004 +#define IDC_NORMAL_SPEED 1005 #define IDC_SPEED 1010 #define IDC_TIME 1011 #define IDC_BUSNUMBER 1026 @@ -25,14 +27,16 @@ #define IDC_FORW_5 1037 #define IDC_BACK_1 1038 #define IDC_FORW_1 1039 +#define IDC_FILE 1040 +#define IDC_FILENAME 1041 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 145 +#define _APS_NEXT_RESOURCE_VALUE 147 #define _APS_NEXT_COMMAND_VALUE 32772 -#define _APS_NEXT_CONTROL_VALUE 1035 +#define _APS_NEXT_CONTROL_VALUE 1042 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif -- cgit v1.1 From 3cbe2cf73248c1584de46556f4f62e5dfe5b481c Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 12:53:18 +0000 Subject: Utilisateur : Fcolin Date : 19/12/05 Heure : 14:56 Archivé dans $/Bus/Horloge Commentaire: (vss 3) --- Horloge/resource.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Horloge') diff --git a/Horloge/resource.h b/Horloge/resource.h index 2322c01..a400f6a 100644 --- a/Horloge/resource.h +++ b/Horloge/resource.h @@ -1,5 +1,5 @@ //{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. +// Microsoft Visual C++ generated include file. // Used by Horloge.rc // #define IDD_HORLOGE_DIALOG 102 @@ -29,14 +29,16 @@ #define IDC_FORW_1 1039 #define IDC_FILE 1040 #define IDC_FILENAME 1041 +#define IDC_PROGRESS1 1043 +#define IDC_FILEPROGRESS 1043 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 147 +#define _APS_NEXT_RESOURCE_VALUE 149 #define _APS_NEXT_COMMAND_VALUE 32772 -#define _APS_NEXT_CONTROL_VALUE 1042 +#define _APS_NEXT_CONTROL_VALUE 1044 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif -- cgit v1.1