background preloader

C++

Facebook Twitter

MVC в c++. [Архив] - Форум CodeNet. [QUOTE=Kogrom]Вроде принцип понял. Осталось проникнуться смыслом всего этого[/QUOTE]Вообще говоря, View - не обязательно пользовательский интерфейс. Это может быть интерфейс к любым данным "извне". Например, MVC работает в ADO .NET: есть база данных, есть объект DataTable, есть TableAdapter. DataTable не привязана к базе данных и существует отдельно он неё. Такая схема избавляет приложение от привязки к конкретной СУБД + даёт возможность работать с автономной копией данных, что экономит канал связи. About Messages and Message Queues. Unlike MS-DOS-based applications, Windows-based applications are event-driven.

They do not make explicit function calls (such as C run-time library calls) to obtain input. Instead, they wait for the system to pass input to them. If a top-level window stops responding to messages for more than several seconds, the system considers the window to be not responding. In this case, the system hides the window and replaces it with a ghost window that has the same Z order, location, size, and visual attributes. This section discusses the following topics: Windows Messages The system passes input to a window procedure in the form of a message.

The system sends a message to a window procedure with a set of four parameters: a window handle, a message identifier, and two values called message parameters. Message parameters specify data or the location of data used by a window procedure when processing a message. Message Types This section describes the two types of messages: System-Defined Messages. Unicode in C and C. By Jeff Bezanson If you write an email in Russian and send it to somebody in Russia , it is depressingly unlikely that he or she will be able to read it. If you write software, the burden of this sad state of affairs rests on your shoulders. Given modern hardware resources, it is unacceptable that we can't yet routinely communicate text in different scripts or containing technical symbols. Fortunately, we are getting there. After reading a lot on the subject and incorporating Unicode compatibility into some of my software, I decided to prepare this quick and highly pragmatic guide to digital text in the 21st century (for C programmers, of course).

I don't mind adding my voice to the numerous articles that already exist on this subject, since the world needs as many programmers as possible to pick up these skills as soon as possible. I. Given the variety of human languages on this planet, text is a complex subject. Encoding Mapping characters to numbers. See What is UTF-8? II. III. IV. Создание и использование динамических библиотек, написанных на различных языках (C/C++, Pascal) / Программирование. Задача Передо мной возникла задача написать загрузчик библиотек, имеющий возможность предоставить какие-то интерфейсные функции внешней динамической библиотеке.

Решение должно быть максимально кроссплатформенно (как минимум, работать на Linux и Windows). Загружаться должны библиотеки, написанные на различных языках программирования, поддерживающих создание динамических библиотек. В качестве примера были выбраны языки C и Pascal. Решение Основной загрузчик библиотек написан на языке C. Загрузчик библиотек Главный файл загрузчика библиотек выглядит очень просто: main.c #include "loader.h" #ifdef __cplusplusextern "C" { #endif int main(int argc, char *argv[]) { if (argc > 1) { loadRun(argv[1]); } return 0; } #ifdef __cplusplus } #endif А это модуль, отвечающий за загрузку динамических библиотек, который сам вынесен в динамическую библиотеку для того, чтобы подгружаемые библиотеки имели возможность использовать предоставляемые им функции: loader.c Заголовочные файлы loader.h functions.h lib.c Запуск: Signals FAQ (fido7.ru.unix.prog)