Bonjour,
Je suis en train de développer une petite appli, et j'ai une erreur en compil ...
N'ayant pas programmé avec Visual C++ depuis un moment, j'ai besoin de votre aide car je ne vois pas où peut se trouver l'erreur ...
De plus, récement, j'ai refait mon PC, alors me manquerait il une Lib, une Include ou encore une mauvaise version de quelque chose ???
Si quelqu'un peut m'aiguiller ...
Merci d'avance
Voilà le message
Code : Sélectionner tout - Visualiser dans une fenêtre à part warning C4113: 'int (__stdcall *)()' differs in parameter lists from 'long (__stdcall *)(struct HWND__ *,unsigned int ,unsigned int ,long )'
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 BOOL CALLBACK CreaDlgProc (HWND hDlg, UINT message, UINT wParam, LONG lParam) { static COLORREF RGB1 = RGB(242, 185, 185); static COLORREF RGB3 = RGB (255, 255, 255); static HBRUSH hBrush1; static HBRUSH hBrush3; switch (message) { case WM_INITDIALOG: hBrush1 = CreateSolidBrush (RGB1); hBrush3 = CreateSolidBrush (RGB3); hPaint = CreateWindowEx(WS_EX_CLIENTEDGE, "static", "", WS_CHILD | WS_VISIBLE, 46, 98, 260, 150, hDlg, (HMENU)1, hInst, NULL); lpfnOldWndProc1 = (FARPROC)SetWindowLong(hPaint, GWL_WNDPROC, (DWORD) PaintProcedure); return TRUE ; case WM_CTLCOLORDLG : case WM_CTLCOLORSTATIC : SetBkColor ((HDC)wParam, RGB1); return ((DWORD) hBrush1); case WM_COMMAND: switch (wParam) { case IDOK: DeleteObject (hBrush1); DeleteObject (hBrush3); EndDialog (hDlg, 0) ; return TRUE ; case IDCANCEL: DeleteObject (hBrush1); DeleteObject (hBrush3); EndDialog (hDlg, 0) ; return TRUE ; } break ; } return FALSE ; }
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 LRESULT CALLBACK PaintProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { RECT rect; PAINTSTRUCT ps; static HDC hdc; static char szText[50]; static COLORREF RGB3 = RGB (255, 255, 255); switch (message) { case WM_CREATE: return 0; case WM_PAINT: hdc = BeginPaint(hwnd, &ps); strcpy(szText, "**** test ****"); GetClientRect(hwnd,&rect); SetBkColor(hdc,RGB3); DrawText(hdc,szText,strlen(szText),&rect,DT_CENTER); EndPaint (hwnd, &ps); return 0; } return CallWindowProc(lpfnOldWndProc1, hwnd, message, wParam, lParam); }
Partager