string vString(float v){//compiler has a problem when the input to these is a constant. variables are fine
char buff[32];
sprintf_s(buff,31,"%f",v);
string str = buff;
return str;
}
int __stdcall WinMain(HINSTANCE, HINSTANCE, LPSTR, int) {
FolderList.GamePath=GetFullPath();
HWND hWnd;
if (!initDarkGDK("../gdkengine.dll"))
return 1;
// Set the main window as borderless
hWnd = openWindow(0, 0, ScreenW, ScreenH, "Zabi's Escape Editor", WS_POPUP | WS_CLIPCHILDREN, true);
// Attach the DarkGDK screen to the window
dbOpenScreen(hWnd, 0, 0, ScreenW, ScreenH,ScreenD,0);
// Set the window to the to the top of the z-order
SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOREPOSITION | SWP_NOSIZE);
ShowWindow(hWnd, SW_SHOW);
dbSyncRate(30);
dbCreateObjectCube(1,1);
do {
dbText(0,20,vString(dbMouseMoveX()));
dbText(0,0,vString(dbMouseMoveY()));
dbSync();
if (dbEscapeKey()==1) PostMessage(hWnd,WM_CLOSE,0,0);
} while (windowEvent()!=WM_CLOSE);
dbCloseScreen();
return 0;
}
This should illustrate what I am talking about. Of course, you will have to set up the headers, but I know that will be a problem for you.
I have a work-around for this issue, but it would have been nice not to have to work around the problem. Apparently this "feature" was done for people using windowed apps. I just wish it was a switch like setting a bool instead of completely changing it.
The fastest code is the code never written.