If the window style of the engine never changes (which I doubt it would), the quick easy fix would be to compensate in the window resize
// settings for the window
RECT wr = { 0, 0, gfx.screenX, gfx.screenY }; // set the size, but not the position
AdjustWindowRect(&wr, WS_OVERLAPPEDWINDOW, FALSE); // adjust the size
inHGE->System_SetState(HGE_WINDOWED, !fullScreen);
inHGE->System_SetState(HGE_SCREENWIDTH, wr.right - 16);
inHGE->System_SetState(HGE_SCREENHEIGHT, wr.bottom - 39);
Note: wr.left and wr.top are not needed in this case as they will always be zero.