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

MFC Discussion :

Choix de la langue pour la classe CFileDialog ? [FAQ]


Sujet :

MFC

  1. #1
    liv
    liv est déconnecté
    Membre du Club
    Profil pro
    Inscrit en
    Novembre 2003
    Messages
    124
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2003
    Messages : 124
    Points : 41
    Points
    41
    Par défaut Choix de la langue pour la classe CFileDialog ?
    Mon appli intègre plusieurs langues (MFC Visual C++ .NET)...pour ce qui est des ressources, des textes...pas de problème. Par contre dès que j'utilise des classes Windows spécifiques comme la classe CFileDialog qui permet d'ouvrir un fichier je ne sais pas comment lui spécifier la langue.

    Une idéee?

  2. #2
    Rédacteur
    Avatar de farscape
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Novembre 2003
    Messages
    9 055
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Novembre 2003
    Messages : 9 055
    Points : 17 323
    Points
    17 323
    Par défaut
    salut,
    Dans le .rc de ton application tu as des includes standards des ressources visible par le menu view et resources includes
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    #include ""res\\SdiSplitter.rc2""  // non-Microsoft Visual C++ edited resources\r\n"
    #include ""l.fra\\afxres.rc""          // Standard components\r\n"
    #include ""l.fra\\afxprint.rc""        // printing/print preview resources\r\n"
    il faut adapter cette partie pour chaque dll de resources par langue


  3. #3
    liv
    liv est déconnecté
    Membre du Club
    Profil pro
    Inscrit en
    Novembre 2003
    Messages
    124
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2003
    Messages : 124
    Points : 41
    Points
    41
    Par défaut
    Merci farscape...je regarde mais à première vue il n'y a pas qu'aun niveau des includes.

    Par exemple:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    /////////////////////////////////////////////////////////////////////////////
    // Français (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
    /////////////////////////////////////////////////////////////////////////////
    En fait j'ai l'impression que cela est géré à plein d'endroits différents dans le .rc. Est-ce que je dois tout changer dans le .rc de ma dll en anglais ?

  4. #4
    Rédacteur
    Avatar de farscape
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Novembre 2003
    Messages
    9 055
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Novembre 2003
    Messages : 9 055
    Points : 17 323
    Points
    17 323
    Par défaut
    salut,
    dans le contexte d’avoir les ressources standards dans la langue ,changer les includes devrait suffire ..
    pour faire propre dans le cas d’ajout d’une nouvelle ressource l’idéal serait de tout modifier.
    Mais essaye déjà comme ça pour voir.


  5. #5
    liv
    liv est déconnecté
    Membre du Club
    Profil pro
    Inscrit en
    Novembre 2003
    Messages
    124
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2003
    Messages : 124
    Points : 41
    Points
    41
    Par défaut
    J'ai un problème...Voici ce que m'affiche l'include des ressources de visual concernant ma dll d'anglais:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    #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)
    LANGUAGE 12, 1
    #pragma code_page(1252)
    #include "res\DvdAt.rc2"  // ressources non modifiées par Microsoft Visual C++ 
    #include "afxres.rc"         // Composants standard
    #endif
    Donc tu vois...par défaut c en français. Mais pour mettre en anglais je ne vois pas trop...j'ai certainement mal compris quelque chose...car ça ne fonctionne pas.

  6. #6
    liv
    liv est déconnecté
    Membre du Club
    Profil pro
    Inscrit en
    Novembre 2003
    Messages
    124
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2003
    Messages : 124
    Points : 41
    Points
    41
    Par défaut
    J'ai regardé dans le répertoire "C:\Program Files\Microsoft Visual Studio .NET\Vc7\atlmfc\include" et effectivement il y a les afxres.rc adéquates dans des répertoires spécifiques pour chaque langue...sauf pour l'anglais où le fichier est à la racine.

    Ce que je ne comprends pas c'est que par défaut il y a l'include "afxres.rc" qui devrait correspondre à l'anglais, mais Visual prend le français. Mon projet étant en français de base...ceci expliquerait le pourquoi du comment.

    Seulement voilà...si je suis ton juste raisonnement je devrais préciser la langue devant mes includes.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    #include ""l.fra\\afxres.rc""
    Dans mon code...
    correspond déjà au français.

    Comment je le mets en anglais ce couillon ?

  7. #7
    liv
    liv est déconnecté
    Membre du Club
    Profil pro
    Inscrit en
    Novembre 2003
    Messages
    124
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2003
    Messages : 124
    Points : 41
    Points
    41
    Par défaut
    En fait...même si je change en italien, allemand...rien ni fait...veut pas changer la langue.
    Je me demande si il n'y a pas une propriété par défaut qui empêche cela.
    C'est bizarre et assez pénible. Parfois j'ai du mal à saisir la logique de Microsoft.

  8. #8
    Rédacteur
    Avatar de farscape
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Novembre 2003
    Messages
    9 055
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Novembre 2003
    Messages : 9 055
    Points : 17 323
    Points
    17 323
    Par défaut
    re,
    Par défaut pour vc6.0 et vc.net 2001 le langage est l'anglais .
    fait la chose suivante:
    ouvre le .rc par notepad et change les références aux langues ici exemple pour l'espagnol
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
     
    #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ESP)
    #ifdef _WIN32
    LANGUAGE LANG_SPANISH, SUBLANG_SPANISH
    #pragma code_page(1252)
    #endif //_WIN32
    tu trouves la définition des mots clefs sur MSDN
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/nls_97vo.asp
    language :
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/nls_61df.asp
    sublang:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/nls_19ir.asp

    et redefinis la partie
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
     
    #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ESP)
    #ifdef _WIN32
    LANGUAGE LANG_SPANISH, SUBLANG_SPANISH
    #pragma code_page(1252)
    #endif //_WIN32
    #include "l.esp\afxres.rc"          
    #endif
    ça devrait etre bon.

  9. #9
    liv
    liv est déconnecté
    Membre du Club
    Profil pro
    Inscrit en
    Novembre 2003
    Messages
    124
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2003
    Messages : 124
    Points : 41
    Points
    41
    Par défaut
    C désespérant...rien ni fait. Je me demande si il n'y a pas une propriété à rajouter dans mon projet.

    Si tu veux jeter un coup d'oeil au niveau du code du fichier .rc de ma dll en anglais...j'ai posé le langage espagnol pour essayer.

    Juste une petite remarque...concernant ma gestion de langue j'ai fais comme tu l'as si bien expliqué au niveau de la FAQ.
    J'ai téléchargé ton projet "TestResDll" pour voir si cela posait le même problème...hélas...ça ne marche pas non plus sur ton exemple.

    Voici mon code....si tu as le temps.

    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
    // Microsoft Visual C++ generated resource script.
    //
    #include "resource.h"
     
    // Generated Help ID header file
    #define APSTUDIO_HIDDEN_SYMBOLS
    #include "resource.hm"
    #undef APSTUDIO_HIDDEN_SYMBOLS
     
    #define APSTUDIO_READONLY_SYMBOLS
    /////////////////////////////////////////////////////////////////////////////
    //
    // Generated from the TEXTINCLUDE 2 resource.
    //
    #include "afxres.h"
     
    /////////////////////////////////////////////////////////////////////////////
    #undef APSTUDIO_READONLY_SYMBOLS
     
    /////////////////////////////////////////////////////////////////////////////
    // Anglais (États-Unis) resources
     
    #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ESP)
    #ifdef _WIN32
    LANGUAGE LANG_SPANISH, SUBLANG_SPANISH
    #pragma code_page(1252)
    #include "l.esp\afxres.rc" 
    #endif //_WIN32
     
     
    /////////////////////////////////////////////////////////////////////////////
    //
    // Icon
    //
     
    // Icon with lowest ID value placed first to ensure application icon
    // remains consistent on all systems.
    IDR_MAINFRAME           ICON                    "res\\DvdAt.ico"
     
    /////////////////////////////////////////////////////////////////////////////
    //
    // Dialog
    //
     
    IDD_DVDAT_VIDEO DIALOGEX 0, 0, 323, 202
    STYLE DS_SETFONT | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | 
        WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
    EXSTYLE WS_EX_ACCEPTFILES | WS_EX_CONTROLPARENT | WS_EX_STATICEDGE | 
        WS_EX_APPWINDOW | WS_EX_NOINHERITLAYOUT
    CAPTION "Dvd@"
    FONT 8, "MS Shell Dlg", 0, 0, 0x1
    BEGIN
        CONTROL         "",IDC_MSCACTIVEXPLAYER,
                        "{C86EB114-220A-474D-9CFB-138CC247D783}",WS_TABSTOP,162,
                        7,154,106
    END
     
    IDD_DVDAT_TOOLS DIALOGEX 0, 0, 283, 53
    STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | 
        WS_CAPTION | WS_SYSMENU
    EXSTYLE WS_EX_ACCEPTFILES | WS_EX_TOOLWINDOW | WS_EX_CONTEXTHELP | 
        WS_EX_STATICEDGE | WS_EX_NOINHERITLAYOUT
    MENU IDR_DVDAT_MENU
    FONT 8, "MS Shell Dlg", 400, 0, 0x1
    BEGIN
        CONTROL         "Play",IDC_BUTTON_PLAY,"Button",BS_OWNERDRAW | WS_GROUP | 
                        WS_TABSTOP,7,21,34,19,0,HIDC_BUTTON_PLAY
        CONTROL         "Pause",1011,"Button",BS_OWNERDRAW | WS_TABSTOP,44,21,34,
                        19,0,0x808103f3
        CONTROL         "Stop",IDC_BUTTON_STOP,"Button",BS_OWNERDRAW | 
                        WS_TABSTOP,81,21,34,19,0,HIDC_BUTTON_STOP
        CONTROL         "FullScreen",IDC_BUTTON_FULLSCREEN,"Button",BS_OWNERDRAW | 
                        WS_TABSTOP,118,21,34,19,0,HIDC_BUTTON_FULLSCREEN
        CONTROL         "Browse",IDC_BUTTON_BROWSE,"Button",BS_OWNERDRAW | 
                        WS_TABSTOP,155,21,34,19,0,HIDC_BUTTON_BROWSE
        CONTROL         "",IDC_SLIDER,"msctls_trackbar32",TBS_AUTOTICKS | 
                        TBS_TOP | TBS_NOTICKS | TBS_ENABLESELRANGE | 
                        TBS_TOOLTIPS | WS_TABSTOP,7,3,182,13,0,HIDC_SLIDER
        CONTROL         "",IDC_VOLUME,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | 
                        WS_TABSTOP,193,29,38,16,0,HIDC_VOLUME
        CTEXT           "",IDC_TIME,194,3,35,11
    END
     
    IDD_AUTH_DIALOG DIALOGEX 0, 0, 135, 84
    STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
    EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CONTEXTHELP | WS_EX_APPWINDOW
    CAPTION "Authentification on Dvd@"
    FONT 8, "MS Shell Dlg", 400, 0, 0x1
    BEGIN
        CONTROL         "OK",IDOK,"Button",BS_OWNERDRAW | WS_TABSTOP,12,65,50,14
        CONTROL         "Annuler",IDCANCEL,"Button",BS_OWNERDRAW | WS_TABSTOP,68,
                        65,50,14
        LTEXT           "Enter your Login :",IDC_STATIC,17,5,72,11
        LTEXT           "Enter your Password :",IDC_STATIC,17,35,102,11
        EDITTEXT        IDC_EDIT_LOGIN,15,16,98,12,ES_AUTOHSCROLL | NOT 
                        WS_BORDER,WS_EX_STATICEDGE,HIDC_EDIT_LOGIN
        EDITTEXT        IDC_EDIT_PWD,16,46,98,12,ES_PASSWORD | ES_AUTOHSCROLL | 
                        NOT WS_BORDER,WS_EX_STATICEDGE,HIDC_EDIT_PWD
    END
     
    IDD_CONFIRM_DIALOG DIALOGEX 0, 0, 218, 60
    STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | 
        WS_CAPTION | WS_SYSMENU
    EXSTYLE WS_EX_TOOLWINDOW | WS_EX_APPWINDOW
    CAPTION "Alerte Dvd@"
    FONT 8, "MS Shell Dlg", 400, 0, 0x1
    BEGIN
        CONTROL         "OK",IDOK,"Button",BS_OWNERDRAW | WS_TABSTOP,47,39,40,14
        CONTROL         "Annuler",IDCANCEL,"Button",BS_OWNERDRAW | WS_TABSTOP,
                        103,39,40,14
        CTEXT           "Message1",IDC_EDIT_MESSAGE1,5,6,181,23,SS_NOTIFY
        CTEXT           "Message2",IDC_EDIT_MESSAGE2,8,18,173,17,SS_NOTIFY | NOT 
                        WS_VISIBLE
    END
     
    IDD_ABOUTBOX DIALOGEX 0, 0, 267, 202
    STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | 
        WS_SYSMENU
    EXSTYLE WS_EX_PALETTEWINDOW | WS_EX_STATICEDGE
    CAPTION "About DVD@..."
    FONT 8, "MS Shell Dlg", 400, 0, 0x1
    BEGIN
        CONTROL         "OK",IDOK,"Button",BS_OWNERDRAW | WS_TABSTOP,199,8,50,14
        CONTROL         184,IDC_LOGOS,"Static",SS_BITMAP,0,79,267,123
        CONTROL         240,IDC_APROPOS,"Static",SS_BITMAP | SS_REALSIZEIMAGE,0,
                        0,196,79
    END
     
    IDD_PLAY_SEQ_DIALOG DIALOGEX 0, 0, 240, 67
    STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | 
        WS_BORDER | WS_SYSMENU
    EXSTYLE WS_EX_CONTEXTHELP
    FONT 8, "MS Shell Dlg", 400, 0, 0x1
    BEGIN
        PUSHBUTTON      "Close",IDCANCEL,183,41,50,14,0,0,HIDCANCEL
        LTEXT           "Name of the sequence :",IDC_STATIC_NOM,7,7,80,12
        EDITTEXT        IDC_EDIT_NOM,86,7,99,13,ES_AUTOHSCROLL | ES_READONLY | 
                        NOT WS_BORDER
        LTEXT           "Extract playing :",IDC_STATIC_DEB,8,26,57,12
        LTEXT           "on",IDC_STATIC_FIN2,68,26,21,9
        LTEXT           "to",IDC_STATIC_FIN,120,26,10,10
        PUSHBUTTON      "|<<",IDC_PRECED_SEQ,7,42,21,12,WS_DISABLED,0,
                        HIDC_PRECED_SEQ
        LTEXT           "",IDC_EDIT_DEB,84,26,30,11,0,0,HIDC_EDIT_DEB
        LTEXT           "",IDC_EDIT_FIN,130,26,38,10,0,0,HIDC_EDIT_FIN
        PUSHBUTTON      ">>|",IDC_NEXT_SEQ,151,42,22,12,0,0,HIDC_NEXT_SEQ
        COMBOBOX        IDC_COMBO_PLAY_SEQ,33,42,113,187,CBS_DROPDOWNLIST | 
                        CBS_SORT | CBS_NOINTEGRALHEIGHT | WS_VSCROLL | 
                        WS_TABSTOP,0,HIDC_COMBO_PLAY_SEQ
    END
     
    IDD_LISTSEQ_DIALOG DIALOGEX 0, 0, 230, 257
    STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | 
        WS_SYSMENU
    EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CONTEXTHELP
    CAPTION "List of my séquences..."
    FONT 8, "MS Shell Dlg", 400, 0, 0x1
    BEGIN
        LISTBOX         IDC_LISTSEQ,7,7,216,224,LBS_SORT | LBS_NOINTEGRALHEIGHT | 
                        LBS_EXTENDEDSEL | WS_VSCROLL,WS_EX_LEFTSCROLLBAR
        CONTROL         "Charger",IDOK,"Button",BS_OWNERDRAW | WS_TABSTOP,4,234,
                        44,16,0,HIDOK
        CONTROL         "Modifier",IDC_MODIF_SEQ,"Button",BS_OWNERDRAW | 
                        WS_TABSTOP,59,234,36,16,0,HIDC_MODIF_SEQ
        CONTROL         "Supprimer",IDC_SUPPR_SEQ,"Button",BS_OWNERDRAW | 
                        WS_TABSTOP,115,234,36,16,0,HIDC_SUPPR_SEQ
        CONTROL         "Fermer",IDCANCEL,"Button",BS_OWNERDRAW | WS_GROUP | 
                        WS_TABSTOP,171,234,35,16,0,HIDCANCEL
    END
     
    IDD_MODIF_SEQ_DIALOG DIALOGEX 0, 0, 251, 198
    STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | 
        WS_BORDER | WS_SYSMENU
    EXSTYLE WS_EX_CONTEXTHELP
    FONT 8, "MS Shell Dlg", 400, 0, 0x1
    BEGIN
        DEFPUSHBUTTON   "      Save in            my list",IDOK,129,181,50,17,
                        BS_MULTILINE | WS_GROUP,0,HIDOK
        DEFPUSHBUTTON   "Close",IDCANCEL,183,182,50,14,0,0,HIDCANCEL
        CONTROL         "",IDC_TAB_SEQ,"SysTabControl32",0x0,3,22,230,141,
                        WS_EX_ACCEPTFILES,HIDC_TAB_SEQ
        LTEXT           "Name of the sequence :",IDC_STATIC_NOM,7,7,79,9
        EDITTEXT        IDC_EDIT_NOM,85,6,150,12,ES_AUTOHSCROLL | NOT WS_BORDER,
                        WS_EX_STATICEDGE,HIDC_EDIT_NOM
        LTEXT           "",IDC_ERREUR,5,166,227,11
        DEFPUSHBUTTON   "Save as",IDOK_SOUS,67,182,58,14,0,0,HIDOK_SOUS
    END
     
    IDD_MODIF_SEQ_EXTRAIT_DIALOG DIALOGEX 0, 0, 230, 128
    STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
    FONT 8, "MS Shell Dlg", 400, 0, 0x1
    BEGIN
        DEFPUSHBUTTON   "Add",IDC_BN_SET_EXT_SEQ,90,52,40,14,0,0,
                        HIDC_BN_SET_EXT_SEQ
        DEFPUSHBUTTON   "Modify",IDC_BN_GET_EXT_SEQ,90,71,40,14,0,0,
                        HIDC_BN_GET_EXT_SEQ
        DEFPUSHBUTTON   "Delete",IDC_BN_DEL_EXT_SEQ,90,89,40,14,0,0,
                        HIDC_BN_DEL_EXT_SEQ
        LISTBOX         IDC_LIST_EXT_SEQ,136,11,74,93,LBS_NOINTEGRALHEIGHT | NOT 
                        WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,
                        WS_EX_STATICEDGE,HIDC_LIST_EXT_SEQ
        DEFPUSHBUTTON   ">>",IDC_BN_EXT_DEB,7,26,20,14,0,0,HIDC_BN_EXT_DEB
        DEFPUSHBUTTON   "<<",IDC_BN_EXT_FIN,110,26,20,14,0,0,HIDC_BN_EXT_FIN
        LTEXT           "Beginning",IDC_STATIC_DEB,35,16,33,9
        LTEXT           "End",IDC_STATIC_FIN,85,16,20,9
        EDITTEXT        IDC_EDIT_EXT_DEB,30,27,35,12,ES_CENTER | ES_AUTOHSCROLL | 
                        ES_READONLY | NOT WS_BORDER,WS_EX_STATICEDGE,
                        HIDC_EDIT_EXT_DEB
        GROUPBOX        "",IDC_STATIC,3,0,222,125,0,0,HIDC_STATIC
        EDITTEXT        IDC_EDIT_EXT_FIN,71,27,35,12,ES_CENTER | ES_AUTOHSCROLL | 
                        ES_READONLY | NOT WS_BORDER,WS_EX_STATICEDGE,
                        HIDC_EDIT_EXT_FIN
        CONTROL         "Display video",IDC_CHECK_EXT_VIDEO,"Button",
                        BS_AUTOCHECKBOX | WS_TABSTOP,7,60,70,12,0,
                        HIDC_CHECK_EXT_VIDEO
        CONTROL         "Listen to audio",IDC_CHECK_EXT_AUDIO,"Button",
                        BS_AUTOCHECKBOX | WS_TABSTOP,7,75,82,12,0,
                        HIDC_CHECK_EXT_AUDIO
        CONTROL         "Display subtitle",IDC_CHECK_EXT_LEGENDE,"Button",
                        BS_AUTOCHECKBOX | WS_TABSTOP,7,90,82,12,0,
                        HIDC_CHECK_EXT_LEGENDE
        CONTROL         "U",EXT_UP,"Button",BS_OWNERDRAW | WS_TABSTOP,212,39,12,
                        13,0,HEXT_UP
        CONTROL         "D",EXT_DOWN,"Button",BS_OWNERDRAW | WS_TABSTOP,212,56,
                        12,13,0,HEXT_DOWN
    END
     
    IDD_MODIF_SEQ_LEGENDE_DIALOG DIALOGEX 0, 0, 230, 128
    STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
    FONT 8, "MS Shell Dlg", 400, 0, 0x1
    BEGIN
        GROUPBOX        "",IDC_STATIC,3,0,222,125,0,0,HIDC_STATIC
        DEFPUSHBUTTON   "Add",IDC_BN_SET_LEG_SEQ,90,52,40,14,0,0,
                        HIDC_BN_SET_LEG_SEQ
        DEFPUSHBUTTON   "Modify",IDC_BN_GET_LEG_SEQ,90,71,40,14,0,0,
                        HIDC_BN_GET_LEG_SEQ
        DEFPUSHBUTTON   "Delete",IDC_BN_DEL_LEG_SEQ,90,89,40,14,0,0,
                        HIDC_BN_DEL_LEG_SEQ
        LISTBOX         IDC_LIST_LEG_SEQ,136,11,74,93,LBS_NOINTEGRALHEIGHT | NOT 
                        WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,
                        WS_EX_STATICEDGE,HIDC_LIST_LEG_SEQ
        DEFPUSHBUTTON   ">>",IDC_BN_LEG_DEB,7,26,20,14,0,0,HIDC_BN_LEG_DEB
        DEFPUSHBUTTON   "<<",IDC_BN_LEG_FIN,110,26,20,14,0,0,HIDC_BN_LEG_FIN
        LTEXT           "Beginning",IDC_STATIC_DEB,34,16,31,9
        LTEXT           "End",IDC_STATIC_FIN,86,16,14,9
        EDITTEXT        IDC_EDIT_LEG_DEB,30,27,35,12,ES_CENTER | ES_AUTOHSCROLL | 
                        ES_READONLY | NOT WS_BORDER,WS_EX_STATICEDGE,
                        HIDC_EDIT_LEG_DEB
        EDITTEXT        IDC_EDIT_LEG_FIN,72,27,35,12,ES_CENTER | ES_AUTOHSCROLL | 
                        ES_READONLY | NOT WS_BORDER,WS_EX_STATICEDGE,
                        HIDC_EDIT_LEG_FIN
        EDITTEXT        IDC_EDIT_LEG_SEQ,7,109,214,12,ES_CENTER | ES_AUTOHSCROLL | 
                        NOT WS_BORDER,WS_EX_STATICEDGE,HIDC_EDIT_LEG_SEQ
        LTEXT           "Edit subtitle :",IDC_STATIC_LEGENDE,14,98,63,9
        CONTROL         "U",LEG_UP,"Button",BS_OWNERDRAW | WS_TABSTOP,212,39,9,
                        15,0,HLEG_UP
        CONTROL         "D",LEG_DOWN,"Button",BS_OWNERDRAW | WS_TABSTOP,212,56,
                        10,15,0,HLEG_DOWN
    END
     
    IDD_ABOUTACTIVEX DIALOGEX 0, 0, 227, 86
    STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | 
        WS_SYSMENU
    EXSTYLE WS_EX_TOOLWINDOW | WS_EX_STATICEDGE
    CAPTION "À propos..."
    FONT 8, "MS Shell Dlg", 400, 0, 0x1
    BEGIN
        DEFPUSHBUTTON   "OK",IDOK,96,67,35,14
        LTEXT           "Didagora Content Project",-1,70,6,87,11
        LTEXT           "Use the DRM technology  ©Copyright Medialive 2002-2004",
                        -1,16,35,194,10
        LTEXT           "Piloted by VXCD",IDC_STATIC_COPYRIGHT,84,16,59,10
        LTEXT           "Version 0.1.18",-1,87,48,53,10
        LTEXT           "©Copyright Mediasyscom 2003-2004",IDC_STATIC_COPYRIGHT2,
                        49,25,129,11
    END
     
     
    /////////////////////////////////////////////////////////////////////////////
    //
    // Version
    //
     
    VS_VERSION_INFO VERSIONINFO
     FILEVERSION 1,3,1,18
     PRODUCTVERSION 1,3,1,18
     FILEFLAGSMASK 0x3fL
    #ifdef _DEBUG
     FILEFLAGS 0x1L
    #else
     FILEFLAGS 0x0L
    #endif
     FILEOS 0x4L
     FILETYPE 0x1L
     FILESUBTYPE 0x0L
    BEGIN
        BLOCK "StringFileInfo"
        BEGIN
            BLOCK "040c04e4"
            BEGIN
                VALUE "Comments", "Didacticiel Vidéo à la Demande"
                VALUE "CompanyName", "VXCD Tecnilab Multimédia"
                VALUE "FileDescription", "Lecteur Multimédia Dvd@"
                VALUE "FileVersion", "1.3.1.18"
                VALUE "InternalName", "Dvd@.exe"
                VALUE "LegalCopyright", "VXCD. Tous droits réservés."
                VALUE "OriginalFilename", "Dvd@.exe"
                VALUE "ProductName", "DVD@"
                VALUE "ProductVersion", "1.3.1.18"
            END
        END
        BLOCK "VarFileInfo"
        BEGIN
            VALUE "Translation", 0x40c, 1252
        END
    END
     
     
    /////////////////////////////////////////////////////////////////////////////
    //
    // DESIGNINFO
    //
     
    #ifdef APSTUDIO_INVOKED
    GUIDELINES DESIGNINFO 
    BEGIN
        IDD_DVDAT_VIDEO, DIALOG
        BEGIN
            LEFTMARGIN, 7
            RIGHTMARGIN, 316
            TOPMARGIN, 7
            BOTTOMMARGIN, 195
        END
     
        IDD_DVDAT_TOOLS, DIALOG
        BEGIN
            LEFTMARGIN, 7
            RIGHTMARGIN, 276
            TOPMARGIN, 7
            BOTTOMMARGIN, 45
        END
     
        IDD_AUTH_DIALOG, DIALOG
        BEGIN
            LEFTMARGIN, 7
            RIGHTMARGIN, 128
            TOPMARGIN, 7
            BOTTOMMARGIN, 77
        END
     
        IDD_CONFIRM_DIALOG, DIALOG
        BEGIN
            LEFTMARGIN, 7
            RIGHTMARGIN, 211
            TOPMARGIN, 7
            BOTTOMMARGIN, 53
        END
     
        IDD_PLAY_SEQ_DIALOG, DIALOG
        BEGIN
            RIGHTMARGIN, 239
        END
     
        IDD_LISTSEQ_DIALOG, DIALOG
        BEGIN
            LEFTMARGIN, 7
            RIGHTMARGIN, 223
            TOPMARGIN, 7
            BOTTOMMARGIN, 250
        END
     
        IDD_MODIF_SEQ_DIALOG, DIALOG
        BEGIN
            LEFTMARGIN, 3
            RIGHTMARGIN, 248
            TOPMARGIN, 6
            BOTTOMMARGIN, 197
        END
     
        IDD_MODIF_SEQ_EXTRAIT_DIALOG, DIALOG
        BEGIN
            RIGHTMARGIN, 228
        END
     
        IDD_MODIF_SEQ_LEGENDE_DIALOG, DIALOG
        BEGIN
            RIGHTMARGIN, 228
        END
    END
    #endif    // APSTUDIO_INVOKED
     
     
    /////////////////////////////////////////////////////////////////////////////
    //
    // RT_MANIFEST
    //
     
    IDR_MANIFEST            RT_MANIFEST             "res\\DvdAt.manifest"
     
    /////////////////////////////////////////////////////////////////////////////
    //
    // Menu
    //
     
    IDR_DVDAT_MENU MENU 
    BEGIN
        POPUP "File"
        BEGIN
            MENUITEM "Open Media",                  ID_FICHIER_OUVRIR
            MENUITEM "Quit",                        ID_FICHIER_QUITTER
        END
        POPUP "Sequences"
        BEGIN
            MENUITEM "List of my sequences",        ID_COURS_LISTE
            MENUITEM SEPARATOR
            MENUITEM "Create a sequence",           ID_COURS_CREER
            MENUITEM "Modify a sequence",           ID_COURS_MODIF
            MENUITEM "Read a sequence",             ID_COURS_PLAY
        END
        POPUP "Settings"
        BEGIN
            MENUITEM "Loop",                        ID_OPTIONS_LECTUREBOUCLE
            POPUP "Language"
            BEGIN
                MENUITEM "French",                      ID_LANGUE_FR
                MENUITEM "English",                     ID_LANGUE_EN
            END
        END
        POPUP "Informations"
        BEGIN
            MENUITEM "About...",                    ID_INFOS_APROPOS
            MENUITEM "Help",                        ID_INFOS_AIDE, GRAYED
        END
    END
     
    IDR_MENUPOPUP MENU 
    BEGIN
        POPUP "Options"
        BEGIN
            MENUITEM "Plein écran",                 ID_MENUPOPUP_FULLSCREEN
            MENUITEM SEPARATOR
            MENUITEM "Pause",                       ID_MENUPOPUP_PAUSE
            MENUITEM SEPARATOR
            MENUITEM "A Propos",                    ID_MENUPOPUP_APROPOS
        END
    END
     
     
    /////////////////////////////////////////////////////////////////////////////
    //
    // Dialog Info
    //
     
    IDD_DVDAT_VIDEO DLGINIT
    BEGIN
        IDC_MSCACTIVEXPLAYER, 0x376, 16, 0
    0x0000, 0x0000, 0x0300, 0x0000, 0x17e0, 0x0000, 0x11c7, 0x0000, 
        0
    END
     
     
    /////////////////////////////////////////////////////////////////////////////
    //
    // Bitmap
    //
     
    ANNULER                 BITMAP                  "res\\annuler.bmp"
    ANNULERD                BITMAP                  "res\\annulerd.bmp"
     
    /////////////////////////////////////////////////////////////////////////////
    //
    // String Table
    //
     
    STRINGTABLE 
    BEGIN
        IDC_BUTTON_PLAY         "Play media"
    END
     
    #endif    // Anglais (États-Unis) resources
    /////////////////////////////////////////////////////////////////////////////
     
     
    /////////////////////////////////////////////////////////////////////////////
    // Français (France) resources
     
    #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ESP) 
    #ifdef _WIN32 
    LANGUAGE LANG_SPANISH, SUBLANG_SPANISH 
    #pragma code_page(1252) 
    #endif //_WIN32 
    #include "l.esp\afxres.rc"          
     
    /////////////////////////////////////////////////////////////////////////////
    //
    // Bitmap
    //
     
    LOGO_VXCD               BITMAP                  "res\\logo.bmp"
    PLAY                    BITMAP                  "res\\play.bmp"
    PLAYD                   BITMAP                  "res\\playd.bmp"
    PLAYU                   BITMAP                  "res\\playu.bmp"
    PLAYF                   BITMAP                  "res\\playf.bmp"
    PAUSE                   BITMAP                  "res\\pause.bmp"
    PAUSEF                  BITMAP                  "res\\pausef.bmp"
    STOP                    BITMAP                  "res\\stop.bmp"
    STOPU                   BITMAP                  "res\\stopu.bmp"
    STOPF                   BITMAP                  "res\\stopf.bmp"
    STOPD                   BITMAP                  "res\\stopd.bmp"
    BROWSE                  BITMAP                  "res\\browse.bmp"
    BROWSEU                 BITMAP                  "res\\browseu.bmp"
    BROWSED                 BITMAP                  "res\\browsed.bmp"
    BROWSEF                 BITMAP                  "res\\browsef.bmp"
    FULLSCREEN              BITMAP                  "res\\fullscreen.bmp"
    FULLSCREENU             BITMAP                  "res\\fullscreenu.bmp"
    FULLSCREEND             BITMAP                  "res\\fullscreend.bmp"
    FULLSCREENF             BITMAP                  "res\\fullscreenf.bmp"
    PAUSED                  BITMAP                  "res\\paused.bmp"
    PAUSEU                  BITMAP                  "res\\pauseu.bmp"
    FOND                    BITMAP                  "res\\PlayerFond.bmp"
    LOGOS_PARTENAIRES       BITMAP                  "res\\LogosPartenaires.bmp"
    DOWN                    BITMAP                  "res\\DOWN.bmp"
    UP                      BITMAP                  "res\\UP.bmp"
    DOWNF                   BITMAP                  "res\\DOWNf.bmp"
    UPF                     BITMAP                  "res\\UPf.bmp"
    FERMER                  BITMAP                  "res\\fermer.bmp"
    FERMERD                 BITMAP                  "res\\fermerd.bmp"
    FERMERF                 BITMAP                  "res\\fermerf.bmp"
    FERMERU                 BITMAP                  "res\\fermeru.bmp"
    ANNULERF                BITMAP                  "res\\annulerf.bmp"
    ANNULERU                BITMAP                  "res\\annuleru.bmp"
    NON                     BITMAP                  "res\\non.bmp"
    NOND                    BITMAP                  "res\\nond.bmp"
    NONF                    BITMAP                  "res\\nonf.bmp"
    NONU                    BITMAP                  "res\\nonu.bmp"
    OK                      BITMAP                  "res\\ok.bmp"
    OKD                     BITMAP                  "res\\okd.bmp"
    OKF                     BITMAP                  "res\\okf.bmp"
    OKU                     BITMAP                  "res\\oku.bmp"
    OUI                     BITMAP                  "res\\oui.bmp"
    OUID                    BITMAP                  "res\\ouid.bmp"
    OUIF                    BITMAP                  "res\\ouif.bmp"
    OUIU                    BITMAP                  "res\\ouiu.bmp"
    CHARGER                 BITMAP                  "res\\charger.bmp"
    CHARGERD                BITMAP                  "res\\chargerd.bmp"
    CHARGERF                BITMAP                  "res\\chargerf.bmp"
    CHARGERU                BITMAP                  "res\\chargeru.bmp"
    MODIFIER                BITMAP                  "res\\modifier.bmp"
    MODIFIERD               BITMAP                  "res\\modifierd.bmp"
    MODIFIERF               BITMAP                  "res\\modifierf.bmp"
    MODIFIERU               BITMAP                  "res\\modifieru.bmp"
    SUPPRIMER               BITMAP                  "res\\supprimer.bmp"
    SUPPRIMERD              BITMAP                  "res\\supprimerd.bmp"
    SUPPRIMERF              BITMAP                  "res\\supprimerf.bmp"
    SUPPRIMERU              BITMAP                  "res\\supprimeru.bmp"
    APROPOS                 BITMAP                  "res\\Apropos.bmp"
     
    #ifdef APSTUDIO_INVOKED
    /////////////////////////////////////////////////////////////////////////////
    //
    // TEXTINCLUDE
    //
     
    1 TEXTINCLUDE 
    BEGIN
        "resource.h\0"
    END
     
    2 TEXTINCLUDE 
    BEGIN
        "#include ""l.esp\\afxres.h""\r\n"
        "\0"
    END
     
    3 TEXTINCLUDE 
    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_ESP)\r\n"
        "LANGUAGE LANG_SPANISH, SUBLANG_SPANISH\r\n"
        "#pragma code_page(1252)\r\n"
        "#include ""res\\DvdAt.rc2""  // ressources non modifiées par Microsoft Visual C++ \r\n"
        "#include ""1.esp\\afxres.rc""         // Composants standard\r\n"
        "#endif\0"
    END
     
    #endif    // APSTUDIO_INVOKED
     
    #endif    // Français (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_ESP) 
    #ifdef _WIN32 
    LANGUAGE LANG_SPANISH, SUBLANG_SPANISH 
    #pragma code_page(1252) 
    #endif //_WIN32 
    #include "l.esp\afxres.rc"          
    #endif 
     
    /////////////////////////////////////////////////////////////////////////////
    #endif    // not APSTUDIO_INVOKED

  10. #10
    mat.M
    Invité(e)
    Par défaut
    A moins de preuve du contraire , ce n'est pas possible
    CFIleDialog c'est STANDARD !


    >>CFileDialog relies on the COMMDLG.DLL file that ships with Windows >>versions 3.1 and later.

    Tu peux jeter un coup d'oeil avec points d'arrêt sur le code de CFileDialog pour voir si les ressources sont bien prises en compte ( fichier dlgfile.cpp source des MFC )






    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
     
    CFileDialog::CFileDialog(BOOL bOpenFileDialog,
    	LPCTSTR lpszDefExt, LPCTSTR lpszFileName, DWORD dwFlags,
    	LPCTSTR lpszFilter, CWnd* pParentWnd) : CCommonDialog(pParentWnd)
    {
    	memset(&m_ofn, 0, sizeof(m_ofn)); // initialize structure to 0/NULL
    	m_szFileName[0] = '\0';
    	m_szFileTitle[0] = '\0';
    	m_pofnTemp = NULL;
     
    	m_bOpenFileDialog = bOpenFileDialog;
    	m_nIDHelp = bOpenFileDialog ? AFX_IDD_FILEOPEN : AFX_IDD_FILESAVE;
     
    	m_ofn.lStructSize = sizeof(m_ofn);
    	m_ofn.lpstrFile = m_szFileName;
    	m_ofn.nMaxFile = _countof(m_szFileName);
    	m_ofn.lpstrDefExt = lpszDefExt;
    	m_ofn.lpstrFileTitle = (LPTSTR)m_szFileTitle;
    	m_ofn.nMaxFileTitle = _countof(m_szFileTitle);
    	m_ofn.Flags |= dwFlags | OFN_ENABLEHOOK | OFN_ENABLESIZING;
    	if (!afxData.bWin4 && AfxHelpEnabled())
    		m_ofn.Flags |= OFN_SHOWHELP;
    	if (afxData.bWin4)
    	{
    		m_ofn.Flags |= OFN_EXPLORER;
    		m_ofn.hInstance = AfxGetResourceHandle();
    	}
    	m_ofn.lpfnHook = (COMMDLGPROC)_AfxCommDlgProc;
     
    	// setup initial file name
    	if (lpszFileName != NULL)
    		lstrcpyn(m_szFileName, lpszFileName, _countof(m_szFileName));
     
    	// Translate filter into commdlg format (lots of \0)
    	if (lpszFilter != NULL)
    	{
    		m_strFilter = lpszFilter;
    		LPTSTR pch = m_strFilter.GetBuffer(0); // modify the buffer in place
    		// MFC delimits with '|' not '\0'
    		while ((pch = _tcschr(pch, '|')) != NULL)
    			*pch++ = '\0';
    		m_ofn.lpstrFilter = m_strFilter;
    		// do not call ReleaseBuffer() since the string contains '\0' characters
    	}
    }

  11. #11
    liv
    liv est déconnecté
    Membre du Club
    Profil pro
    Inscrit en
    Novembre 2003
    Messages
    124
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2003
    Messages : 124
    Points : 41
    Points
    41
    Par défaut
    Effectivement...j'ai beau faire toutes les manips possibles et imaginables, rien ni fait.
    C'est bisarre quand même car il y a pas mal de doc sur les MSDN sur ce sujet...mais rien de bien explicite.

    Je pense que c'est possible mais je ne sais pas comment.
    Peut-être que Farscape a la solution car il a fait pas mal de chose la dessus.

  12. #12
    mat.M
    Invité(e)
    Par défaut
    Citation Envoyé par liv
    Effectivement...j'ai beau faire toutes les manips possibles et imaginables, rien ni fait.
    C'est bisarre quand même car il y a pas mal de doc sur les MSDN sur ce sujet...mais rien de bien explicite.

    Je pense que c'est possible mais je ne sais pas comment.
    Peut-être que Farscape a la solution car il a fait pas mal de chose la dessus.
    Non je ne crois pas que ce soit possible !
    Si l'OS est en japonais ,comdlg32.dll sera en japonais
    Si l'OS est en chinois , comdlg32.dll...
    Si l'OS est en français..

    Résultat des courses , il faut mettre les mains dans le cambouis et créer sa propre classe..

  13. #13
    mat.M
    Invité(e)
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
    #ifdef _WIN32
    LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
    #pragma code_page(1252)
    #endif //_WIN32
    Ce code là par exemple à mon sens ne sert qu'EXCLUSIVEMENT pour AppWizard sous VC6 ou l'assistant de VC7 donc à générer des barres de menus en espagnol ou allemand pour une appli SDI par exemple.
    Mais en aucun cas cela ne peut changer ce qui est contenu dans comdlg32.dll
    qui contient CFileDialog ( enfin cette classe n'est pas contenue dans cette dll mais plutôt la contrepartie win32 GetOpenFileName )
    [/quote]

  14. #14
    Rédacteur
    Avatar de farscape
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Novembre 2003
    Messages
    9 055
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Novembre 2003
    Messages : 9 055
    Points : 17 323
    Points
    17 323
    Par défaut
    salut,
    si c'est acceptable tu peux faire ça:
    faire une classe derivée de CFileDialog et changer a la volée les valeurs par des SetWindowText.
    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
     
    BOOL CMyFileDialog::OnInitDialog() 
    {
        CFileDialog::OnInitDialog();
     
        // TODO: Add extra initialization here
        CString str;
        CWnd *pWnd=this; 
        char sz[256]; 
        bool bFirst=true;
        while(pWnd=pWnd->GetWindow(bFirst?GW_HWNDFIRST:GW_HWNDNEXT))
        {
            bFirst=false;
            if(GetClassName(pWnd->GetSafeHwnd(),sz,sizeof(sz)))
            {            
                pWnd->GetWindowText(str);
                TRACE("\nclass:%s texte:%s- %u",sz,(const char *)str,pWnd->GetDlgCtrlID());            
                switch(pWnd->GetDlgCtrlID())
                {
                case 1:    str="Open";
                        break;
                case 2:str="Cancel";
                        break;
                case 1038:str="Help";
                        break;
     
                case 1040:str="Open in Read Only :";
                          break;
                case 1089:str="File Type :";
                          break;
                case 1090:str="File Name :";
                          break;
                case 1091:str="Look In :";
                          break;
     
                }
                pWnd->SetWindowText(str);
            }  
        }
     
    /*
    class:Static texte:Fichiers de &type :- 1089
    class:Button texte:Ouvrir en le&cture seule- 1040
    class:Button texte:&Ouvrir- 1
    class:Button texte:Annuler- 2
    class:Button texte:&Aide- 1038
    */
        return TRUE;  // return TRUE unless you set the focus to a control
                      // EXCEPTION: OCX Property Pages should return FALSE
    }
    note: un petit détail quand même ,
    logiquement quand tu distribus un programme avec le support de la langue ,ça suppose que la personne selectionne la langue de son pays ,et dans ce cas les boites de dialogues standards apparaissent dans la langue d'installation de l'os ....
    ce probleme ne devrait pas en etre un .

  15. #15
    liv
    liv est déconnecté
    Membre du Club
    Profil pro
    Inscrit en
    Novembre 2003
    Messages
    124
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2003
    Messages : 124
    Points : 41
    Points
    41
    Par défaut
    Répose à ta note
    Je suis bien d'accords avec toi...mais place toi dans le cadre de la pédagogie. Tu distribues ton application sur des formations en langues par exemple, où tu as des étrangers qui l'utilisent. C'est ce que vise mon application en tous cas...et là je suis bien obligé de tout traduire. Pas possible d'y réchapper.
    D'un autre point de vue...si on décide de traduire un soft autant tout faire.

    Je vais essayer de faire comme vous dîtes.

  16. #16
    liv
    liv est déconnecté
    Membre du Club
    Profil pro
    Inscrit en
    Novembre 2003
    Messages
    124
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2003
    Messages : 124
    Points : 41
    Points
    41
    Par défaut
    Je te remercie farscape...ça marche très bien comme cela.
    Finalement c'est souvent avec les moyens les plus simples que l'on réussit le mieux.

  17. #17
    mat.M
    Invité(e)
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
     
     switch(pWnd->GetDlgCtrlID())
             {
                     case 1040:str="Open in Read Only :";
    }
    Est-ce qu'on a la certitude que cela fonctionne sur un autre OS ne serait-ce qu"en Espagnol ?

    Et quid de 98 , NT4, XP ??
    Est ce que l'ID du contrôle vaut tjs 1040 ?????
    Faut vraiment faire la vérif sinon il ya des supprises à l'arrivée.
    Et si les ID de comdlg32.dlll changent , que les gens de M$ décident de les changer ???

  18. #18
    Rédacteur
    Avatar de farscape
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Novembre 2003
    Messages
    9 055
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Novembre 2003
    Messages : 9 055
    Points : 17 323
    Points
    17 323
    Par défaut
    non je n'en ai pas la certitude ,le test a ete fait sous xp.
    suggestions:
    - on peut faire le test eventuellement sur la valeur de texte trouvée pour le changement.
    - on peut aussi verifier avec les differentes plateformes existantes en testant la version de l'os et reagir en consequences. (si il y a differences)
    la seule certidude c'est que l'id 1 et 2 sera toujours la .


  19. #19
    liv
    liv est déconnecté
    Membre du Club
    Profil pro
    Inscrit en
    Novembre 2003
    Messages
    124
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2003
    Messages : 124
    Points : 41
    Points
    41
    Par défaut
    Je pense que je vais faire des tests sur le texte...c'est plus sûr.
    En tous cas sous Win 2000 c'est la même chose que sous XP. Les ID sont les mêmes.

  20. #20
    Rédacteur
    Avatar de farscape
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Novembre 2003
    Messages
    9 055
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Novembre 2003
    Messages : 9 055
    Points : 17 323
    Points
    17 323
    Par défaut
    je vais quand me faire le test sur les OS suivants:
    XP - 2000 c'est deja ok .
    95/98
    Me j'ai pas (plus)
    NT4.
    2003
    .
    Parce que le test du texte c'est pas terrible quand même .

+ Répondre à la discussion
Cette discussion est résolue.
Page 1 sur 2 12 DernièreDernière

Discussions similaires

  1. Réponses: 2
    Dernier message: 06/06/2008, 13h39
  2. Choix de la langue de developpement pour un projet national: toujours l'anglais?
    Par firaponte dans le forum Débats sur le développement - Le Best Of
    Réponses: 11
    Dernier message: 23/08/2007, 15h28
  3. package ambiguïté pour des classes de même nom
    Par soad dans le forum Langage
    Réponses: 2
    Dernier message: 10/06/2004, 19h25
  4. Choix d'un EDI pour la 3D (Open GL, Portable)
    Par Riko dans le forum OpenGL
    Réponses: 6
    Dernier message: 01/08/2002, 12h25
  5. String Grid et choix d'une couleur pour une ligne
    Par Gigottine dans le forum C++Builder
    Réponses: 12
    Dernier message: 17/05/2002, 15h23

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