Simple customized window.

Simple customized window.

DialogBox

See version :

Pas de dépendances

Download :

Plusieurs fichiers :
04_12_01_simpledialog.c
04_12_01_resource.h
04_12_01_resource.rc


04_12_01_simpledialog.c

#include <windows.h> #include <commctrl.h> #include "04_12_01_resource.h" #pragma comment(lib,"comctl32.lib") //--------------------------------------------------------------------- INT_PTR CALLBACK DlgFenetre(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) { switch(msg) { case WM_CLOSE: EndDialog(hDlg, 0); return TRUE; } return FALSE; } int main() { int ret; InitCommonControls(); ret = DialogBox(0, MAKEINTRESOURCE(IDD_FENETRE), 0, DlgFenetre); return 0; }


04_12_01_resource.h

#define IDD_FENETRE 100


04_12_01_resource.rc

#include <windows.h> #include "04_12_01_resource.h" IDD_FENETRE DIALOG 100, 100, 50, 45 STYLE DS_MODALFRAME|WS_VISIBLE|WS_CAPTION|WS_SYSMENU CAPTION "Titre" FONT 8, "Helv" BEGIN LTEXT "Plouf", -1, 10, 10, 50, 40 END END


Explanations

	No explanations yet.