This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <psapi.h> | |
#include <windows.h> | |
#ifdef _WIN32 | |
int checkIsWinTerm() | |
{ | |
HWND hConsoleWnd = GetConsoleWindow(); | |
DWORD dwConsolePid; | |
GetWindowThreadProcessId(hConsoleWnd, &dwConsolePid); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <iostream> | |
int main() | |
{ | |
CONSOLE_SCREEN_BUFFER_INFO info; | |
HANDLE hdl = GetStdHandle(STD_OUTPUT_HANDLE); | |
GetConsoleScreenBufferInfo(hdl, &info); | |
WORD wBackgroundColor = info.wAttributes & (BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_INTENSITY ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Test code with footprint, cause the coordinates of {4000,3000} is used | |
//to give a proper position on footprint editor. | |
//Create text. | |
api('createShape', {"shapeType": "TEXT",jsonCache:{text:"HELLO", height:50, layerid:1, "line-width":12, x: 4200, y:3000}}); | |
//Create pad. Very practical. tested on footprint. | |
api('createShape', {"shapeType": "PAD", jsonCache:{ | |
number:1, | |
shape:"ELLIPSE", |
NewerOlder