RAD for C just in API ??
Posted: Thu Jan 01, 2015 11:39 am
Hello at all
First, i wish you all and obviously PB a happy new year
Numerous big code for you (and if it's sharing it's better for KCC
) and several new features for the new version of PB 
I search a RAD like PB for generate windows and gadget but in C (Not C++)
Furthermore without ressources, just in code (Like PB what)
I have tried several things, but or it's Widget or it's with ressource
What i search it's a RAD who generate a style of code like thatAt my mind that not exist....but it's again a little bit christmas time ..no ????
Have a good day
First, i wish you all and obviously PB a happy new year
Numerous big code for you (and if it's sharing it's better for KCC
I search a RAD like PB for generate windows and gadget but in C (Not C++)
Furthermore without ressources, just in code (Like PB what)
I have tried several things, but or it's Widget or it's with ressource
What i search it's a RAD who generate a style of code like that
Code: Select all
#include <windows.h> // windows header file
// function prototypes
LRESULT APIENTRY CallBackWindows(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
// Application Instance Handle
HINSTANCE g_hInst;
// using _stdcall the winmain entry
int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR line, int CmdShow)
{
g_hInst = hInst;
MSG msg;
HWND HwndFenetre;
WNDCLASS wc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = g_hInst;
wc.hbrBackground = (HBRUSH)(COLOR_WINDOW);
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wc.hCursor = LoadCursor(NULL,IDC_ARROW);
wc.lpszClassName = "Fenetre";
wc.lpszMenuName = NULL;
wc.style = CS_HREDRAW|CS_VREDRAW;
wc.lpfnWndProc = (WNDPROC) CallBackWindows;
RegisterClass(&wc);
HwndFenetre = CreateWindow("Fenetre", Titre, WS_OVERLAPPEDWINDOW, 0, 0, 640, 480, 0, 0, g_hInst, 0);
ShowWindow(HwndFenetre, SW_SHOW);
UpdateWindow(HwndFenetre);
while(GetMessage(&msg, 0, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
}
// function def's
LRESULT APIENTRY CallBackWindows(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
...........
return 0;
}Have a good day





