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

Code::Blocks Discussion :

"Nothing to be done"


Sujet :

Code::Blocks

  1. #1
    Futur Membre du Club
    Profil pro
    Inscrit en
    Juillet 2008
    Messages
    10
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2008
    Messages : 10
    Points : 8
    Points
    8
    Par défaut "Nothing to be done"
    Ceci est mon premier post.......malheuresement n'apportant pas de bonnes nouvelles

    J'ai recompilé mon code c++ après d'infimes modifications (je ne sait plus lesquelles ^^) code blocks me crache :
    Executing: "C:\Documents and Settings\Thomas\Mes documents\Prog C++\TSM_win-api\TSM2.exe" (in C:\Documents and Settings\Thomas\Mes documents\Prog C++\TSM_win-api\.)
    Execution of '"C:\Documents and Settings\Thomas\Mes documents\Prog C++\TSM_win-api\TSM2.exe" ' in 'C:\Documents and Settings\Thomas\Mes documents\Prog C++\TSM_win-api' failed.
    Nothing to be done.

    J'ai fait pleins de tests, enlevé des bouts de codes, rétabli les modifs, rien ne marche !

    svp aidez moi !

    voici mon code :

    main.cpp :
    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
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    545
    546
    547
    548
    549
    550
    551
    552
    553
    554
    555
    556
    557
    558
    559
    560
    561
    562
    563
    564
    565
    566
    567
    568
    569
    570
    571
    572
    573
    574
    575
    576
    577
    578
    579
    580
    581
    582
    583
    584
    585
    586
    587
    588
    589
    590
    591
    592
    593
    594
    595
    596
    597
    598
    599
    600
    601
    602
    603
    604
    605
    606
    607
    608
    609
    610
    611
    612
    613
    614
    615
    616
    617
    618
    619
    620
    621
    622
    623
    624
    625
    626
    627
    628
    629
    630
    631
    632
    633
    634
    635
    636
    637
    638
    639
    640
    641
    642
    643
    644
    645
    646
    647
    648
    649
    650
    651
    652
    653
    654
    655
    656
    657
    658
    659
    660
    661
    662
    663
    664
    #include <iostream>
    #include <string>
    #include <fstream>
    using namespace std;
     
    #include "constante.h"
     
    HINSTANCE instance;
    HWND fenetrePrincipale;
    WNDCLASS classeFenetre;
    int Bool[3]={1,0,0};
    //string Texte[7];
    int Nbre1[3];
    double Nbre2[20];
    double d_Nbre2[20];
    string proprietes[14];
    string tunning[20];
     
    HWND checkBox[3] = {NULL};
    HWND hTabs;
    HWND serverNameTxt;
    HWND msgTxt;
    HWND mdpTxt;
    HWND mdpAdminTxt;
    HWND typePartieTxt;
    HWND mapTxt;
    HWND mapsTxt;
    HWND nbreMaxJouTxt;
    HWND nbreMaxSpecTxt;
    HWND scoreMaxTxt;
    HWND serverName;
    HWND msg;
    HWND mdp;
    HWND mdpAdmin;
    HWND typePartie;
    HWND map;
    HWND maps;
    HWND nbreMaxJou;
    HWND nbreMaxSpec;
    HWND scoreMax;
     
    HWND gb_step;
    HWND gb_hook;
    HWND gb_air;
    HWND gb_weapon;
     
    HWND velocityTxt;
    HWND velocity;
    HWND stepAccTxt;
    HWND stepAcc;
    HWND frictionTxt;
    HWND friction;
    HWND jigTxt;
    HWND jig;
    HWND jiaTxt;
    HWND jia;
    HWND airSpeedTxt;
    HWND airSpeed;
    HWND airFricTxt;
    HWND airFric;
    HWND gravityTxt;
    HWND gravity;
    HWND hookLenghTxt;
    HWND hookLengh;
    HWND hookSpTxt;
    HWND hookSp;
    HWND hookTracTxt;
    HWND hookTrac;
     
    HWND boutAdd;
    HWND boutOpen;
     
     
     
    LRESULT CALLBACK procedureFenetrePrincipale(HWND, UINT, WPARAM, LPARAM);
     
    int WinMain (HINSTANCE cetteInstance, HINSTANCE precedenteInstance,
                 LPSTR lignesDeCommande, int modeDAffichage)
    {
        Bool[0]=1;
        Bool[1]=0;
        Bool[2]=0;
     
        /*Texte[0]="Server";
        Texte[1]="Welcome !";
        Texte[2]="";
        Texte[3]="";
        Texte[4]="dm";
        Texte[5]="dm1";
        Texte[6]="dm1 dm2";*/
     
        Nbre1[0]=8;
        Nbre1[1]=20;
        Nbre1[2]=0;
        //variables tunning
        Nbre2[0]=10;
        Nbre2[1]=100;
        Nbre2[2]=0.8;
        Nbre2[3]=380;
        Nbre2[4]=80;
        Nbre2[5]=18;
        Nbre2[6]=12.6;
        Nbre2[7]=11.5;
        Nbre2[8]=1.5;
        Nbre2[9]=0.95;
        Nbre2[10]=0.5;
        Nbre2[11]=2200;
        Nbre2[12]=2;
        Nbre2[13]=2200;
        Nbre2[14]=0.25;
        Nbre2[15]=1000;
        Nbre2[16]=2;
        Nbre2[17]=800;
        Nbre2[18]=1;
        Nbre2[19]=5;
     
        //-----------défaut varibles-----------
        d_Nbre2[0]=10;
        d_Nbre2[1]=100;
        d_Nbre2[2]=0.8;
        d_Nbre2[3]=380;
        d_Nbre2[4]=80;
        d_Nbre2[5]=18;
        d_Nbre2[6]=12.6;
        d_Nbre2[7]=11.5;
        d_Nbre2[8]=1.5;
        d_Nbre2[9]=0.95;
        d_Nbre2[10]=0.5;
        d_Nbre2[11]=2200;
        d_Nbre2[12]=2;
        d_Nbre2[13]=2200;
        d_Nbre2[14]=0.25;
        d_Nbre2[15]=1000;
        d_Nbre2[16]=2;
        d_Nbre2[17]=800;
        d_Nbre2[18]=1;
        d_Nbre2[19]=5;
        MSG message;
        InitCommonControls();
     
        instance = cetteInstance;
     
        classeFenetre.style = 0;
        classeFenetre.lpfnWndProc = procedureFenetrePrincipale;
        classeFenetre.cbClsExtra = 0;
        classeFenetre.cbWndExtra = 0;
        classeFenetre.hInstance = NULL;
        classeFenetre.hIcon = LoadIcon(instance,"ID_ICON");
        classeFenetre.hCursor = LoadCursor(NULL, IDC_ARROW);
        classeFenetre.hbrBackground = (HBRUSH)(1 + COLOR_BTNFACE);
        classeFenetre.lpszMenuName = NULL;
        classeFenetre.lpszClassName = "classeF";
     
        // On prévoit quand même le cas où ça échoue
        if (!RegisterClass(&classeFenetre)) return FALSE;
     
        fenetrePrincipale = CreateWindow("classeF", "Teeworlds Server Manager", WS_OVERLAPPED | WS_SYSMENU | WS_MINIMIZEBOX,
                                         CW_USEDEFAULT, CW_USEDEFAULT, 405, 480,
                                         NULL, LoadMenu(instance, "ID_MENU"), cetteInstance, NULL);
        if (!fenetrePrincipale) return FALSE;
     
        ShowWindow(fenetrePrincipale, modeDAffichage);
        UpdateWindow(fenetrePrincipale);
     
        while (GetMessage(&message, NULL, 0, 0))
        {
            TranslateMessage(&message);
            DispatchMessage(&message);
        }
        return message.wParam;
    }
     
     
    LRESULT CALLBACK procedureFenetrePrincipale(HWND fenetrePrincipale, UINT message, WPARAM wParam, LPARAM lParam)
    {
     
     
        //static HWND hEdit;
        static HWND htb;
        //static BOOL EditNotChg = TRUE;
     
     
        switch (message)
        {
        case WM_CREATE:
        {
            //creation de boutons etc.........
                return 0;
        }
        break;
        case WM_CTLCOLORSTATIC :
        {
            HDC hdc = (HDC)wParam;
            HWND hWnd = (HWND)lParam;
            if (hWnd == checkBox[0])
            {
                SetBkMode(hdc,TRANSPARENT);
                SetTextColor(hdc,RGB(0,255,0));
                return 0;//(LRESULT)hBrush;
            }
        }
        break;
        case WM_COMMAND:
        {
            if (LOWORD(wParam) == ID_B_OPEN_MAP)
            {
                openMap();
            }
            if (LOWORD(wParam) == ID_B_ADD)
            {
                addMap();
            }
            switch (LOWORD(wParam))
            {
            case ID_B_SAVE:
            {
                enregistrer();
            }
            break;
            case ID_B_QUITTER:
                SendMessage(fenetrePrincipale, WM_DESTROY, 0, 0);
                break;
            case ID_B_OPEN:
            {
     
                OPENFILENAME ofn;
                CHAR szFile[MAX_PATH]={0};
     
                ZeroMemory(&ofn, sizeof(OPENFILENAME));
                ofn.lStructSize = sizeof(OPENFILENAME);
                ofn.hwndOwner = fenetrePrincipale;
                ofn.lpstrFile = szFile;
                ofn.nMaxFile = MAX_PATH;
                ofn.lpstrInitialDir = ".\\servers\\";
                ofn.lpstrFilter =
                    "Server File (.cfg)\0*.cfg\0";
                ofn.nFilterIndex = 1;
                ofn.Flags =
                    OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
     
                GetOpenFileName(&ofn);
            }
            break;
            }
     
            return 0;
        }
        break;
        case WM_NOTIFY:
        {
            LPNMHDR pnmhdr = (LPNMHDR)lParam  ;
            if (pnmhdr->code == TCN_SELCHANGE && TabCtrl_GetCurSel(hTabs) == 0)
            {
     
                ShowWindow(checkBox[0],SW_SHOW);
                ShowWindow(checkBox[1],SW_SHOW);
                ShowWindow(checkBox[2],SW_SHOW);
                ShowWindow(serverNameTxt,SW_SHOW);
                ShowWindow(msgTxt,SW_SHOW);
                ShowWindow(mdpTxt,SW_SHOW);
                ShowWindow(mdpAdminTxt,SW_SHOW);
                ShowWindow(typePartieTxt,SW_SHOW);
                ShowWindow(mapTxt,SW_SHOW);
                ShowWindow(mapsTxt,SW_SHOW);
                ShowWindow(nbreMaxJouTxt,SW_SHOW);
                ShowWindow(nbreMaxSpecTxt,SW_SHOW);
                ShowWindow(scoreMaxTxt,SW_SHOW);
                ShowWindow(serverName,SW_SHOW);
                ShowWindow(msg,SW_SHOW);
                ShowWindow(mdp,SW_SHOW);
                ShowWindow(mdpAdmin,SW_SHOW);
                ShowWindow(typePartie,SW_SHOW);
                ShowWindow(map,SW_SHOW);
                ShowWindow(maps,SW_SHOW);
                ShowWindow(nbreMaxJou,SW_SHOW);
                ShowWindow(nbreMaxSpec,SW_SHOW);
                ShowWindow(scoreMax,SW_SHOW);
     
                ShowWindow(gb_step,SW_HIDE);
                ShowWindow(gb_hook,SW_HIDE);
                ShowWindow(gb_air,SW_HIDE);
                ShowWindow(gb_weapon,SW_HIDE);
                ShowWindow(velocityTxt,SW_HIDE);
                ShowWindow(velocity,SW_HIDE);
                ShowWindow(stepAccTxt,SW_HIDE);
                ShowWindow(stepAcc,SW_HIDE);
                ShowWindow(frictionTxt,SW_HIDE);
                ShowWindow(friction,SW_HIDE);
                ShowWindow(jigTxt,SW_HIDE);
                ShowWindow(jig,SW_HIDE);
                ShowWindow(jiaTxt,SW_HIDE);
                ShowWindow(jia,SW_HIDE);
                ShowWindow(airSpeedTxt,SW_HIDE);
                ShowWindow(airSpeed,SW_HIDE);
                ShowWindow(airFricTxt,SW_HIDE);
                ShowWindow(airFric,SW_HIDE);
                ShowWindow(gravityTxt,SW_HIDE);
                ShowWindow(gravity,SW_HIDE);
                ShowWindow(hookLenghTxt,SW_HIDE);
                ShowWindow(hookLengh,SW_HIDE);
                ShowWindow(hookSpTxt,SW_HIDE);
                ShowWindow(hookSp,SW_HIDE);
                ShowWindow(hookTracTxt,SW_HIDE);
                ShowWindow(hookTrac,SW_HIDE);
     
                ShowWindow(boutAdd,SW_SHOW);
                ShowWindow(boutOpen,SW_SHOW);
            }
            if (pnmhdr->code == TCN_SELCHANGE && TabCtrl_GetCurSel(hTabs) == 1)
            {
     
                ShowWindow(checkBox[0],SW_HIDE);
                ShowWindow(checkBox[1],SW_HIDE);
                ShowWindow(checkBox[2],SW_HIDE);
                ShowWindow(serverNameTxt,SW_HIDE);
                ShowWindow(msgTxt,SW_HIDE);
                ShowWindow(mdpTxt,SW_HIDE);
                ShowWindow(mdpAdminTxt,SW_HIDE);
                ShowWindow(typePartieTxt,SW_HIDE);
                ShowWindow(mapTxt,SW_HIDE);
                ShowWindow(mapsTxt,SW_HIDE);
                ShowWindow(nbreMaxJouTxt,SW_HIDE);
                ShowWindow(nbreMaxSpecTxt,SW_HIDE);
                ShowWindow(scoreMaxTxt,SW_HIDE);
                ShowWindow(serverName,SW_HIDE);
                ShowWindow(msg,SW_HIDE);
                ShowWindow(mdp,SW_HIDE);
                ShowWindow(mdpAdmin,SW_HIDE);
                ShowWindow(typePartie,SW_HIDE);
                ShowWindow(map,SW_HIDE);
                ShowWindow(maps,SW_HIDE);
                ShowWindow(nbreMaxJou,SW_HIDE);
                ShowWindow(nbreMaxSpec,SW_HIDE);
                ShowWindow(scoreMax,SW_HIDE);
     
                ShowWindow(gb_step,SW_SHOW);
                ShowWindow(gb_hook,SW_SHOW);
                ShowWindow(gb_air,SW_SHOW);
                ShowWindow(gb_weapon,SW_SHOW);
                ShowWindow(gb_step,SW_SHOW);
                ShowWindow(gb_hook,SW_SHOW);
                ShowWindow(gb_air,SW_SHOW);
                ShowWindow(gb_weapon,SW_SHOW);
                ShowWindow(velocityTxt,SW_SHOW);
                ShowWindow(velocity,SW_SHOW);
                ShowWindow(stepAccTxt,SW_SHOW);
                ShowWindow(stepAcc,SW_SHOW);
                ShowWindow(frictionTxt,SW_SHOW);
                ShowWindow(friction,SW_SHOW);
                ShowWindow(jigTxt,SW_SHOW);
                ShowWindow(jig,SW_SHOW);
                ShowWindow(jiaTxt,SW_SHOW);
                ShowWindow(jia,SW_SHOW);
                ShowWindow(airSpeedTxt,SW_SHOW);
                ShowWindow(airSpeed,SW_SHOW);
                ShowWindow(airFricTxt,SW_SHOW);
                ShowWindow(airFric,SW_SHOW);
                ShowWindow(gravityTxt,SW_SHOW);
                ShowWindow(gravity,SW_SHOW);
                ShowWindow(hookLenghTxt,SW_SHOW);
                ShowWindow(hookLengh,SW_SHOW);
                ShowWindow(hookSpTxt,SW_SHOW);
                ShowWindow(hookSp,SW_SHOW);
                ShowWindow(hookTracTxt,SW_SHOW);
                ShowWindow(hookTrac,SW_SHOW);
     
                ShowWindow(boutAdd,SW_HIDE);
                ShowWindow(boutOpen,SW_HIDE);
            }
            return 0;
        }
        break;
        case WM_DESTROY:
        {
            PostQuitMessage(0);
            return 0;}
        break;
     
        default:
            return DefWindowProc(fenetrePrincipale, message, wParam, lParam);
        }
    }
     
    void enregistrer()
    {
        //classeFenetre.hCursor = LoadCursor(NULL, IDC_WAIT);
        //recupération des données
        if (SendMessage(checkBox[0],BM_GETCHECK,0,0) == BST_CHECKED)
        {
            Bool[0]=1;
        }
        else
        {
            Bool[0]=0;
        }
        if (SendMessage(checkBox[1],BM_GETCHECK,0,0) == BST_CHECKED)
        {
            Bool[1]=1;
        }
        else
        {
            Bool[1]=0;
        }
        if (SendMessage(checkBox[2],BM_GETCHECK,0,0) == BST_CHECKED)
        {
            Bool[2]=0;
        }
        else
        {
            Bool[2]=1;
        }
        int length = SendMessage(serverName, EM_LINELENGTH, 0, 0 );
     
        //-------recuperation données editbox---------
        TCHAR* texte0 = new TCHAR[length + 1];
        texte0[0] = length;
        texte0[length] = '\0';
        SendMessage(serverName,EM_GETLINE,0,(LPARAM)texte0);
     
        length = SendMessage(msg, EM_LINELENGTH, 0, 0 );
        TCHAR* texte1 = new TCHAR[length + 1];
        texte1[0] = length;
        texte1[length] = '\0';
        SendMessage(msg,EM_GETLINE,0,(LPARAM)texte1);
     
        length = SendMessage(mdp, EM_LINELENGTH, 0, 0 );
        TCHAR* texte2 = new TCHAR[length + 1];
        texte2[0] = length;
        texte2[length] = '\0';
        SendMessage(mdp,EM_GETLINE,0,(LPARAM)texte2);
     
        length = SendMessage(mdpAdmin, EM_LINELENGTH, 0, 0 );
        TCHAR* texte3 = new TCHAR[length + 1];
        texte3[0] = length;
        texte3[length] = '\0';
        SendMessage(mdpAdmin,EM_GETLINE,0,(LPARAM)texte3);
     
        length = SendMessage(map, EM_LINELENGTH, 0, 0 );
        TCHAR* texte5 = new TCHAR[length + 1];
        texte5[0] = length;
        //texte5[length] = '\0';
        SendMessage(map,EM_GETLINE,0,(LPARAM)texte5);
     
        length = SendMessage(maps, EM_LINELENGTH, 0, 0 );
        TCHAR* texte6 = new TCHAR[length + 1];
        texte6[0] = length;
        texte6[length] = '\0';
        SendMessage(maps,EM_GETLINE,0,(LPARAM)texte6);
     
        length = SendMessage(nbreMaxJou, EM_LINELENGTH, 0, 0 );
        TCHAR* nbre0 = new TCHAR[length + 1];
        nbre0[0] = length;
        nbre0[length+1] = '\0';
        SendMessage(nbreMaxJou,EM_GETLINE,0,(LPARAM)nbre0);
     
        length = SendMessage(scoreMax, EM_LINELENGTH, 0, 0 );
        TCHAR* nbre1 = new TCHAR[length + 1];
        nbre1[0] = length;
        nbre1[length] = ' ';
        SendMessage(scoreMax,EM_GETLINE,0,(LPARAM)nbre1);
     
        length = SendMessage(nbreMaxSpec, EM_LINELENGTH, 0, 0 );
        TCHAR* nbre2 = new TCHAR[200];
        nbre2[0] = length;
        nbre2[199] = '\0';
        SendMessage(nbreMaxSpec,EM_GETLINE,0,(LPARAM)nbre2);
     
        string texte4;
     
        if (SendMessage(typePartie,CB_GETCURSEL,0,0) == 0)
        {
            texte4="dm";
        }
        else if (SendMessage(typePartie,CB_GETCURSEL,0,0) == 1)
        {
            texte4="tdm";
        }
        else
        {
            texte4="ctf";
        }
        proprietes[0]="sv_powerups";
        proprietes[1]="sv_tournament_mode";
        proprietes[2]="sv_register";
        proprietes[3]="sv_name";
        proprietes[4]="sv_motd";
        proprietes[5]="password";
        proprietes[6]="sv_rcon_password";
        proprietes[7]="sv_gametype";
        proprietes[8]="sv_map";
        proprietes[9]="sv_maprotation";
        proprietes[10]="sv_max_clients";
        proprietes[11]="sv_scorelimit";
        proprietes[12]="sv_spectator_slots";
     
        tunning[0]="ground_control_speed";
        tunning[1]="ground_control_accel";
        tunning[2]="ground_friction";
        tunning[3]="hook_lengh";
        tunning[4]="hook_fire_speed";
        tunning[5]="hook_drag_speed";
        tunning[6]="ground_jump_impulse";
        tunning[7]="air_jump_impulse";
        tunning[8]="air_control_speed";
        tunning[9]="air_friction";
        tunning[10]="gravity";
        tunning[11]="gun_speed";
        tunning[12]="gun_lifetime";
        tunning[13]="shotgun_speed";
        tunning[14]="shotgun_lifetime";
        tunning[15]="grenade_speed";
        tunning[16]="grenade_lifetime";
        tunning[17]="laser_reach";
        tunning[18]="laser_bounce_num";
        tunning[19]="laser_damage";
     
     
        string text = texte0;
        string name = "servers/" + text + ".cfg";
        //string rname = "../" + Texte[0] + ".bat";
        //string rname2 = "\"..\\" + Texte[0] + ".bat\"";
        size_t size2 = name.size() + 1;
        //size_t size3 = rname.size() + 1;
        //size_t size4 = rname.size() + 1;
        char * nom2 = new char[ size2 ];
        //char * nom3 = new char[ size3 ];
        //char * nom4 = new char[ size4 ];
        // copier la chaîne
        strncpy( nom2, name.c_str(), size2 );
        //strncpy( nom3, rname.c_str(), size3 );
        //strncpy( nom4, rname2.c_str(), size4 );
     
        ofstream file(nom2, ios::out | ios::trunc);  // ouverture en écriture avec effacement du fichier ouvert
     
        if (file)
        {
     
            file << proprietes[0]<<" "<<Bool[0]<<endl;
            file << proprietes[1]<<" "<<Bool[1]<<endl;
            file << proprietes[2]<<" "<<Bool[2]<<endl;
     
            file << proprietes[3]<<" "<<texte0<<endl;
            file << proprietes[4]<<" "<<texte1<<endl;
            file << proprietes[5]<<" "<<texte2<<endl;
            file << proprietes[6]<<" "<<texte3<<endl;
            file << proprietes[7]<<" "<<texte4<<endl;
     
            file << proprietes[8]<<" "<<texte5<<endl;
            file << proprietes[9]<<" "<<texte6<<endl;
     
            file << proprietes[10]<<" "<<nbre0<<endl;
            file << proprietes[11]<<" "<<nbre1<<endl;
            file << proprietes[12]<<" "<<nbre2<<endl;
     
            /*for(int i =0;i<=19;i++)
            {
                if (Nbre2[i]!=d_Nbre2[i])
                {
                file << "tune " << tunning1[i] << " " << Nbre2[i] <<endl;
                }
            }*/
     
            /*file.close();
        }/*
        ofstream file_rac(nom3, ios::out | ios::trunc);  // ouverture en écriture avec effacement du fichier ouvert
     
            if(file)
            {
                    file_rac <<"start teeworlds_srv.exe -f "<<"\".\\TSM\\servers\\"<< Texte[0] <<".cfg\"" <<endl;
     
                    file_rac.close();
            }
            return nom4;*/
     
        //classeFenetre.hCursor = LoadCursor(NULL, IDC_ARROW);
     
        }
    }
     
    void openMap()
    {
        OPENFILENAME ofn;
        CHAR szFile[MAX_PATH]={0};
     
        ZeroMemory(&ofn, sizeof(OPENFILENAME));
        ofn.lStructSize = sizeof(OPENFILENAME);
        ofn.hwndOwner = fenetrePrincipale;
        ofn.lpstrFile = szFile;
        ofn.nMaxFile = MAX_PATH;
        ofn.lpstrInitialDir = "..\\data\\maps\\";
        ofn.lpstrFilter =
            "Map File (.map)\0*.map\0";
        ofn.nFilterIndex = 1;
        ofn.Flags =
            OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
     
        if (GetOpenFileName(&ofn))
        {
     
            char *tmp = ofn.lpstrFile;
            char *tmp2 = strrchr(tmp,'\\');
            char tmp3[200] = "";
            strcpy(tmp3,tmp2);
            char *tmp4 = strchr(tmp2,tmp3[1]);
            char tmp5[200] = "";
            strcpy(tmp5,tmp4);
            char tmp6[200] = "";
            int i =0;
            for (i = 0;i<(strlen(tmp4)-4);i++)
            {
                tmp6[i]=tmp5[i];
            }
            i++;
            tmp6[i]='\0';
            SetWindowText(map,tmp6);
        }
     
    }
     
    void addMap()
    {
        OPENFILENAME ofn;
        CHAR szFile[MAX_PATH]={0};
     
        ZeroMemory(&ofn, sizeof(OPENFILENAME));
        ofn.lStructSize = sizeof(OPENFILENAME);
        ofn.hwndOwner = fenetrePrincipale;
        ofn.lpstrFile = szFile;
        ofn.nMaxFile = MAX_PATH;
        ofn.lpstrInitialDir = "..\\data\\maps\\";
        ofn.lpstrFilter =
            "Map File (.map)\0*.map\0";
        ofn.nFilterIndex = 1;
        ofn.Flags =
            OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
     
        if (GetOpenFileName(&ofn))
        {
     
            char *tmp = ofn.lpstrFile;
            char *tmp2 = strrchr(tmp,'\\');
            char tmp3[200] = "";
            strcpy(tmp3,tmp2);
            char *tmp4 = strchr(tmp2,tmp3[1]);
            char tmp5[200] = "";
            strcpy(tmp5,tmp4);
            char tmp6[200] = "";
            int i =0;
            for (i = 0;i<(strlen(tmp4)-4);i++)
            {
                tmp6[i]=tmp5[i];
            }
            i++;
            tmp6[i]='\0';
            char *iniText;
            GetWindowText(maps,iniText,1000);
            string str1 = iniText;
            string str2 = tmp6;
            string temp = str1 + " " + str2;
     
            SetWindowText(maps,temp.c_str());
        }
     
    }
    voila, j'espère que vous avez une solution, je désespère........


    [ ide : code blocks | win XP sp3 | c++ & winapi ]

  2. #2
    Inactif  
    Profil pro
    Inscrit en
    Juillet 2005
    Messages
    1 958
    Détails du profil
    Informations personnelles :
    Âge : 58
    Localisation : France

    Informations forums :
    Inscription : Juillet 2005
    Messages : 1 958
    Points : 2 467
    Points
    2 467
    Par défaut
    Sinon de manière générale, tu viens d'apprendre qu'il faut garder tes anciennes versions, et mettre des commentaires pertinents.

  3. #3
    Futur Membre du Club
    Profil pro
    Inscrit en
    Juillet 2008
    Messages
    10
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2008
    Messages : 10
    Points : 8
    Points
    8
    Par défaut
    Désolé , je ne comprend pas ton message

    Mon appel au secours n'est pas pertinent ?

  4. #4
    Membre régulier
    Profil pro
    Inscrit en
    Juin 2006
    Messages
    79
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2006
    Messages : 79
    Points : 78
    Points
    78
    Par défaut
    On dirait bien que C::B compile correctement ton programme

    Le problème provient de l'execution de ton programme.
    Executing: "C:\Documents and Settings\Thomas\Mes documents\Prog C++\TSM_win-api\TSM2.exe" (in C:\Documents and Settings\Thomas\Mes documents\Prog C++\TSM_win-api\.)
    Execution of '"C:\Documents and Settings\Thomas\Mes documents\Prog C++\TSM_win-api\TSM2.exe" ' in 'C:\Documents and Settings\Thomas\Mes documents\Prog C++\TSM_win-api' failed.

    "Nothing to be done." que tu as mis en rouge doit vouloir dire que tu as voulu recompiler ton programme après l'execution.

  5. #5
    Futur Membre du Club
    Profil pro
    Inscrit en
    Juillet 2008
    Messages
    10
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2008
    Messages : 10
    Points : 8
    Points
    8
    Par défaut
    oui je sais....... code blocks compile bien (j'ai également essayé avec dev)
    mais le pb ne viens pas de la !
    et je n'ai pas recompilé apres execution.....
    Je n'ai jamais vu ca, et je ne sais pas d'ou ca vient

  6. #6
    Membre régulier
    Profil pro
    Inscrit en
    Juin 2006
    Messages
    79
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2006
    Messages : 79
    Points : 78
    Points
    78
    Par défaut
    Tu n'as plus qu'à debugger ton programme pour voir d'où vient ton problème. Mais dans ce cas ça n'a plus rien à voir avec C::B

  7. #7
    Futur Membre du Club
    Profil pro
    Inscrit en
    Juillet 2008
    Messages
    10
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2008
    Messages : 10
    Points : 8
    Points
    8
    Par défaut
    Error creating process C:\Documents and Settings\Thomas\Mes documents\Prog C++\TSM_win-api/TSM.exe, (error 14001).

    voila

Discussions similaires

  1. [make] Nothing to be done for ...
    Par Zenol dans le forum Systèmes de compilation
    Réponses: 5
    Dernier message: 02/02/2006, 18h50

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