Skip to content

Instantly share code, notes, and snippets.

View proffix4's full-sized avatar
🌅
Работаю

Talipov S.N. proffix4

🌅
Работаю
View GitHub Profile
@proffix4
proffix4 / wxWidgets_win_build(RPCpp).bat
Created April 12, 2025 14:03
Building wxWidgets for Windows
@echo off
:: Устанавливаем путь к wxWidgets
set WX_DIR=D:\Development\RedPanda-CPP\wxWidgets
:: Устанавливаем путь к платформе С++
set MINGW_DIR=D:\Development\RedPanda-CPP\mingw64
:: Устанавливаем имя утилиты сборки
set MAKE_TOOL=mingw32-make.exe
:: Устанавливаем путь сборки (НЕ МЕНЯЙТЕ ЭТО!)
@proffix4
proffix4 / drawing_in_wxwidgets.cpp
Created April 5, 2025 18:02
drawing in wxwidgets
#include <wx/wx.h>
class MyPanel : public wxPanel // Панель для рисования
{
public:
MyPanel(wxWindow* parent) : wxPanel(parent, wxID_ANY) {
// Регистрируем обработчик события рисования
Bind(wxEVT_PAINT, &MyPanel::OnPaint, this);
}
@proffix4
proffix4 / PROJECTS_WX_CROSS-SETTINGS_LINUX.txt
Created November 12, 2024 12:59
PROJECTS_WX_CROSS-SETTINGS_LINUX
CODEBLOCKS_PROJECTS_WX_SETTINGS_LINUX:
Global compiler settings -> Toolchain executables -> Compiler's installation directory : /usr
-- for linux build: --
Project build options -> Compiler Settings -> Other compiler options : `wx-config --cflags`
Project build options -> Linker Settings -> Other linker options : `wx-config --libs`
Global compiler settings -> Toolchain executables -> C++ compiler : g++
Global compiler settings -> Toolchain executables -> Linker for dynamic libs : g++
Global compiler settings -> Toolchain executables -> Linker for static libs : ar
@proffix4
proffix4 / gist:ef68b1062883db22c95b7002d3118d35
Created November 8, 2024 15:23
SETTING UP PROJECTS in Visual Studio 2022 on WXWIDGETS
--- Все конфигурации проекта: ---
C/C++ -> Дополнительные каталоги включаемых файлов : $(wxwin)\include\msvc;$(wxwin)\include
Компоновщик -> Дополнительные каталоги библиотек : $(wxwin)\lib\vc_x64_lib
--------------------------------------------------------
--- Системные переменные Windows: ---
wxwin : C:\Users\talip\Projects\wxWidgets
@proffix4
proffix4 / netbeans.conf
Created April 9, 2024 12:55
NetBeans 21 configuration for UTF-8
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@proffix4
proffix4 / main.cpp
Created February 1, 2024 09:06
Test C++
#define _CRT_SECURE_NO_WARNINGS // отключение предупреждений о небезопасности
#include <iostream> // для cout, cin, endl
#include <stdio.h> // для printf, scanf
using namespace std; // пространство имен std
int main(int argc, char** argv) {
setlocale(LC_ALL, "Russian"); // подключение русского языка
int number1; // целое число
@proffix4
proffix4 / CppUTF8CrossPlatform.cpp
Created November 21, 2023 07:01
Cpp UTF8 Cross - platform program
#include <stdlib.h>
#include <iostream>
#ifdef _WIN32 // Если это Windows
#include <io.h>
#include <fcntl.h>
#endif
int main(int argc, char** argv)
@proffix4
proffix4 / CppConsoleUTF8win.cpp
Created November 19, 2023 17:01
Console UTF-8 application with boost
#pragma execution_character_set( "utf-8" ) // for MSVC
#include <boost/nowide/args.hpp> // for utf8_to_utf16
#include <boost/nowide/fstream.hpp> // for fstream
#include <boost/nowide/iostream.hpp> // for cout, cerr, cin, clog
using namespace boost::nowide; // for cout, cerr, cin, clog
using std::endl; // for endl
int main()
@proffix4
proffix4 / CppConsoleLinux.cpp
Created November 18, 2023 11:27
Cpp Console Linux example
#include <clocale>
#include <string>
#include <iostream>
using namespace std;
int main() {
setlocale(LC_ALL, "Russian");
string fio;
cout << "Введите строку: ";
@proffix4
proffix4 / wx_cp1251_unicode.cpp
Last active November 17, 2023 15:28
Русские буквы в C++ для Unicode-строк wxWidgets
#include <wx/wx.h>
int main(int argc, char** argv)
{
wxLocale m_locale; // Создать объект локали для wxWidgets
m_locale.Init(wxLANGUAGE_RUSSIAN, wxLOCALE_DONT_LOAD_DEFAULT); // Установить локаль для wxWidgets
#ifdef __WXMSW__ // Определение для Windows
SetConsoleCP(1251); // Установить кодовую страницу ввода для Windows
SetConsoleOutputCP(1251); // Установить кодовую страницу вывода для Windows