IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

C++Builder Discussion :

Tartlcd composant delphi , possible avec bcb6 ?


Sujet :

C++Builder

  1. #1
    Membre émérite
    Profil pro
    Inscrit en
    Juin 2005
    Messages
    573
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2005
    Messages : 573
    Par défaut Tartlcd composant delphi , possible avec bcb6 ?
    Salut

    J ai un afficheur lcd alphanumerique branché sur une carte pci avec un port paralelle .

    Je cherche à ecrire dessus .

    J ai trouvé ce composanr delphi ; TArtLcd

    La demo de ce composant fonctionne .

    Puis je l utiliser avec bcb6 ?

  2. #2
    Expert éminent
    Avatar de ShaiLeTroll
    Homme Profil pro
    Développeur C++\Delphi
    Inscrit en
    Juillet 2006
    Messages
    14 053
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : France, Seine Saint Denis (Île de France)

    Informations professionnelles :
    Activité : Développeur C++\Delphi
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juillet 2006
    Messages : 14 053
    Par défaut
    Si tu as un fichier dpk ou cpk ?? (je connais pas l'extension des packages C++Builder), alors probablement

    si c'est un DPROJ ou CBPROJ ou même BDSProj, c'est conçu pour du 2005 ou plus, le code risque de pas compiler
    Aide via F1 - FAQ - Guide du développeur Delphi devant un problème - Pensez-y !
    Attention Troll Méchant !
    "Quand un homme a faim, mieux vaut lui apprendre à pêcher que de lui donner un poisson" Confucius
    Mieux vaut se taire et paraître idiot, Que l'ouvrir et de le confirmer !
    L'ignorance n'excuse pas la médiocrité !

    L'expérience, c'est le nom que chacun donne à ses erreurs. (Oscar Wilde)
    Il faut avoir le courage de se tromper et d'apprendre de ses erreurs

  3. #3
    Membre émérite
    Profil pro
    Inscrit en
    Juin 2005
    Messages
    573
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2005
    Messages : 573
    Par défaut
    un dpk qui s installe sur delphi 7 , pour bcb , c est bpk

    mais sous bcb6 , rien n est ajouté à la palette

    je fais comme ceci

    composant
    ajouter un composant
    dans un nouveau paquet
    nom d unité je choisis mon .pas
    nom de paquet , je rentre artlcd
    compiler
    installer

    lorsque je verifie
    composant
    installer des paquets
    je vois artlcd mais la liste de composants reste vide

  4. #4
    Membre émérite
    Profil pro
    Inscrit en
    Juin 2005
    Messages
    573
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2005
    Messages : 573
    Par défaut
    Le composant est installé , je devrais faire plus attention sur les noms que je donne à mes paquets .

    A la compilation avec simplement ce composant non visuel j ai deux erreurs :

    void __fastcall SetCustomChar(const Byte char, const char * bitmap);

    [C++ Error] artlcd.hpp(144): E2176 Trop de types dans la déclaration

    Fonction non essentielle donc je zappe pour le moment , elle sert à ecrire pixel par pixel dans un bloc reservé à l affichage d un caractere .

    __published:
    [C++ Error] artlcd.hpp(156): E2321 La déclaration ne spécifie pas un repère ou un identificateur

    Aide Borland : Cette déclaration ne déclare rien. Ceci peut indiquer un struct ou un union sans repère ou sans variable dans la déclaration. C++ exige que quelque chose soit déclaré.

    Par exemple :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    // Borland C++ Builder
    // Copyright (c) 1995, 2002 by Borland Software Corporation
    // All rights reserved
    
    // (DO NOT EDIT: machine generated header) 'artlcd.pas' rev: 6.00
    
    #ifndef artlcdHPP
    #define artlcdHPP
    
    #pragma delphiheader begin
    #pragma option push -w-
    #pragma option push -Vx
    #include <Windows.hpp>	// Pascal unit
    #include <Classes.hpp>	// Pascal unit
    #include <SysUtils.hpp>	// Pascal unit
    #include <SysInit.hpp>	// Pascal unit
    #include <System.hpp>	// Pascal unit
    
    //-- user supplied -----------------------------------------------------------
    
    namespace Artlcd
    {
    //-- type declarations -------------------------------------------------------
    class DELPHICLASS EArtLCDException;
    class PASCALIMPLEMENTATION EArtLCDException : public Sysutils::Exception 
    {
    	typedef Sysutils::Exception inherited;
    	
    public:
    	#pragma option push -w-inl
    	/* Exception.Create */ inline __fastcall EArtLCDException(const AnsiString Msg) : Sysutils::Exception(Msg) { }
    	#pragma option pop
    	#pragma option push -w-inl
    	/* Exception.CreateFmt */ inline __fastcall EArtLCDException(const AnsiString Msg, const System::TVarRec * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
    	#pragma option pop
    	#pragma option push -w-inl
    	/* Exception.CreateRes */ inline __fastcall EArtLCDException(int Ident)/* overload */ : Sysutils::Exception(Ident) { }
    	#pragma option pop
    	#pragma option push -w-inl
    	/* Exception.CreateResFmt */ inline __fastcall EArtLCDException(int Ident, const System::TVarRec * Args, const int Args_Size)/* overload */ : Sysutils::Exception(Ident, Args, Args_Size) { }
    	#pragma option pop
    	#pragma option push -w-inl
    	/* Exception.CreateHelp */ inline __fastcall EArtLCDException(const AnsiString Msg, int AHelpContext) : Sysutils::Exception(Msg, AHelpContext) { }
    	#pragma option pop
    	#pragma option push -w-inl
    	/* Exception.CreateFmtHelp */ inline __fastcall EArtLCDException(const AnsiString Msg, const System::TVarRec * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext) { }
    	#pragma option pop
    	#pragma option push -w-inl
    	/* Exception.CreateResHelp */ inline __fastcall EArtLCDException(int Ident, int AHelpContext)/* overload */ : Sysutils::Exception(Ident, AHelpContext) { }
    	#pragma option pop
    	#pragma option push -w-inl
    	/* Exception.CreateResFmtHelp */ inline __fastcall EArtLCDException(System::PResStringRec ResStringRec, const System::TVarRec * Args, const int Args_Size, int AHelpContext)/* overload */ : Sysutils::Exception(ResStringRec, Args, Args_Size, AHelpContext) { }
    	#pragma option pop
    	
    public:
    	#pragma option push -w-inl
    	/* TObject.Destroy */ inline __fastcall virtual ~EArtLCDException(void) { }
    	#pragma option pop
    	
    };
    
    
    typedef char TCharBitmap[8];
    
    typedef char TCustomChars[8];
    
    typedef void __stdcall (*pDISPLAYDLL_Init)(const Byte x_size, const Byte y_size, const char * startparam, PBOOL ok);
    
    typedef char * __stdcall (*pDISPLAYDLL_DriverName)(void);
    
    typedef char * __stdcall (*pDISPLAYDLL_Usage)(void);
    
    typedef char * __stdcall (*pDISPLAYDLL_DefaultParameters)(void);
    
    typedef void __stdcall (*pDISPLAYDLL_Done)(void);
    
    typedef void __stdcall (*pDISPLAYDLL_SetBacklight)(const bool on);
    
    typedef void __stdcall (*pDISPLAYDLL_SetContrast)(const Byte val);
    
    typedef void __stdcall (*pDISPLAYDLL_SetBrightness)(const Byte val);
    
    typedef void __stdcall (*pDISPLAYDLL_Write)(const char * str);
    
    typedef void __stdcall (*pDISPLAYDLL_SetPosition)(const Byte x, const Byte y);
    
    typedef void __stdcall (*pDISPLAYDLL_CustomChar)(const Byte ascii, const char * bitmap);
    
    typedef Word __stdcall (*pDISPLAYDLL_ReadKey)(void);
    
    typedef void __stdcall (*pDISPLAYDLL_SetGPO)(Byte GPO, bool GPOOn);
    
    typedef void __stdcall (*pDISPLAYDLL_SetFan)(Byte T1, Byte T2);
    
    typedef Byte __stdcall (*pDISPLAYDLL_CustomCharIndex)(Byte Index);
    
    class DELPHICLASS TArtLCD;
    class PASCALIMPLEMENTATION TArtLCD : public Classes::TComponent 
    {
    	typedef Classes::TComponent inherited;
    	
    private:
    	pDISPLAYDLL_Init pInit;
    	pDISPLAYDLL_DriverName pDriverName;
    	pDISPLAYDLL_Usage pUsage;
    	pDISPLAYDLL_DefaultParameters pDefaultParameters;
    	pDISPLAYDLL_Done pDone;
    	pDISPLAYDLL_SetBacklight pSetBacklight;
    	pDISPLAYDLL_SetContrast pSetContrast;
    	pDISPLAYDLL_SetBrightness pSetBrightness;
    	pDISPLAYDLL_Write pWrite;
    	pDISPLAYDLL_SetPosition pSetPosition;
    	pDISPLAYDLL_CustomChar pCustomChar;
    	pDISPLAYDLL_ReadKey pReadKey;
    	pDISPLAYDLL_SetGPO pSetGPO;
    	pDISPLAYDLL_SetFan pSetFan;
    	pDISPLAYDLL_CustomCharIndex pCustomCharIndex;
    	AnsiString fDllName;
    	char fcustomchar[8];
    	AnsiString fDrivername;
    	AnsiString fUsage;
    	AnsiString fDefaultParameters;
    	bool fBackLight;
    	Byte fContrast;
    	Byte fBrightness;
    	int fposx;
    	int fposy;
    	int fsizex;
    	int fsizey;
    	unsigned fdllh;
    	AnsiString fparam;
    	bool finit;
    	
    public:
    	__fastcall virtual TArtLCD(Classes::TComponent* AOwner);
    	void __fastcall SetDLL(AnsiString Dname);
    	void __fastcall Done(void);
    	void __fastcall SetBacklight(bool b);
    	void __fastcall SetContrast(Byte b);
    	void __fastcall SetBrightness(Byte b);
    	void __fastcall Write(AnsiString s);
    	void __fastcall WriteXY(Byte x, Byte y, AnsiString s);
    	void __fastcall SetPosition(int x, int y);
    
    void __fastcall SetCustomChar(const Byte char, const char * bitmap);
    	char __fastcall ReadKey(void);
    	void __fastcall SetGPO(Byte GPO, bool GPOOn);
    	void __fastcall SetFan(Byte T1, Byte T2);
    	void __fastcall SetPosX(int x);
    	void __fastcall SetPosY(int y);
    	bool __fastcall Init(void);
    	__property AnsiString DriverName = {read=fDrivername};
    	__property AnsiString Usage = {read=fUsage};
    	__property AnsiString DefaultParameters = {read=fDefaultParameters};
    	;
    
    
    __published:	
    	__property AnsiString DLLName = {read=fDllName, write=SetDLL};
    	__property int SizeX = {read=fsizex, write=fsizex, nodefault};
    	__property int SizeY = {read=fsizey, write=fsizey, nodefault};
    	__property AnsiString StartParam = {read=fparam, write=fparam};
    	__property int PosX = {read=fposx, write=SetPosX, default=0};
    	__property int PosY = {read=fposy, write=SetPosY, default=0};
    	__property Byte Contrast = {read=fContrast, write=SetContrast, default=128};
    	__property Byte Brightness = {read=fBrightness, write=SetBrightness, default=128};
    	__property bool BackLight = {read=fBackLight, write=SetBacklight, default=1};
    public:
    	#pragma option push -w-inl
    	/* TComponent.Destroy */ inline __fastcall virtual ~TArtLCD(void) { }
    	#pragma option pop
    	
    };
    
    
    //-- var, const, procedure ---------------------------------------------------
    extern PACKAGE void __fastcall Register(void);
    
    }	/* namespace Artlcd */
    using namespace Artlcd;
    #pragma option pop	// -w-
    #pragma option pop	// -Vx
    
    #pragma delphiheader end.
    //-- end unit ----------------------------------------------------------------
    #endif	// artlcd

  5. #5
    Membre émérite
    Profil pro
    Inscrit en
    Juin 2005
    Messages
    573
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2005
    Messages : 573
    Par défaut
    Un point virgule de trop juste au dessus du fameux published

  6. #6
    Membre émérite
    Profil pro
    Inscrit en
    Juin 2005
    Messages
    573
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2005
    Messages : 573
    Par défaut
    Je mets à dispo une source avec les dll et le composant qui vont bien .

    Il reste juste à fixer la fonction SetCustomChar .
    Fichiers attachés Fichiers attachés

Discussions similaires

  1. DBF to SDF : Possible avec delphi?
    Par .:ramtelecom:. dans le forum Bases de données
    Réponses: 1
    Dernier message: 22/06/2009, 10h57
  2. DELPHI 7 avec composants Web en acces avec Oracle et/ou Sql-Server
    Par fgerard dans le forum Bases de données
    Réponses: 2
    Dernier message: 06/07/2007, 11h07
  3. Réponses: 2
    Dernier message: 30/04/2007, 14h56
  4. utilisation composant delphi 7 win32 avec delphi 2005
    Par chtiot dans le forum Composants VCL
    Réponses: 3
    Dernier message: 18/02/2005, 06h49

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo