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

Windows Discussion :

changer la font d'une fenetre enfant-enfant


Sujet :

Windows

  1. #1
    Membre à l'essai
    Homme Profil pro
    Étudiant
    Inscrit en
    Août 2015
    Messages
    41
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val d'Oise (Île de France)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Août 2015
    Messages : 41
    Points : 22
    Points
    22
    Par défaut changer la font d'une fenetre enfant-enfant
    Hello,

    j'essaie de changer la font d'une fenetre enfant (enfant d'une fenetre deja enfant de la fenetre principale). Seulement le changement n'est pas pris en compte et la font reste celle par defaut.

    je procede comme suit:

    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
    //creating the fonts objects
    hFont = CreateFont(16, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, ANSI_CHARSET,
    			OUT_TT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
    			DEFAULT_PITCH | FF_DONTCARE, TEXT("Tahoma"));
    hFontBold = CreateFont(14, 0, 0, 0, FW_SEMIBOLD, FALSE, FALSE, FALSE, ANSI_CHARSET,
    			OUT_TT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
    			DEFAULT_PITCH | FF_DONTCARE, TEXT("Tahoma"));
    
    
    
    /////////////////////
    /////////////////////
    
    GroupBox4_2 = CreateWindow("BUTTON", "RS", WS_CHILD | WS_VISIBLE | BS_GROUPBOX, 285, 45, 626, 442, hWnd, 0, 0, 0);
    
    wpOldGroupBox4_2Proc = (WNDPROC)SetWindowLongPtr(GroupBox4_2, GWLP_WNDPROC, (LONG_PTR)CustomGroupBox4_2Proc);
    
    SendMessage(GroupBox4_2, WM_SETFONT, (WPARAM)hFontBold, TRUE);
    
    
    GroupBox5 = CreateWindow("BUTTON", "SS", WS_CHILD | WS_VISIBLE | BS_GROUPBOX, 560, 35, 260, 120, GroupBox4_2, 0, 0, 0);
    
    SendMessage(GroupBox5, WM_SETFONT, (WPARAM)hFontBold, TRUE);
    Ca marche pour la GroupBox4_2 mais pas pour la GroupBox5.
    Si je declare la GroupBox5 enfant de hWnd (main window) ca fonctionne.
    Si je ne declare pas de changement pour GroupBox5, en esperant que les changement sur GroupBox4_2 se repercutent sur la fenetre enfant (je crois comprendre que ca devrait etre la bonne facon de faire), pas de resultat non plus.


    Quelq'un peut il me dire ce qui m'echappe ?


    Merci d'avance

  2. #2
    Membre confirmé
    Homme Profil pro
    .
    Inscrit en
    Juin 2002
    Messages
    239
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : .
    Secteur : Enseignement

    Informations forums :
    Inscription : Juin 2002
    Messages : 239
    Points : 567
    Points
    567
    Par défaut
    Bonjour.

    Je ne sais pas si cela a un lien avec le problème de fonte, mais la fenêtre GroupBox5 ne rentre pas dans la fenêtre GroupBox4_2.

    La fenêtre GroupBox4_2 a une largeur de 626.

    La fenêtre GroupBox5 commence à la position horizontale 560 de GroupBox4_2 et a une longueur de 120 ;
    comme 560 + 120 est supérieur à 626, une partie de GroupBox5 n'est pas affichée ...

  3. #3
    Membre à l'essai
    Homme Profil pro
    Étudiant
    Inscrit en
    Août 2015
    Messages
    41
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val d'Oise (Île de France)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Août 2015
    Messages : 41
    Points : 22
    Points
    22
    Par défaut
    Cest vrai. Mais je modifie la taille de la groupbox au premier affichage donc les deux parametres de taille que je donne ici nont aucun impact.

    Jai tout de meme fait quelques tests en retirant la modification de taille tout en initialisant la groupbox avec les bons parametres pour afficher la fenetre enfant et cela ne change rien a mon probleme..

    Merci tout de meme.
    Personne na d autres pistes a me donner ? Jimagine que le probleme nest effectivement pas dans les deux lignes que je donne ici mais je nai aucune idee dou chercher.

  4. #4
    Membre à l'essai
    Homme Profil pro
    Étudiant
    Inscrit en
    Août 2015
    Messages
    41
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val d'Oise (Île de France)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Août 2015
    Messages : 41
    Points : 22
    Points
    22
    Par défaut
    j'utilise ces 3 lignes , (que j'avoue ne pas tres bien comprendre) pour pouvoir redessiner certains controles de ma fenetre manuellement via le message NM_CUSTOMDRAW.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    #pragma comment(linker,"\"/manifestdependency:type='win32' \
    name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \
    processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
    si je les retire je n'ai plus aucun probleme concernant mes changements de police.

    j'ai fait quelques recherches sur internet mais ce n'est toujours pas clair pour moi. Que font ces 3 lignes exactement ? Comment dois je les modifer pour pouvoir continuer a modifier mes controles et changer la police de mes fenetres?

  5. #5
    Expert éminent sénior
    Avatar de Médinoc
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Septembre 2005
    Messages
    27 369
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France

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

    Informations forums :
    Inscription : Septembre 2005
    Messages : 27 369
    Points : 41 519
    Points
    41 519
    Par défaut
    En fait, c'est une seule ligne, qui dit à Windows de charger la "nouvelle" (enfin, nouvelle du temps de Windows XP) version de ComCtl32.dll (la bibliothèque contenant les contrôles, dont la GroupBox) pour bénéficier du "style XP" plutôt que l'ancien style.

    PS: J'ai vu que l'une de tes deux GroupBox est subclassée (et avec la vieille méthode, plutôt que SetWindowSubclass()). Cela peut avoir une influence, peut-être? Que fait CustomGroupBox4_2Proc?
    SVP, pas de questions techniques par MP. Surtout si je ne vous ai jamais parlé avant.

    "Aw, come on, who would be so stupid as to insert a cast to make an error go away without actually fixing the error?"
    Apparently everyone.
    -- Raymond Chen.
    Traduction obligatoire: "Oh, voyons, qui serait assez stupide pour mettre un cast pour faire disparaitre un message d'erreur sans vraiment corriger l'erreur?" - Apparemment, tout le monde. -- Raymond Chen.

  6. #6
    Expert éminent sénior
    Avatar de Médinoc
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Septembre 2005
    Messages
    27 369
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France

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

    Informations forums :
    Inscription : Septembre 2005
    Messages : 27 369
    Points : 41 519
    Points
    41 519
    Par défaut
    Vraiment bizarre. J'ai fait quelques tests pour cerner un peu mieux le problème, en partant du "scratch program" de Raymond Chen et en y ajoutant les groupboxes (ainsi qu'un arrière-plan bien visible et contrastant avec le reste), le tout dans un programme console pour pouvoir logguer des trucs:
    Code C : 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
    /*
    http://www.developpez.net/forums/d1596301/general-developpement/programmation-systeme/windows/changer-font-d-fenetre-enfant-enfant/
     
    */
    #define STRICT
    #include <windows.h>
    #include <windowsx.h>
    #include <ole2.h>
    #pragma warning(push)
    #pragma warning(disable: 4201)
    #include <commctrl.h>
    #include <shlwapi.h>
    #pragma warning(pop)
    #include <tchar.h>
    #pragma comment(lib, "comctl32.lib")
     
    HINSTANCE g_hinst;                          /* This application's HINSTANCE */
    HWND g_hwndChild;                           /* Optional child window */
     
    /*
     *	OnSize
     *		If we have an inner child, resize it to fit.
     */
    static void
    OnSize(HWND hwnd, UINT state, int cx, int cy)
    {
    	(void)hwnd, (void)state;
    	if(g_hwndChild) {
    		MoveWindow(g_hwndChild, 0, 0, cx, cy, TRUE);
    	}
    }
     
    /*
     *	OnCreate
     *		Applications will typically override this and maybe even
     *		create a child window.
     */
    static BOOL
    OnCreate(HWND hwnd, LPCREATESTRUCT lpcs)
    {
    	(void)hwnd, (void)lpcs;
    	return TRUE;
    }
     
    /*
     *	OnDestroy
     *		Post a quit message because our application is over when the
     *		user closes this window.
     */
    static void
    OnDestroy(HWND hwnd)
    {
    	(void)hwnd;
    	PostQuitMessage(0);
    }
     
    /*
     *	PaintContent
     *		Interesting things will be painted here eventually.
     */
    static void
    PaintContent(HWND hwnd, PAINTSTRUCT *pps)
    {
    	(void)hwnd, (void)pps;
    }
     
    /*
     *	OnPaint
     *		Paint the content as part of the paint cycle.
     */
    static void
    OnPaint(HWND hwnd)
    {
    	PAINTSTRUCT ps;
    	BeginPaint(hwnd, &ps);
    	PaintContent(hwnd, &ps);
    	EndPaint(hwnd, &ps);
    }
     
    /*
     *	OnPrintClient
     *		Paint the content as requested by USER.
     */
    static void
    OnPrintClient(HWND hwnd, HDC hdc)
    {
    	PAINTSTRUCT ps = {0}; /*Init ajoutée par Fred*/
    	ps.hdc = hdc;
    	GetClientRect(hwnd, &ps.rcPaint);
    	PaintContent(hwnd, &ps);
     
    }
     
    /*
     *	Window procedure
     */
    static LRESULT CALLBACK
    WndProc(HWND hwnd, UINT uiMsg, WPARAM wParam, LPARAM lParam)
    {
    	switch(uiMsg) {
     
    	HANDLE_MSG(hwnd, WM_CREATE, OnCreate);
    	HANDLE_MSG(hwnd, WM_SIZE, OnSize);
    	HANDLE_MSG(hwnd, WM_DESTROY, OnDestroy);
    	HANDLE_MSG(hwnd, WM_PAINT, OnPaint);
    	case WM_PRINTCLIENT: OnPrintClient(hwnd, (HDC)wParam); return 0;
    	}
     
    	return DefWindowProc(hwnd, uiMsg, wParam, lParam);
    }
     
    static BOOL
    InitApp(void)
    {
    	WNDCLASS wc = {0}; /*Init ajoutée par Fred*/
     
    	wc.style = 0;
    	wc.lpfnWndProc = WndProc;
    	wc.cbClsExtra = 0;
    	wc.cbWndExtra = 0;
    	wc.hInstance = g_hinst;
    	wc.hIcon = NULL;
    	wc.hCursor = LoadCursor(NULL, IDC_ARROW);
    	wc.hbrBackground = CreateSolidBrush(0x800080); //(HBRUSH)(INT_PTR)(COLOR_WINDOW + 1);
    	wc.lpszMenuName = NULL;
    	wc.lpszClassName = TEXT("Scratch"); /*Modif Fred:TCHAR*/
     
    	if(!RegisterClass(&wc)) return FALSE;
     
    	InitCommonControls();               /* In case we use a common control */
     
    	return TRUE;
    }
     
    #pragma region Window title functions
    BOOL IsAdmin(void)
    {
    	/*CheckTokenMembership:
    	http://msdn.microsoft.com/en-us/library/windows/desktop/aa376389%28v=vs.85%29.aspx */
    	BOOL bOK=FALSE;
    	BOOL bIsAdmin = FALSE;
    	SID_IDENTIFIER_AUTHORITY NtAuthority = SECURITY_NT_AUTHORITY;
    	PSID AdministratorsGroup = NULL;
    	bOK = AllocateAndInitializeSid(
    		&NtAuthority,
    		2,
    		SECURITY_BUILTIN_DOMAIN_RID,
    		DOMAIN_ALIAS_RID_ADMINS,
    		0, 0, 0, 0, 0, 0,
    		&AdministratorsGroup);
    	if(bOK)
    	{
    		if (!CheckTokenMembership(NULL, AdministratorsGroup, &bIsAdmin))
    		{
    			bIsAdmin = FALSE;
    		}
    		FreeSid(AdministratorsGroup);
    	}
    	return bIsAdmin;
    }
    LPTSTR MakeWindowName()
    {
    	TCHAR fileNameBuffer[32767+1]; /*Accept extra-long file paths.*/
    	DWORD nameLength = GetModuleFileName(NULL, fileNameBuffer, ARRAYSIZE(fileNameBuffer));
    	if(nameLength == 0 || nameLength==ARRAYSIZE(fileNameBuffer))
    		return NULL;
     
    	{
    		LPTSTR pLastBackslash = _tcsrchr(fileNameBuffer, _T('\\'));
    		LPTSTR pFileName = (pLastBackslash!=NULL) ? pLastBackslash+1 : fileNameBuffer;
    		LPTSTR pLastDot = _tcsrchr(pFileName, _T('.'));
    		if(pLastDot == NULL)
    			pLastDot = pFileName + _tcslen(pFileName);
    		*pLastDot = '\0'; /*Truncate.*/
    		{
    			LPCTSTR isAdminStr = IsAdmin() ? _T(" (Admin)") : _T("");
    			BOOL isScratch = CompareString(LOCALE_INVARIANT, NORM_IGNORECASE, pFileName, -1, _T("Scratch"), -1) == CSTR_EQUAL;
    			LPCTSTR fmt = isScratch ? _T("Raymond's %s program, upgraded%s") : _T("Scratch: %s%s");
    			size_t length = _sctprintf(fmt, pFileName, isAdminStr);
    			LPTSTR ret = (LPTSTR)calloc(length+1, sizeof(TCHAR)); /*Cast allows compiling in both C and C++*/
    			if(ret == NULL)
    				return NULL;
    			#ifdef _stprintf_s
    			_stprintf_s(ret, length+1, fmt, pFileName, isAdminStr);
    			#else
    			_sntprintf(ret, length+1, fmt, pFileName, isAdminStr);
    			ret[length] = _T('\0');
    			#endif
    			return ret;
    		}
    	}
    }
    #pragma endregion
     
    WNDPROC g_oldWndProc;
     
    LRESULT CALLBACK CustomGroupBox4_2Proc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
    {
    	switch(msg)
    	{
    	case WM_CTLCOLORSTATIC:
    		{
    			HDC hdc = (HDC)wParam;
    			LRESULT res;
    			_tprintf(_T("WM_CTLCOLORSTATIC(hdc=0x%p, hWnd=0x%p) [text=0x%08lX, bk=0x%08lX:%d, hFont=%p]"), wParam, lParam, GetTextColor(hdc), GetBkColor(hdc), GetBkMode(hdc), GetCurrentObject(hdc, OBJ_FONT));
     
    			res = CallWindowProc(g_oldWndProc, hWnd, msg, wParam, lParam);
    			_tprintf(_T("-->%08lX  [text=0x%08lX, bk=0x%08lX:%d, hFont=%p]\n"), res, GetTextColor(hdc), GetBkColor(hdc), GetBkMode(hdc), GetCurrentObject(hdc, OBJ_FONT));
    		}
    		break;
    	case WM_CTLCOLORBTN:
    		{
    			HDC hdc = (HDC)wParam;
    			LRESULT res;
    			_tprintf(_T("WM_CTLCOLORBTN(hdc=0x%p, hWnd=0x%p) [text=0x%08lX, bk=0x%08lX:%d, hFont=%p]"), wParam, lParam, GetTextColor(hdc), GetBkColor(hdc), GetBkMode(hdc), GetCurrentObject(hdc, OBJ_FONT));
     
    			res = CallWindowProc(g_oldWndProc, hWnd, msg, wParam, lParam);
    			_tprintf(_T("-->%08lX  [text=0x%08lX, bk=0x%08lX:%d, hFont=%p]\n"), res, GetTextColor(hdc), GetBkColor(hdc), GetBkMode(hdc), GetCurrentObject(hdc, OBJ_FONT));
    		}
    		break;
    	}
    	return CallWindowProc(g_oldWndProc, hWnd, msg, wParam, lParam);
    }
     
     
    EXTERN_C int WINAPI groupBoxes_WinMain(
     HINSTANCE hinst, HINSTANCE hinstPrev,
     LPSTR lpCmdLine, int nShowCmd
     )
    {
    	MSG msg;
    	HWND hwnd;
    	LPTSTR windowName = MakeWindowName();
     
    	(void)hinstPrev, (void)lpCmdLine;
    	g_hinst = hinst;
     
    	if(!InitApp()) return 0;
     
    	if(SUCCEEDED(CoInitialize(NULL))) {/* In case we use COM */
     
    		hwnd = CreateWindow(
    			TEXT("Scratch"),                /* Class Name (Modif Fred:TCHAR)*/
    			windowName,                /* Title */
    			WS_OVERLAPPEDWINDOW,            /* Style */
    			CW_USEDEFAULT, CW_USEDEFAULT,   /* Position */
    			CW_USEDEFAULT, CW_USEDEFAULT,   /* Size */
    			NULL,                           /* Parent */
    			NULL,                           /* No menu */
    			hinst,                          /* Instance */
    			0);                             /* No special parameters */
     
    		free(windowName), windowName=NULL;
    		ShowWindow(hwnd, nShowCmd);
     
    		{
    			//creating the fonts objects
    			HFONT hFont = CreateFont(16, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, ANSI_CHARSET,
    						OUT_TT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
    						DEFAULT_PITCH | FF_DONTCARE, TEXT("Tahoma"));
    			HFONT hFontBold = CreateFont(14, 0, 0, 0, FW_SEMIBOLD, FALSE, FALSE, FALSE, ANSI_CHARSET,
    						OUT_TT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
    						DEFAULT_PITCH | FF_DONTCARE, TEXT("Tahoma"));
     
     
     
    			/////////////////////
    			/////////////////////
     
    			HWND GroupBox4_2 = CreateWindow(TEXT("BUTTON"), TEXT("RS"), WS_CHILD | WS_VISIBLE | BS_GROUPBOX, 285, 45, 626, 442, hwnd, 0, 0, 0);
     
    			WNDPROC wpOldGroupBox4_2Proc = g_oldWndProc = (WNDPROC)SetWindowLongPtr(GroupBox4_2, GWLP_WNDPROC, (LONG_PTR)CustomGroupBox4_2Proc);
     
    			LRESULT res1 = SendMessage(GroupBox4_2, WM_SETFONT, (WPARAM)hFontBold, TRUE);
     
     
    			HWND GroupBox5 = CreateWindow(TEXT("BUTTON"), TEXT("SS"), WS_CHILD | WS_VISIBLE | BS_GROUPBOX, 560, 35, 260, 120, GroupBox4_2, 0, 0, 0);
     
    			LRESULT res2 = SendMessage(GroupBox5, WM_SETFONT, (WPARAM)hFontBold, TRUE);
     
    			_tprintf(_T("GroupBox4_2=%p, GroupBox5=%p, hFontBold=%p\n"), GroupBox4_2, GroupBox5, hFontBold);
     
    			(void)res2, (void)hFont, (void)res1;
    			(void)wpOldGroupBox4_2Proc;
    		}
     
     
     
    		while(GetMessage(&msg, NULL, 0, 0)) {
    			TranslateMessage(&msg);
    			DispatchMessage(&msg);
    		}
     
    		CoUninitialize();
    	}
     
    	return 0;
    }
    Code C : 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
    #define WIN32_LEAN_AND_MEAN
    #include <windows.h>
     
    //#pragma comment(linker,"\"/manifestdependency:type='win32' \
    //name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \
    //processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
    //
     
    EXTERN_C int WINAPI groupBoxes_WinMain(
     HINSTANCE hinst, HINSTANCE hinstPrev,
     LPSTR lpCmdLine, int nShowCmd
     );
     
    int main(void)
    {
    	return groupBoxes_WinMain(GetModuleHandle(NULL), NULL, "", SW_SHOWNORMAL);
    }
    D'après le test (sous Windows 10), le simple fait de subclasser (sans trifouiller les comportements de WM_CTLCOLORxxx ou WM_PAINT) ne suffit pas à causer le comportement observé. Et en fait, je n'ai pas vu de différences dans le comportement de WM_CTLCOLORSTATIC entre les deux versions:
    Code X : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    Avec Common Controls V6:
    
    GroupBox4_2=00000000000A0CEE, GroupBox5=0000000000080D7E, hFontBold=000000002B0A2AAB
    WM_CTLCOLORSTATIC(hdc=0x000000002E012DF3, hWnd=0x0000000000080D7E) [text=0x00000000, bk=0x00FFFFFF:2, hFont=00000000018A002E]-->01100059  [text=0x00000000, bk=0x00F0F0F0:2, hFont=00000000018A002E]
    WM_CTLCOLORSTATIC(hdc=0x000000002E012DF3, hWnd=0x0000000000080D7E) [text=0x00000000, bk=0x00FFFFFF:2, hFont=00000000018A002E]-->01100059  [text=0x00000000, bk=0x00F0F0F0:2, hFont=00000000018A002E]
    
    Sans Common Controls V6:
    
    GroupBox4_2=0000000000140D78, GroupBox5=00000000000A0D84, hFontBold=FFFFFFFFAF0A323D
    WM_CTLCOLORSTATIC(hdc=0x000000002E012DF3, hWnd=0x00000000000A0D84) [text=0x00000000, bk=0x00FFFFFF:2, hFont=00000000018A002E]-->01100059  [text=0x00000000, bk=0x00F0F0F0:2, hFont=00000000018A002E]
    WM_CTLCOLORSTATIC(hdc=0x000000006D0131D9, hWnd=0x00000000000A0D84) [text=0x00000000, bk=0x00FFFFFF:2, hFont=00000000018A002E]-->01100059  [text=0x00000000, bk=0x00F0F0F0:2, hFont=00000000018A002E]

    Donc je n'ai aucune explication sur pourquoi, quand les Common Controls V6 sont activés, celui de l'intérieur n'a pas la police grasse (ni l'arrière-plan transparent de son parent).
    Images attachées Images attachées  
    SVP, pas de questions techniques par MP. Surtout si je ne vous ai jamais parlé avant.

    "Aw, come on, who would be so stupid as to insert a cast to make an error go away without actually fixing the error?"
    Apparently everyone.
    -- Raymond Chen.
    Traduction obligatoire: "Oh, voyons, qui serait assez stupide pour mettre un cast pour faire disparaitre un message d'erreur sans vraiment corriger l'erreur?" - Apparemment, tout le monde. -- Raymond Chen.

  7. #7
    Membre à l'essai
    Homme Profil pro
    Étudiant
    Inscrit en
    Août 2015
    Messages
    41
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val d'Oise (Île de France)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Août 2015
    Messages : 41
    Points : 22
    Points
    22
    Par défaut
    salut, merci de la reponse.
    oui j'ai teste aussi, ton programme reproduit bien mon probleme...

    et il n'y a pas d'alternative aux Common Controls V6 pour pouvoir redessiner manuellement ses controles avec NM_CUSTOMDRAW ?

Discussions similaires

  1. WPF : Problème pour créer une fenetre parent/enfant simple
    Par Ranx62 dans le forum Windows Presentation Foundation
    Réponses: 2
    Dernier message: 01/04/2008, 02h39
  2. Changer la Font d'une ligne d'un CheckListBox
    Par kurul1 dans le forum C++Builder
    Réponses: 2
    Dernier message: 13/03/2007, 10h22
  3. comment changer la taille d'une fenetre html
    Par coelho dans le forum Général JavaScript
    Réponses: 4
    Dernier message: 28/12/2006, 12h48
  4. Changer la fonte pour une application
    Par Xavinou dans le forum Interfaces Graphiques en Java
    Réponses: 9
    Dernier message: 21/03/2006, 11h23
  5. changer class name d'une fenetre mfc
    Par pingfr dans le forum MFC
    Réponses: 2
    Dernier message: 11/07/2005, 13h38

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