Les deux fenêtre destinées aux joueurs

#include <windows.h>

#define LONG_FENETRE 300
#define HAUT_FENETRE 300

LRESULT CALLBACK MsgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam )
{
return DefWindowProc( hWnd, msg, wParam, lParam );
}

INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR, INT )
{
// Enregistre la classe de la fenêtre
WNDCLASSEX wc = {
sizeof(WNDCLASSEX),
CS_CLASSDC, MsgProc,
0L, 0L,
GetModuleHandle(NULL),
NULL, NULL, NULL, NULL,
"SuperBattle", NULL };

RegisterClassEx( &wc );

// Création de la fenêtre d'application mère
HWND hWnd = CreateWindow(
"Superbattle", "Superbattle",
WS_OVERLAPPEDWINDOW,
100, 100, LONG_FENETRE, HAUT_FENETRE * 2,
GetDesktopWindow(),
NULL, wc.hInstance, NULL );


//Création des fenêtres filles
HWND hCtrl_1 = CreateWindow("EDIT", "", WS_CHILD|WS_VISIBLE, 0, 0, LONG_FENETRE, HAUT_FENETRE, hWnd, NULL, hInst, NULL);

HWND hCtrl_2 = CreateWindow("EDIT", "", WS_CHILD|WS_VISIBLE, 0, HAUT_FENETRE + 1, LONG_FENETRE, HAUT_FENETRE, hWnd, NULL, hInst, NULL);


ShowWindow(hWnd, SW_SHOWDEFAULT);
UpdateWindow(hWnd);

MSG msg;
ZeroMemory( &msg, sizeof(msg) );

while( msg.message!=WM_QUIT )
if( PeekMessage( &msg, NULL, 0U, 0U, PM_REMOVE ) )
{
TranslateMessage( &msg );
DispatchMessage( &msg );
}

UnregisterClass("Superbattle", wc.hInstance);
return 0;
}

Ensuite on crée deux sous fenêtres filles à partir de WS_CHILD, l'une placée aux coordonnées (0,0) et l'autre aux coordonnées (0, 301). Ces deux fenêtres sont liées à la fenêtre mère grâce au pointeur hWnd.

Téléchargez la source, cliquez ci-dessous :