Salut, comme vous pouvez le voir, c'est une question qui à déjà été poster plusieurs fois, mais jamais de la même façons...

Voilà, j'ai 13 ans et j'aimerais faire le programme que j'ai creer à 12 ans dans un API Win32. J'ai lu le tuto qu'il y'a sur le site, mais vraiment, je ne sais pas si ce script c'est du C ou du C++. Et en plus, je ne sais vraiment pas où mettre mon code C dedans...
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
 
#include <windows.h>
 
 
LRESULT CALLBACK MainWndProc(HWND, UINT, WPARAM, LPARAM);
 
int WINAPI WinMain(HINSTANCE hinstance, HINSTANCE hPrevInstance,
                                                LPSTR lpCmdLine, int nCmdShow)
{
    HWND hwnd;
    MSG msg;
    WNDCLASS wc;
 
    wc.style = 0;
    wc.lpfnWndProc = MainWndProc;
    wc.cbClsExtra = 0;
    wc.cbWndExtra = 0;
    wc.hInstance = NULL;
    wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
    wc.hCursor = LoadCursor(NULL, IDC_ARROW);
    wc.hbrBackground = (HBRUSH)(1 + COLOR_BTNFACE);
    wc.lpszMenuName =  NULL;
    wc.lpszClassName = "MaWinClass";
 
    if(!RegisterClass(&wc)) return FALSE;
 
    hwnd = CreateWindow("MaWinClass", "Titre", WS_OVERLAPPEDWINDOW,
                                   CW_USEDEFAULT, CW_USEDEFAULT, 400, 300,
                                                   NULL, NULL, hinstance, NULL);
    if (!hwnd) return FALSE;
 
    ShowWindow(hwnd, nCmdShow);
    UpdateWindow(hwnd);
 
 
    while (GetMessage(&msg, NULL, 0, 0))
    {
        TranslateMessage(&msg);
        DispatchMessage(&msg);
    }
    return msg.wParam;
}
/******************************************************************************/
 
LRESULT CALLBACK MainWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
    switch (uMsg)
    {
        case WM_CREATE:
 
            return 0;
 
        case WM_DESTROY:
            PostQuitMessage(0);
            return 0;
 
        default:
            return DefWindowProc(hwnd, uMsg, wParam, lParam);
    }
}
J'utilise C++ Borland et à ce qu'il paraît, il y'aurait une fonction dans C++ Builder (un bouton qui se trouve quelque part dans le programme) qui permetterait de faire directement après avoir appuyer sur le bouton, une fenêtre Windows.

PS : Encore une questions, après avoir mis le code plus haut dans une page. Qu'est ce que je dois faire après?



Merci