Something like this should work, I haven't compiled it but this set of calls is what I use to push pixels with pure GDI.
#define ResX 256
#define ResY 192
int main(void) {
// required data
static int pixel[ResX*ResY];
static BITMAPINFO bmi = {sizeof(BITMAPINFOHEADER),ResX,ResY,1,32};
// window creation
HWND hWnd = CreateWindowExA(0,"edit",0,WS_POPUP|WS_VISIBLE|WS_MAXIMIZE,0,0,0,0,0,0,0,0);
HDC hDC = GetDC(hWnd);
ShowCursor(FALSE);
// main loop
for (MSG msg; msg.message != WM_KEYDOWN; PeekMessage(&msg,0,0,0,PM_REMOVE)) {
// screen blitting
int ScreenX = GetSystemMetrics(SM_CXSCREEN);
int ScreenY = GetSystemMetrics(SM_CYSCREEN);
StretchDIBits(hDC,0,0,ScreenX,ScreenY,0,0,ResX,ResY,pixel,&bmi,0,SRCCOPY);
SwapBuffers(hDC);
// pixel pushing
int t = GetTickCount();
for (int i = 0; i < ResX*ResY; i++) pixel[i] = i + t;
}
ExitProcess(0);
return 0;
}