Skip to content

Instantly share code, notes, and snippets.

import re
src = open("keyboard.c", "r")
dst = open("keyboard2.c", "w")
SCALE = 0.80
def sub(m: re.Match):
x = int(int(m.group(1)) * SCALE)
y = int(int(m.group(2)) * SCALE)
cx = int(int(m.group(3)) * SCALE)
base/setup/welcome/welcome.c | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/base/setup/welcome/welcome.c b/base/setup/welcome/welcome.c
index 921588bb26..f797a6b539 100644
--- a/base/setup/welcome/welcome.c
+++ b/base/setup/welcome/welcome.c
@@ -765,6 +765,7 @@ _tWinMain(HINSTANCE hInst,
HMENU hSystemMenu;
DWORD dwStyle = WS_OVERLAPPED | WS_CLIPCHILDREN | WS_CLIPSIBLINGS |
modules/rostests/win32/user32/biditext/biditext.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/modules/rostests/win32/user32/biditext/biditext.c b/modules/rostests/win32/user32/biditext/biditext.c
index cc714c40f7..e8c02a8475 100644
--- a/modules/rostests/win32/user32/biditext/biditext.c
+++ b/modules/rostests/win32/user32/biditext/biditext.c
@@ -170,11 +170,26 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
case WM_PAINT:
#include <stdio.h>
#include <stdbool.h>
int main()
{
int i, n, stars;
int spaces;
char c;
scanf_s("%d%c", &n, &c);
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
int main()
{
bool condition = false;
double *scores = NULL;
double score = 0.0;
double sum = 0.0;
#include <stdio.h>
int main()
{
int x;
char dummy;
char* months[] = {
"January",
"February",
"March",
EDITDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 229, 79
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Editor"
FONT 8, "MS Shell Dlg"
BEGIN
CONTROL "Edit:", IDD_TEXT, "static", SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 24, 16, 16, 14
CONTROL "", IDD_EDIT, "edit", ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 40, 14, 152, 14
CONTROL "...", IDC_EDITOR, "button", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 195, 14, 20, 14
CONTROL "View:", IDD_TEXT, "static", SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 21, 36, 18, 14
CONTROL "", IDD_VIEW, "edit", ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 40, 35, 152, 14
@peterooch
peterooch / gist:5968956
Last active December 19, 2015 14:28
Rough implemtation of the install button of fontview
static LRESULT
MainWnd_OnInstall(HWND hwnd)
{
DWORD fontExists;
HKEY hKey;
LPWSTR subKey = L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts";
WCHAR szDestDir[256];
/* First, we have to find out if the font still exists. */
fontExists = GetFileAttributesW(g_fileName);
@peterooch
peterooch / charmap1func.c
Last active December 17, 2015 22:49
A function to add the unicode description string in the status bar of the charmap of ReactOS. Ready for comments and suggestions.
void UpdateStatusBar(WORD wch) // The function gets a Unicode value
{
LPWSTR szCharDesc;
GetUName(wch,szCharDesc); //Gets the Character's Description String
WCHAR buff[sizeof szCharDesc + 30];
wcscpy(buff,"U+%X: %s", wch, szCharDesc); //Putting it in a nice string
SendMessage(hStatusWnd,WM_SETTEXT,SB_SIMPLE,(LPARAM)buff); // push it to the status bar
}