www.MignonSoft.com - Développement C++
SFC (v1.2)
voir aussi: documentation:
:: Présentation ::

SDK - "Simple Developpement Kit"
-ou-
"Sebastien Developpement Kit" ;-)
Tout simplement !!

C'est un Wrapeur C++ style MFC. contenant template, et sublassing de controle clasique.

Clicker ici pour le detail des implementations.

MyDebug MyList MySpin
CpuUsage MyListView MyStatic
DebugLog MyMenu MyString
MyBrowseFile MyRect MySubClassing
MyButton MyRegistry MyTabCtrl
MyControl MyRichEdit MyThread
MyException MyScreen MyTime
MyImageList MyScroll

utilsDebug

MyToolTip MyTreeCtrl utilsFile
MyTree MyWindowCtrl  
   
:: Utilisation ::

MyString

MyString info,nom;
info = "infos";
int age = 12;
float taille = 1.7;
info<<clear<<nom<<" age:"<<age<<" taille: "<<taille<<"\n";
-ou-
info.Format("%s age: %d taille: %f",(
char*)nom,age,taille);

MyList

MyList<
int> listInt;
MyList<int> *ptrListInt = new MyList<int>;
listInt+="4";
listInt+="8";
int total=0;
for (listInt=0;listInt.More();listInt++) 

  
int value = listInt.GetElem();
  printf("elem: %d, value: %d\n",value);
  total+=value;
}

for (ptrListInt->GoFirst();ptrListInt->More();ptrListInt->GoNext()) 

  int *ptrValue = ptrListInt->GetElemPtr(); // seul le ptr permet de changer la valeur dans la list elle meme
  (*ptrValue)++;

}


MyTree

// Affiche le Modele suivant dans une Pop-up
// centre
// | gauche
// | | gauche gauche
// | | gauche droite
// | droite
// | | droite gauche
// | | droite droite  

void main()
{
  CMyTree<CMyString> tree;
  CMyTreeNode<CMyString> *niv0,*niv1;
  CMyString str;
  str="centre";niv0 = tree.Add(str);
  str="gauche";niv1 = tree.Add(str,niv0);
  str="gauche gauche";tree.Add(str,niv1);
  str="gauche droite";tree.Add(str,niv1);
  str="droite";niv1 = tree.Add(str,niv0);
  str="droite gauche";tree.Add(str,niv1);
  str="droite droite";tree.Add(str,niv1);

  viewTree(tree.GetRoot()); 
// affichage
  MessageBox(NULL,message,"Arb",0);
}

CMyString message;
void viewTree(CMyTreeNode<CMyString> *node)
{
  
static int level=0;
  
for (int i=0;i<level;i++) message+="| ";
  level++;
  message<<*node->elem<<" ("<<node->childs.GetNbElem()<<" childs)\n";
  
for (node->childs=0;node->childs.More();node->childs.GoNext()) 
  viewTree(node->childs.GetElem());
  level--;
}

MyRegistry

// Example qui ecrit dans la registry dans 
// HKCU\\Software\\MyProg
// | String = "String
// | BOOL = 0
// | float = 1.23
// | int = 235
// | subKey1
// | | none
// | subKey2
// | | multi = "ligne1" , "ligne2"

MyRegistry reg(TRUE); // creation si clef ou sous-clef n'existe pas
reg = "HKCU\\Software\\MyProg"; 
MyString stringVal = "text";
BOOL boolVal = FALSE;
float floatVal = 1.23;
int intVal = 235;

// change le format suivant le type de la variable
reg.SetValue("String",stringVal); // type = REG_SZ
reg.SetValue("BOOL",(int)boolVal); // type = REG_DWORD
reg.SetValue("float",floatVal); // type = REG_SZ
reg.SetValue("int",intVal); // type = REG_DWORD

// creation de sous clef
reg = "\\subKey1";
reg.SetValue("none"); 
// type = REG_NONE

// creation de sous clef avec deplacement
reg ="..\\subKey2";
MyList<MyString> lString;
MyString temp;
temp="ligne1";
lString+=temp;
temp="ligne2";
lString+=temp;
reg.SetValueMulti("multi",&lString); 
// type = SetValueMulti

cf.: pour un example exaustifs voir TestRegistry
:: Statut ::

globalement version beta, sauf les release des élément ci-dessous:

  • MyList
  • MyTree
  • MyString
  • MyRegistry
 
:: Avenir ::
  • beaucoup de travail encore ...
 
:: Historique ::
  • le 03/03/2004: Documentation complete garce au programme OpenSouce "doxygen"
  • le 04/01/2004: v1.1
    • Changement des dénominations à la Mignonsoft, les CMy... deviennent My...
    • MAJ dans MyString etc ...
  • le 19/11/2003: v1.0 disponible

Acceuil | Haut de page | Rapporter une erreur