you can use the following codes instead of GXBeginDraw():




when you are ready to draw, you are careful to display Properties struct data. Because they are not fitful for the buffer point which you get through ExtEscape function, you should use data get by ExtEscape function.
Be careful for data, maybe changed:
g_gxdp.cBPP , rfbi.wBPP;
g_gxdp.cbxPitch , rfbi.cxStride;
g_gxdp.cbyPitch , rfbi.cyStride;
g_gxdp.cxWidth , rfbi.cxPixels;
g_gxdp.cyHeight , rfbi.cyPixels;
g_gxdp.ffFormat , rfbi.wFormat;