Bonjour !
J'ai installé le Microsoft Platform SDK comme dans cet article : http://arb.developpez.com/vc++/express/ . J'ai configuré Visual C++ Express comme dit dans cet article, seulement, quand je compile ce code :

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
#include <windows.h>
 
 
LRESULT CALLBACK MainProc(HWND Dlg,UINT message,WPARAM wParam,LPARAM lParam);
 
 
int APIENTRY WinMain(HINSTANCE hInstance,
                 HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow)
{
WNDCLASSEX principale;
   principale.cbSize=sizeof(WNDCLASSEX);
   principale.style=CS_HREDRAW|CS_VREDRAW;
   principale.lpfnWndProc=MainProc;
   principale.cbClsExtra=0;
   principale.cbWndExtra=0;
   principale.hInstance=hInstance;
   principale.hIcon=LoadIcon(NULL,IDI_APPLICATION);
   principale.hCursor=LoadCursor(NULL,IDC_ARROW);
   principale.hbrBackground=reinterpret_cast<HBRUSH>(COLOR_WINDOW+1);
   principale.lpszMenuName=NULL;
   principale.lpszClassName="std";
   principale.hIconSm=LoadIcon(NULL,IDI_APPLICATION);
   RegisterClassEx(&principale);
   HWND hWnd;
   hWnd=CreateWindowEx(
      WS_EX_CLIENTEDGE,
      "std",
      "Notre fenêtre",
      WS_OVERLAPPEDWINDOW,
      CW_USEDEFAULT,
      CW_USEDEFAULT,
      CW_USEDEFAULT,
      CW_USEDEFAULT,
      NULL,
      NULL,
      hInstance,
      NULL
   );
 
   ShowWindow(hWnd,SW_SHOW);
MSG msg;
   while(GetMessage(&msg,NULL,0,0)==TRUE)
   {
      TranslateMessage(&msg);
      DispatchMessage(&msg);
   }
   return 0;
}
LRESULT CALLBACK MainProc(HWND hWnd, UINT mes, WPARAM wParam, LPARAM lParam)
{
   HDC hDC;
   PAINTSTRUCT paintst;
   switch (mes)
   {
   case WM_PAINT:
      hDC=BeginPaint(hWnd,&paintst);
      EndPaint(hWnd,&paintst);
      return 0;
   case WM_DESTROY:
      PostQuitMessage(0);
      return 0;
   default:
      return DefWindowProc(hWnd, mes, wParam, lParam);
   }
}
Je me retrouve avec cet erreur :
c:\documents and settings\fab 22\mes documents\visual studio 2005\projects\testw2\testw2\source1.cpp(23) : error C2440: '=' : cannot convert from 'const char [4]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\documents and settings\fab 22\mes documents\visual studio 2005\projects\testw2\testw2\source1.cpp(40) : error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const char [4]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>Build log was saved at "file://c:\Documents and Settings\Fab 22\Mes documents\Visual Studio 2005\Projects\TestW2\TestW2\Debug\BuildLog.htm"
1>TestW2 - 2 error(s), 0 warning(s)
========== Génération*: 0 a réussi, 1 a échoué, 0 mis à jour, 0 a été ignoré ==========
.

J'essaye avec un autre code Win32, mêmes erreurs.

Est ce que ça vous est arrivé ? Moi, je n'arrive pas à compiler du Win32 malgré l'installation du Platform SDK ...
Avez vous une solution ?

Merci d'avance