T'as la même présentation du code que moi. lol
Mes profs d'elec me disent qu'il comprennent rien avec cette écriture et quelle est illisible.
JackosKing
a écrit : mais pourquoi ne pas utiliser de tab pour l'indentation.. c'est le seul moyen de pas se faire chier avec 4/5 espaces voir plus si l'on indente correctement!
#include "stdafx.h" #include "Twiny.h" #include <windows.h> #include <stdio.h> #include <stdlib.h> #define WS_EX_LAYERED 0x00080000 #define LWA_COLORKEY 0x00000001 #define LWA_ALPHA 0x00000002 Twiny::Twiny() { } Twiny::~Twiny() { } Twiny::CreatTwiny( char *pStrIniFile, HINSTANCE hInstance ) { char IniPath[MAX_PATH]; char PlugPath[MAX_PATH]; GetCurrentDirectory( MAX_PATH, IniPath); sprintf( PlugPath, "%s\Datas\%s.ini", IniPath, pStrIniFile); #define EXTRACT_NBR( VAR ) GetPrivateProfileString("TWINY",""#VAR""," ",IniPath,MAX_PATH,PlugPath ); VAR = atoi(IniPath); EXTRACT_NBR( X ) EXTRACT_NBR( Y ) EXTRACT_NBR( Width ) EXTRACT_NBR( Height ) #undef EXTRACT_NBR hWnd = CreateWindowEx( WS_EX_TOPMOST ,"MyWndClassEx"," ", CW_USEDEFAULT | WS_VISIBLE, X, Y, Width, Height, NULL, NULL, hInstance, NULL); }
inline void LoadTwiny( HINSTANCE hInstance, int nShowCmd ) { char IniPath[MAX_PATH]; char PlugPath[MAX_PATH]; GetCurrentDirectory( MAX_PATH, IniPath); sprintf( PlugPath, "%s\Datas\Twiny.ini", IniPath); memset(IniPath,0,MAX_PATH); GetPrivateProfileString("TWINY",NULL," ",IniPath,MAX_PATH,PlugPath ); char *pStr=IniPath; char e[12]; int i=0; while ( (*pStr + *(pStr+1)) != 0) { sprintf(e,"%d",i++); WritePrivateProfileString("DEBUG",e,pStr,PlugPath ); pStr+=strlen(pStr)+1; if (i > 20) break; } a.CreatTwiny("essai",hInstance); b.CreatTwiny("essai2",hInstance); ShowWindow(a.hWnd, nShowCmd ); UpdateWindow(a.hWnd); ShowWindow(b.hWnd, nShowCmd ); UpdateWindow(b.hWnd); }
JackosKing
a écrit : j'indente toujours avec des tab et j'ai pas de probleme:
nEUrOne a écrit :
Dans IE, c comme dans sa source sous VC
jackiechan
a écrit : Je ne comprends pas quel est l'inconvénient des tab ?