OVH Cloud OVH Cloud

A propos de ma procedure

1 réponse
Avatar
Gilles
Bonjour,

j'ai un petit soucis, ma commande SetWindowText(lblhWnd1, "Source du fichier
Eml"); ne fonctionne pas dans WM_CREATE

/* This function is called by the Windows function DispatchMessage( ) */
LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam,
LPARAM lParam)
{
switch (message)
/* handle the messages */
{
case WM_CREATE:
SetWindowText(lblhWnd1, "Source du fichier Eml");
break;

mais si je le mets dans :

case WM_COMMAND: /*
Commande du menu principal */
switch(wParam)
{
case IDM_FICHIER_OUVRIR:
SetWindowText(lblhWnd1, "Source du fichier
Eml");

Ca marche, je comprends pas pourquoi ?

Gilles

1 réponse

Avatar
Bruno Desthuilliers
Gilles wrote:
Bonjour,

j'ai un petit soucis, ma commande SetWindowText(lblhWnd1, "Source du fichier
Eml"); ne fonctionne pas dans WM_CREATE

/* This function is called by the Windows function DispatchMessage( ) */
LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam,
LPARAM lParam)
{
switch (message)
/* handle the messages */
{
case WM_CREATE:
SetWindowText(lblhWnd1, "Source du fichier Eml");
break;

mais si je le mets dans :

case WM_COMMAND: /*
Commande du menu principal */
switch(wParam)
{
case IDM_FICHIER_OUVRIR:
SetWindowText(lblhWnd1, "Source du fichier
Eml");

Ca marche, je comprends pas pourquoi ?


Honnêtement, nous non plus.

Ton code est du C (pas ++) non standard tel que l'affectionne l'API
Windows. Le fait qu'il y a 'C++' dans le nom de l'environnement de
développement ne signifie pas automatiquement qu'il faille poster ici
pour tout ce qui le concerne.

Tu auras probablement de meilleurs réponses chez ceux qui savent :
fr.comp.os.ms-windows.programmation

Bruno