Cpp utilities.
This file contains 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
@echo off | |
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION | |
prompt $G$S | |
set BAR_A=######################################## | |
set BAR_B=%BAR_A:#=_% | |
set BAR_S=40 | |
set C=500 | |
echo. | |
for /L %%i in (0,1,%C%) do ( | |
call :progress %%i %C% |
This file contains 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 <charconv> | |
#include <type_traits> | |
#include <cwctype> | |
// ----- | |
// Helper alias templates | |
template<typename T> | |
using EnableIfIntegral = std::enable_if_t<std::is_integral<T>::value, bool>; |
This file contains 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
#define _ATL_APARTMENT_THREADED | |
#include <atlbase.h> | |
#include <atlwin.h> | |
class CMainWnd : | |
public CWindowImpl<CMainWnd, CWindow, CFrameWinTraits> | |
{ | |
public: | |
static LPCTSTR GetWndCaption() |
This file contains 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
<project name="RadJava" basedir="." default="build" | |
xmlns:ivy="antlib:org.apache.ivy.ant" > | |
<property environment="env"/> | |
<dirname property="antfile.dir" file="${ant.file}"/> | |
<property name="project.displayname" value="${ant.project.name}"/> | |
<property name="project.vendor" value="RadSoft"/> | |
<condition property="install.dir" value="${env.RAD_INSTALL_DIR}"> |
This file contains 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
typedef int(__stdcall *MSGBOXAAPI)(IN HWND hWnd, | |
IN LPCSTR lpText, IN LPCSTR lpCaption, | |
IN UINT uType, IN WORD wLanguageId, IN DWORD dwMilliseconds); | |
typedef int(__stdcall *MSGBOXWAPI)(IN HWND hWnd, | |
IN LPCWSTR lpText, IN LPCWSTR lpCaption, | |
IN UINT uType, IN WORD wLanguageId, IN DWORD dwMilliseconds); | |
int MessageBoxTimeoutA(IN HWND hWnd, IN LPCSTR lpText, | |
IN LPCSTR lpCaption, IN UINT uType, | |
IN WORD wLanguageId, IN DWORD dwMilliseconds); |
This file contains 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 <stdio.h> | |
#include <io.h> | |
#include <fcntl.h> | |
#include <windows.h> | |
FILE* stddbg = NULL; | |
FILE* wstddbg = NULL; | |
static DWORD WINAPI OutputDebugStringAProc(_In_ LPVOID lpParameter) | |
{ |
This file contains 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
Windows Registry Editor Version 5.00 | |
; Windows supports Font Linking: https://msdn.microsoft.com/en-us/globalization/mt662331.aspx | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink] | |
; Lucida Console doesn't support Block Elements: https://en.wikipedia.org/wiki/Block_Elements | |
; But MS Gothic does so we can link them. Note: MS Gothic also supports a lot of other unicode ranges | |
; "Lucida Console"=multisz:MSGOTHIC.TTC,MS Gothic\n" | |
"Lucida Console"=hex(7):4d,00,53,00,47,00,4f,00,54,00,48,00,49,00,43,00,2e,00,\ | |
54,00,54,00,43,00,2c,00,4d,00,53,00,20,00,47,00,6f,00,74,00,68,00,69,00,63,\ |
This file contains 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
void DebugOut(const char* format, ...) | |
{ | |
char buffer[1024]; | |
va_list args; | |
va_start(args, format); | |
vsnprintf(buffer, 1024, format, args); | |
OutputDebugStringA(buffer); | |
va_end(args); | |
} |
NewerOlder