ElectricalMan
Messages postés39Date d'inscriptionsamedi 20 mars 2004StatutMembreDernière intervention 5 novembre 2008
-
30 oct. 2008 à 11:55
lectpe
Messages postés162Date d'inscriptionlundi 12 novembre 2007StatutMembreDernière intervention17 juillet 2010
-
20 août 2009 à 15:08
Bjr, J'ai l'impression que j'ai un probleme avec CreateWindow, car je n'arrive pas à afficher dans la fenêtre principale un objet "edit", "bouton" et autres.
J'ai tout essayé, y'a rien qui s'affiche :(
Avez vous des suggestions ?!
Merci d'avance.
HWND boutim;
HBITMAP hBmp;
HWND hWndEdit;
HANDLE hImg;
...
case WM_CREATE:
//hBmp = LoadBitmap(hInst,(LPCWSTR)"IDB_BITMAP1");
/*hWndEdit = CreateWindow((LPCWSTR)"EDIT", // We are creating an Edit control
NULL, // Leave the control empty
WS_CHILD | WS_VISIBLE | WS_HSCROLL |
WS_VSCROLL | ES_LEFT | ES_MULTILINE |
ES_AUTOHSCROLL | ES_AUTOVSCROLL,
0, 0, 0, 0, // Let the WM_SIZE messge below take care of the size
hWnd,
0,
hInst,
NULL);*/
break
;
/*case WM_SETFOCUS:
SetFocus(hWndEdit);
break;
case WM_SIZE:
MoveWindow(hWndEdit, 0, 0, LOWORD(lParam), HIWORD(lParam), TRUE);
break;*/
lectpe
Messages postés162Date d'inscriptionlundi 12 novembre 2007StatutMembreDernière intervention17 juillet 20103 20 août 2009 à 15:08
Bonjour.
Bah déjà, tu crées un champ avec comme dimensions 0x0 que tu redimensionnes à la bonne taille dans le WM_SIZE.
Là, tu y a mis en commentaires. Je ne sais pas si c'est la même chose dans ton programme, mais si c'est le cas, enlèves juste les /* et */ de commentaires.