Старый новый Win32api
На этой странице содержится список ссылок на подмножество сообщений знаменитого блога Рэймонда Чена The Old New . Подмножество ограничено в основном Win32API и некоторыми вещами, связанными с COM.
Причина, по которой я утверждаю эту страницу, заключается в том, что она часто предоставляет информацию, которая отсутствует на MSDN или которая там описывается загадочным образом, а также потому, что блог не может быть легко доступен для поиска.
Ссылки здесь классифицируются по их теме, а не хронологическим порядком. Иногда, когда это необходимо, один пост может быть помещен в несколько категорий.
В некоторых (довольно редких) случаях ссылки на другие источники включены, если они найдены полезными.
Отказ от ответственности: я не претендую на авторство какого -либо связанного содержимого. Речь идет только о надежной организации великих статей, написанных Рэймондом за эти годы.
Оглавление
- Процессы и потоки
- Процессы
- Нить
- Бассейны ниток
- Сродство ниток объектов
- Стек потоков
- Волокна
- Синхронизация
-
WaitOnAddress()
-
WaitForMultipleObjects()
и родственники - Без блокировки шаблоны
- DLLS
- Ресурсы
- Растровые и значки ресурсы
- Диалоговые шаблоны
- Шаблоны меню и ресурсы акселератора
- Строковые ресурсы
- Шаблоны версий
- Данные и пользовательские ресурсы
- Приложение (в целом)
- Командная строка
- Панель задач
-
HWND
(общая точка зрения)- Windows иерархия
- Стили окна
- Окно классы
- Окна верхнего уровня
- Оконная рама и подпись
- DWM
- Диалоги
- Вложенные и встроенные диалоги
- Общие диалоги
- Управление навигацией
- Диалог -менеджер
- Модальность
- Листы недвижимости
- Управление
- Анимационные элементы управления
- Кнопки
- Комбовые коробки
- Редактировать элементы управления
- Список просмотров
- Богатый текстовый элемент управления
- Полосы прокрутки
- Статические элементы управления
- Панели инструментов
- По мотивам инструментов
- Трекбары
- Просмотры списка деревьев
- Обработка сообщений
- Конкретные сообщения
- Уведомления
- Построение и уничтожение окон
- Сообщения о геометрии окна
- Послание окончания
- Сообщения с фокусировкой окон
- Сообщения клавиатуры
- Мышиные сообщения
- Диалоговые сообщения
- Другие окна сообщений
- Системные сообщения
- GDI
- Курсоры
- Щетки
- Ручки
- Растровые карты
- Диб
-
LockWindowUpdate()
- Рисовать стандартные элементы
-
UXTHEME.DLL
- Несколько мониторов
- Доступность
- Компонент
- Объявление COM интерфейсов
- Com квартир
- COM инициализация
- Компатический магазин
- Com маршалинг
- COM Ошибка обработки
- Com асинхронные интерфейсы
- Гид
- Com Strings
- COM варианты
-
IUnknown
-
IMoniker
-
ICallback
-
IContextMenu
-
IFileDialog
-
IMultiLanguage
-
INamespaceWalk
-
IStream
-
IVirtualDesktopManager
- Буфер обмена
- Перетаскивать
- Перечисление
- Оболочка
- Без категорий COM
- Память
- Ввод и вывод
- Асинхронный ввод и вывод
- Файлы и каталоги
- Acl
- Разрешения на безопасность, атрибуты и идентификаторы
- Реестр
- Строки и локали
- NT Services
- Без рубрики
Процессы и потоки
Процессы
-
CreateProcess
не ждет начала процесса - Почему функция
CreateProcess
изменяет свою командную строку ввода? - Почему люди берут замок вокруг звонков
CreateProcess
? - Отключение диалога с аварией программы
- Как передать много данных в процесс, когда он запускается?
- Какова была цель параметра
hPrevInstance
для WinMain
? -
RunAsInvoker
- секрет, еще более высокий уровень UAC? - Как предотвратить отображение диалогового окна отчетности по ошибкам Windows?
- Как то, что
WriteProcessMemory
удастся в письменной форме для памяти только для чтения? - Это хорошая идея, чтобы позволить
WriteProcessMemory
управлять для меня защитой страницы? - Как я могу запустить невыразимый процесс из моего повышенного процесса, Redux
- Как я могу проверить уровень целостности моего процесса?
- Правда ли, что повышение структурированного исключения из обработчика структурированного исключения завершает процесс?
- Более прямой и без ошибок способ создания процесса в задании
Нить
- Неверные идентификаторы потока и процесса
- Почему моя нить внезапно становится плохо? Все, что я сделал, это ждал этого!
- Что произойдет, если вы просто вернетесь из обратного вызова потока, переданного
_beginthread
и _beginthreadex
? - Почему вы никогда не должны приостанавливать ветку
- Опасности сна в нити пользовательского интерфейса
- В поисках очереди сообщения
- Перечисление потоков в процессе
- Win32 пользовательский интерфейс работа по своей природе однопользованная
- Насколько плохо задержать закрытие ручки резьбы в течение долгого времени после выхода потока?
- Если я позвоню в
GetExitCodeThread
для потока, который, как я точно знаю, вышел, почему он все еще говорит STILL_ACTIVE
? - Есть ли проблема с
CreateRemoteThread
в 64-битных системах? - Является ли функция
TerminateThread
синхронной? - Удаление
TerminateThread
из кода, которое ожидает опустошения объекта работы - В чем смысл
FreeLibraryAndExitThread
? - Что произойдет, если я дам противоречивые значения для Commit Commit и Stack?
Бассейны ниток
- Что именно означает параметр
msWindowLength
для SetThreadpoolTimer
? - В чем разница между
CreateTimerQueueTimer
и SetThreadpoolTimer
? - Как избежать доступа к освобожденной памяти при отмене обратного вызовов пула потоков
- Избегание тупиков при отмене обратного вызова пула потоков, часть 1: Данные внешнего обратного вызова
- Избегая тупиков при отмене обратного вызовов пула потоков, часть 2: Ссылка на содержащий объект
- Gotcha: периодический таймер Threadpool не будет ждать, пока предыдущий тик завершит
- Почему я получаю исключение из пула потоков во время отключения процесса?
- Что происходит со значением, возвращенным из функции, переданной в
QueueUserWorkItem
? - Ментальная модель для
StartThreadpoolIo
- Как я могу обнаружить, что рабочая товар для пула потоков занимает слишком много времени?
- Как я могу закрыть пул ниток и отменить всю работу, которая была в очереди на него?
Сродство ниток объектов
- Поточная аффинность объектов пользовательского интерфейса, часть 1:
- Аффинность потока объектов пользовательского интерфейса, часть 2: Контексты устройства
- Аффинность поток объектов пользовательского интерфейса, часть 3: меню, значки, курсоры и таблицы акселератора
- Сродство потока объектов пользовательского интерфейса, часть 4: объекты GDI и другие заметки о сфере аффинности
- Сродство потока объектов пользовательского интерфейса, часть 5: Очистка объекта
- Поточная аффинность объектов пользовательского интерфейса: добавление
Стек потоков
- Как я могу расширить стек ветка во время выполнения?
- Использование волокон для расширения стека потока во время выполнения, часть 1
- Использование волокон для расширения стека потока во время выполнения, часть 2
- Использование волокон для расширения стека потока во время выполнения, часть 3
- Использование волокон для расширения стека потока во время выполнения, часть 4
- Использование волокон для расширения стека потока во время выполнения, часть 5
- Использование волокон для расширения стека потока во время выполнения, часть 6
- Сравнение волокон с потоками с целью расширения стека потока во время выполнения
- Определение приблизительно, сколько места для стека доступно, часть 1
- Определение приблизительно, сколько места для стека доступно, часть 2
Волокна
- Что происходит с волокнами, которые работали на потоке, когда поток выходит?
- Это нормально использовать волокна, но все должны быть на борту с планом
- Волокна больше не полезны для большого количества; Есть только один угол, который остается полезным по причине, не связанной с волокнами
Синхронизация
- Понимание последствий
WAIT_ABANDONED
- События с ключами Windows, критические разделы и новые функции синхронизации Vista
- Объединение рабочей очередь различных событий, порядок не важен, с автоматическим разрешением.
- Насколько справедливы замки SRW, особенно когда есть читатели и писатели?
- Вы также можете использовать файл в качестве объекта синхронизации
- Могу ли я ждать, пока событие ядра не станет бессигналированным ?
- Если Slim Reader/Writer Lock (
SRWLOCK
) не помнит, кто такой общий владелец блокировки, значит ли это приобрести его рекурсивно?
WaitOnAddress()
-
WaitOnAddress
позволяет создавать объект синхронизации из любой переменной данных, даже байт - Внедрение барьера синхронизации с точки зрения
WaitOnAddress
- Внедрение критического раздела с точки зрения
WaitOnAddress
- Расширение нашего критического раздела на основе
WaitOnAddress
для поддержки тайм -аутов - Сравнение
WaitOnAddress
с Futexes (futexi? Futexen?) - Создание семафора от
WaitOnAddress
- Создание семафора с максимальным счетом от
WaitOnAddress
- Создание мероприятия вручную от
WaitOnAddress
- Создание события автоматического разрешения от
WaitOnAddress
WaitForMultipleObjects()
и родственники
-
MsgWaitForMultipleObjects
и состояние очереди - Вы можете позвонить в
MsgWaitForMultipleObjects
с нулевыми ручками - Перекачивание сообщений в ожидании периода времени
- В ожидании всех ручек с
MsgWaitForMultipleObjects
- это ошибка, ожидая, чтобы произойти - Почему
WaitForMultipleObjects
возвращает ERROR_INVALID_PARAMETER
когда все параметры выглядят действительными для меня? - Если более одного объекта заставляет
WaitForMultipleObjects
, как мне узнать о других? - Какой смысл передавать никогда не подписываемое событие
MsgWaitForMultipleObjects
?
Без блокировки шаблоны
- Бесплатные заблокированные модели продюсера/однопотребляющих
- Бесплатный заблокированный многопродуктор/однопотребитель
- Бесплатные заблокированные закономерности/однопотребительские шаблоны: очередь рабочей работы идентичных некоальных событий
- Бесплатные заблокированные закономерности Многопродуктивника/однопотребляющие
- Бесплатные заблокированные закономерности/однопотребительские шаблоны: очередь рабочей работы различных событий, FIFO
- Бесплатные заблокированные закономерности Многопродуктивника/однопотребляющий
DLLS
- Не доверяйте адресу возврата
- Почему я не могу
GetProcAddress
функцию, которую я dllexport'ed? - В чем разница между
HINSTANCE
и HMODULE
? - Доступ к
HINSTANCE
модулю из статической библиотеки -
LoadLibraryEx(DONT_RESOLVE_DLL_REFERENCES)
в корне ошибочной - Почему DLL разгружаются в «неправильном» порядке?
- Как экспортируются функции DLL в 32-битных окнах?
- Экспортируемые функции, которые действительно являются торговыми людьми
- Переосмысление того, как экспорт DLL разрешается для 32-битных окон
- Имена в библиотеке импорта украшены по какой -то причине
- Что происходит, когда вы ошибаетесь?
- Проблемы, связанные с принуждением к созданию заглушки для импортируемой функции
- Распределение и освобождение памяти по границам модулей
- Переадресация DLL-это не то же самое, что загрузка задержки
- Что намекает на импорт DLL?
- Что такое импорт DLL?
- В чем смысл
FreeLibraryAndExitThread
? - Библиотека, загруженная с помощью
LOAD_LIBRARY_AS_DATAFILE
(или аналогичных флагов), не может играть в каких -либо играх модуля оленя - Могут ли возникнуть какие -либо проблемы с вызовом
GetModuleFileNameEx
на вашем собственном процессе? - Как я могу указать, что мой DLL должен разрешить зависимость DLL из того же каталога, в котором находится DLL?
- После того, как я сделал свою задержку с задержкой DLL, еще один DLL, мой DLL начал сбой в своем процессе Code Code
- Различные виды посадки DLL
- Почему
GetModuleInfo
не может создать точку входа для исполняемых файлов? - Что означает
SizeOfImage
в структуре MODULEINFO
? - Как мне подавить поле ошибки, которая появляется, когда
LoadLibrary
не удается?
DllMain()
- Некоторые причины не делать ничего страшного в вашем
DllMain
- Еще одна причина не делать ничего страшного в вашем
DllMain
: непреднамеренный тупик - Некоторые причины не делать ничего страшного в вашем
DllMain
, часть 3 - Поток, который получает уведомление
DLL_PROCESS_DETACH
, не обязательно является тем, которая получила DLL_PROCESS_ATTACH notification
- Как вы можете загружать DLL во время
DLL_PROCESS_DETACH
даже не осознавая этого - Когда
DLL_PROCESS_DETACH
говорит вам, что процесс выходит, лучше всего вернуться, не делая ничего
Ресурсы
- Компилятор ресурса по умолчанию в
CP_ACP
, даже под лицом тонких намеков, что файл является UTF-8 - Взаимосвязь между ресурсами модуля и объектами, полученными из ресурсов, в 32-битных окнах
- В чем разница между
FreeResource
и, скажем, DestroyAcceleratorTable
- Ресурсы PE должны быть 4-байтовыми выровненными, но это не мешает людям пробовать другие выравнивания
- Как я могу сказать, что кто -то использовал макрос
MAKEINTRESOURCE
, чтобы переправить целое число внутри указателя? - Ужасная неприятная готча:
FindResource
и FindResourceEx
Растровые и значки ресурсы
- Почему устройства не зависят от растровых карт вверх ногами?
- Формат растровых ресурсов
- Формат ресурсов иконы
- Формат ресурсов иконы, повторно
- Эволюция формата файла ICO, часть 1: монохромные началы
- Эволюция формата файла ICO, часть 2: теперь в цвете!
- Эволюция формата файла ICO, часть 3: Альфа-смешанные изображения
- Эволюция формата файла ICO, часть 4: PNG -изображения
- Как мне установить альфа -канал растровой карты GDI на 255?
Ресурсы строки сообщений
- Почему
FormatMessage
говорит, что %0
заканчивает сообщение без новой линии? Это тайно добавляет новички?
Диалоговые шаблоны
- О сложности получения идеального макета в шаблонах диалога Win32
- Эволюция шаблонов диалога - 32 -битные классические шаблоны
- Эволюция шаблонов диалога - 32 -битные расширенные шаблоны
- Эволюция шаблонов диалога - резюме
- Компилятор ресурсов будет полезно добавить для вас стили окна, но если вы сами создаете диалоговый шаблон, вы не получите эту помощь
Шаблоны меню и ресурсы акселератора
- Эволюция шаблонов меню: введение
- Эволюция шаблонов меню: 32-битное классическое меню
- Эволюция шаблонов меню: 32-битное расширенное меню
- Формат ресурсов акселераторов настольных ресурсов
Строковые ресурсы
- Формат струнных ресурсов
-
LoadString
может загружать струны встроенными нулями, но ваша функция обертки не может
Шаблоны версий
- Эволюция ресурсов версий - 32 -разрядные версии ресурсы
- Эволюция версий ресурсов - поврежденные 32 -разрядные версии ресурсы
Данные и пользовательские ресурсы
- Формат данных и пользовательских ресурсов
Приложение (в целом)
- Какие окна появляются в списке
Alt+Tab
? - Windows Vista слегка изменил заказ
Alt+Tab
- Win32 пользовательский интерфейс работа по своей природе однопользованная
- Когда
STARTF_USESHOWWINDOW
переопределяет параметр, переданный в ShowWindow
? -
WaitForInputIdle
действительно должен называться WaitForProcessStartupComplete
-
WaitForInputIdle
ждет какого -либо потока, которая может быть не тем поток, о которой вы заботитесь - Каковы соглашения для управления стандартными ручками?
- Стандартные ручки действительно предназначены для однопоточных программ
- Если только DLL могут получить уведомления
DllMain
, как EXE может получить уведомление при создании потока (например)?
Командная строка
- Первое слово в командной строке - это имя программы только по соглашению
- Как функция
CommandLineToArgvW
предназначена для использования? - Что случилось со странным обращением с кавычками и обратными чертами
CommandLineToArgvW
Панель задач
- Как помешать пользователям прикреплять мою программу на панели задач?
- Вместо того, чтобы что -то создавать, а потом пытаться скрыть это, просто не создавайте это в первую очередь (икона лотка)
- Что, если мое приложение на самом деле является двумя приложениями, связанными с одним файлом, и я хочу, чтобы они собрались в две группы на панели задач в Windows 7?
- Как настроить, как сгруппированы окна моих приложений на панели задач?
- Показать наложение на кнопке панели задач
- Отображать кнопки управления в окне предварительного просмотра панели задач
- Показать пользовательскую миниатюру для вашего приложения (и, пока вы в нем, пользовательский просмотр в прямом эфире)
- Как я могу запросить местоположение панели задач на вторичных мониторах?
- Как этой программе удалось прикрепить себя на моей панели задач, когда я ее установил?
- Что, если у меня есть две программы, которые логически являются одним приложением, и я хочу, чтобы с ними рассматривались как единая группа на панели задач?
- Почему значок панели задач для сгруппированного Windows меняется на что -то странное?
HWND
(общая точка зрения)
- Что это значит, чтобы окно было Unicode?
- Как я могу получить фактический адрес процедуры окна, а не тунк?
- Каковы эти странные значения, возвращенные из
GWLP_WNDPROC
? - Бонусные байты на
GWLP_USERDATA
- В чем разница между
WM_DESTROY
и WM_NCDESTROY
? - Отправка окна сообщение
WM_DESTROY
- это то, что шутка звонит кому -то, притворяющемуся полицией - Секретная жизнь
GetWindowText
- Почему правила
GetWindowText
так странно? - Живопись только тогда, когда ваше окно видно на экране
- Определение того, покрыто ли ваше окно
- Получение размера и положения окна, пока оно минимизируется
- Почему вызов
SetForegroundWindow
сразу же за ним следует GetForegroundWindow
не возвращает одно и то же окно назад? - Как Windows решает, должно ли недавно созданное окно использовать LTR или RTL?
Windows иерархия
- Что такого особенного в окне рабочего стола?
- Какой предел гнездования окон?
- В чем разница между
HWND_TOP
и HWND_TOPMOST
? - У окна может быть родитель или владелец, но не оба
- Почему мой контроль посылает свои уведомления в неправильное окно после того, как я его возместил?
-
WindowFromPoint
, ChildWindowFromPoint
, RealChildWindowFromPoint
, когда все это закончится? -
GetParent
, так же сбивает с толку, как и EnumClaw
, но это реальная функция! ( GetAncestor()
, GetWindow()
) - Наличие окна владельца из другого процесса сложно, но иногда это правильно
- Какова документация для
SetParent
, пытающейся рассказать мне о синхронизации состояния пользовательского интерфейса? - Демонстрируя, что происходит, когда у родителя и детей есть разные состояния пользовательского интерфейса
- Получение окна родителей и ребенка иметь те же состояния пользовательского интерфейса
Стили окна
- Какие биты в стиле окна принадлежат кому?
- Как я могу указать, что я хочу, чтобы мое окно следовало правилам макета правого на пол?
- Почему мой прозрачный статический контроль прозрачен? (
WS_EX_TRANSPARENT
) - Как и торт,
WS_EX_TRANSPARENT
- это ложь или, по крайней мере, не вся истина - Я использовал
WS_EX_COMPOSITED
, чтобы избавиться от моего перерыва, но это привело к вялому ответу - Как я могу использовать
WS_CLIPCHILDREN
и при этом иметь возможность нарисовать управление с прозрачным фоном?
Окно классы
- Для чего передается
HINSTANCE
для CreateWindow
и RegisterClass
? - Использование неправильного
HINSTANCE
в RegisterClass
похоже на кражу личных данных - Если функция
RegisterClass
берет на себя ответственность за пользовательскую фоновую кисть, почему она протекает? - Изменение класса окна влияет на все окна, которые принадлежат этому классу
- Что делает
CS_SAVEBITS
? - Что делает стиль класса
CS_OWNDC
? - Что делает стиль класса
CS_CLASSDC
? - Изменение стиля
CS_NOCLOSE
действительно влияет на все окна класса, а не обязательно сразу заметно - Почему
PrintWindow
ненавидит CS_PARENTDC
? Потому что все ненавидят CS_PARENTDC
! - Почему
PrintWindow
ненавидит CS_PARENTDC
? Redux - Безопаснее подкласс
- Частные занятия, суперклассирование и глобальная подклассия
- Что делает
RealGetWindowClass
намного более реальным, чем GetClassName
? - Почему
CreateWindowEx
принимает параметр расширенного стиля в качестве первого параметра вместо его последнего? - Когда мне следует использовать
CS_GLOBALCLASS
? - Насколько уникальным должен быть параметр uidsubclass, когда я вызову
SetWindowSubclass
?
Окна верхнего уровня
Оконная рама и подпись
- Получение пользовательского меню правой кнопкой мыши для значка подписи
- Рисовать активную подпись, даже если он не активен
- Как подавить полное окно перетаскивать/изменять размер только для одного окна?
- Как переключить окно между нормальным и полноэкранным?
- Как включить и отключить кнопки минимизации, максимизировать и закрыть в моей панели подписи?
- Получение расположения кнопки закрытия в строке заголовка
- Получение расположения кнопки закрытия в панели заголовка, от Windows 2000 или Windows XP
- Почему размеры максимизированного окна больше монитора?
- Создание окна, которое можно изменить только в одном направлении
- Почему бы вам не пересылать
WM_GETMINMAXINFO
и не закрепить результаты?
DWM
- Почему моя программа не получает сообщение
WM_DWMSENDICONICTHUMBNAIL
когда я прошу культовое представление? - Параметр
MARGINS
для функции DwmExtendFrameIntoClientArea
контролирует, насколько далеко кадр распространяется в область клиента - Как подавить анимацию по умолчанию, которая возникает, когда я скрываю или показываю окно?
- Показать пользовательскую миниатюру для вашего приложения (и, пока вы в нем, пользовательский просмотр в прямом эфире)
- Как я могу обнаружить, что мое окно было подавлено с экрана у оболочки? ("Стветь окна")
Диалоги
- Почему я не могу создать свое диалоговое окно? Ошибка новичка №1
- Почему я не могу создать свое диалоговое окно? Ошибка новичка №2
- Возвращение значений из диалогового процедуры
- Другой тип процедуры диалога
- Другой другой тип диалогового процедуры
- Ответ по умолчанию на каждое диалоговое окно «Отмена»
- Вращение Z-порядка
- Использование клавиши
TAB
для навигации в не-диалогах - Использование клавиши
TAB
для навигации в не-диалогах, Redux - Предотвращение редактирования управляющего текста выбирается в диалоговом окне.
- Те, кто не понимает менеджера диалогов, обречены на повторение его, плохо
- Другие уловки с
WM_GETDLGCODE
-
GetDialogBaseUnits
- Почему не прямоугольники для диалога
MapDialogRect
не прямоугольны? - Почему диалоговые окны изначально созданы скрытыми?
- Что такое сделка с флагом
DS_SHELLFONT
? - Почему
DS_SHELLFONT = DS_FIXEDSYS | DS_SETFONT
? - Как установить фокус в диалоговом окне
- Никогда не оставляйте фокус на контроле с инвалидом
- Тонкость в восстановлении предыдущего положения окна
- Вещи, которые вы уже знаете: как я могу подождать, пока мой диалоговый окно не отобразится, прежде чем что -то делать?
- Что делает
TranslateAccelerator
? - Если у меня есть бесконечное диалоговое окно с пользовательскими акселераторами, которые я должен позвонить в первую очередь:
IsDialogMessage
или TranslateAccelerator
- Нежное напоминание: в диалоговом окне не дайте ОК и отменяйте ускорители
- Почему ускорители для скрытых элементов управления все еще активны?
- Как заставить моих ускорителей применяться только при использовании в главном окне, а не в том случае, когда пользователь использует бесконечный диалог?
- Почему ключ
TAB
не работает на элементах управления, которые я пометил как WS_TABSTOP
? - Вы не можете использовать сообщение
WM_USER
в диалоговом окне - Как я могу сделать диалоговое окно справа налево во время выполнения?
- Как менеджер диалога рассчитывает среднюю ширину персонажа?
Вложенные и встроенные диалоги
- Для чего представлен стиль
DS_CONTROL
? - Больше заметок об использовании стиля
DS_CONTROL
- Это не очень хорошая идея, чтобы дать несколько элементов управления в диалоговом окне.
- При внедрении диалога внутри другого убедитесь, что вы не случайно создаете дублирующие идентификаторы управления.
- Когда вызывается наводка по умолчанию, вызов переходит на диалог верхнего уровня
Общие диалоги
- Почему мой
MessageBox
не завершается в правильном месте? - Как настроить раздел «Любимые ссылки» в диалоговом окне «Открыть файл»?
- Почему диалоговое окно общего файла меняет текущий каталог?
- Вы можете отфильтровать диалог общего файла с помощью подстановочных знаков
- Как я могу отобразить диалоговое окно «Найти принтеры» программно?
- Почему в списке открытых файлов в общих папках не показывают все мои открытые файлы?
- Общий контроль для ассоциации расширений уже просрочен
- Фильтрация папок, которые появляются в диалоговом окне «Просмотр для папки»
- Открытие диалога браузера Classic Folds с предварительно выбранной папкой
- Почему диалоговое окно «Сохранение общего файла» создает временный файл, а затем удаляет его?
- Настройка стандартного диалога по формированию цветов
- Как мне установить начальный каталог диалогового окна «Открыть файл» в виртуальный каталог?
- Когда я выбираю несколько файлов в диалоговом окне «Открыть файл», почему последний элемент поступает первым?
- Я установил опцию
OFN_NONETWORKBUTTON
в структуре OPENFILENAME
, но она не влияет на элемент сети на панели навигации - Как добавить пользовательские элементы управления в общий файл, открытый или диалоги для сохранения файлов?
- Как я могу открыть свой
FileSavePicker
в той же папке, которая была выбрана FileOpenPicker
или FolderPicker
? (WIN32/COM эквивалент, упомянутый в конце поста)
Управление навигацией
- Использование клавиши
TAB
для навигации в не-диалогах - Использование клавиши
TAB
для навигации в не-диалогах, Redux - Управление состоянием пользовательского интерфейса ускорителей и фокусировки прямоугольников
- Пользовательская навигация в диалоговых окнах, Redux
- Диалоговые окны возвращают фокус на управление, которое было сосредоточено, когда вы в последний раз переключались; Как мне принять участие в этом действии для своих собственных окон?
- Как я могу создать не циркулярный порядок вкладки или какой-то другой тип пользовательского упорядочения в моем диалоге Win32?
Диалог -менеджер
- Диалоговый менеджер, часть 1: разминка
- Диспетчер диалога, часть 2: Создание окна кадра
- Диспетчер диалога, часть 3: Создание элементов управления
- Диспетчер диалога, часть 4: Цикл диалога
- Диспетчер диалога, часть 5: преобразование немодального диалогового окна в MODAL
- Диспетчер диалога, часть 6: тонкости в циклах сообщения
- Диспетчер диалога, часть 7: больше тонкостей в циклах сообщения
- Диспетчер диалога, часть 8: Пользовательская навигация в диалоговых окнах
- Диспетчер диалога, часть 9: Пользовательские ускорители в диалоговых окнах
Модальность
- Правильный порядок отключения и включения Windows
- Модальность, часть 1: модальность UI против кодовой модальности
- Модальность, часть 2: кодовая модальность против UI-модальности
- Модальность, часть 3: сообщение
WM_QUIT
- Модальность, часть 4: Важность установки правильного владельца для модального пользовательского интерфейса
- Модальность, часть 5: Установка правильного владельца для модального пользовательского интерфейса
- Модальность, часть 6: взаимодействие с программой, которая прошла модальную
- Модальность, Часть 7: Последовательная
MessageBox
, дешевая версия - Модальность, Часть 8:
MessageBox
- Модальность, часть 9: Установка правильного владельца для модального пользовательского интерфейса, практического экзамена
- Сообщения потоков едят модальными петлями
- Спасение сообщений потоков от модальных петлей через фильтры сообщений
Листы недвижимости
- Какие еще эффекты оказывают
DS_SHELLFONT
на страницы листов свойств? -
PSM_ISDIALOGMESSAGE
- это листы без моделей, так как IsDialogMessage
- это диалоговые окна «Модифицированные» - Вы можете расширить структуру
PROPSHEETPAGE
с помощью собственных бонусных данных - Уведомление
PSN_SETACTIVE
отправляется каждый раз, когда активируется ваша страница мастера - Добавление дополнительной полезной нагрузки в структуру
PROPSHEETPAGE
- Как передать массив структур
PROPSHEETPAGE
переменного размера в листу Property Shiep?
Управление
- То, что вы контроль, не означает, что вы обязательно внутри диалоговое окно
Анимационные элементы управления
- Ограничения управления анимацией оболочки
- Почему управление анимацией версии 6 не использует фоновый поток?
Кнопки
- Для чего подлежит стиль кнопки
BS_PUSHLIKE
? (Не используйте, в настоящее время это полностью устарело. Вместо этого флажок или радиопроизводительность.)
Комбовые коробки
- Ускорение добавления элементов в ComboBox или ListBox (
WM_SETREDRAW
)
Редактировать элементы управления
- В чем дело с сообщением
EM_SETHILITE
? - Предотвращение редактирования управляющего текста выбирается в диалоговом окне.
- Как подавить предупреждение
CapsLock
на элементах управления редактированием пароля? - Ранняя история стиля управления
ES_NUMBER
EDIT - Как я могу разрешить отрицательные числа с помощью стиля управления
ES_NUMBER
Редактировать? - Как я могу ввести знак минус в мой элемент управления редактированием, но только если это первый персонаж?
Список просмотров
- Позиционируемые и не расположенные просмотры ListView
- Отображение инфотипсов для сложенных и развернутых элементов ListView
- Вычислительные инфотапы ListView в фоновом режиме
- В чем разница между
LVM_HITTEST
и LVM_INSERTMARKHITTEST
? - Почему есть уведомление
LVN_ODSTATECHANGED
, когда уже есть совершенно хорошее уведомление LVN_ITEMCHANGED
? - Создание ListView с флажками на некоторых элементах, но не в других
- Как я могу программно изменить размер столбца ListView, чтобы соответствовать его содержимому?
- Как создать флажок «Отключенный» для элемента ListView?
- Ускорение добавления элементов в ComboBox или ListBox (
WM_SETREDRAW
)
Богатый текстовый элемент управления
История контроля Richedit от Мюррея Сарджента (Пост-это просто (сломанная) ссылка на https://blogs.msdn.microsoft.com/murrays/2006/10/19/some-richedit-history/)- Как загрузить весь файл в богатый элемент управления текстом?
- Как мне поместить более 32 000 символов в богатый контроль текста?
- Как распечатать содержимое богатого текстового управления?
Полосы прокрутки
- Программа царапин
- Прокрутки, часть 2
- Прокрутки, часть 3: оптимизация цикла краски
- Прокрутки, часть 4: Добавление пропорциональной полосы прокрутки
- Вероятно, часть 5: Доступность клавиатуры для полос прокрутки
- Приложение к части 5: тонкость в коде клавиатуры
- Свитроль, часть 6 - Колесо
- Распрокат, часть 7 - интегральность
- Прокрутки, часть 8 - интегральный интерактивный изменение размера
- Бабры Свитроля, часть 9 - Поддержание метафоры
- Свитроль, часть 10 - к более глубокому пониманию сообщения
WM_NCCALCSIZE
- Распрокаты, часть 11: к еще более глубокому пониманию сообщения
WM_NCCALCSIZE
- Ответы на упражнения из полос Scroll, часть 11
- Прокрутки, часть 12: применение
WM_NCCALCSIZE
к нашей образе Scrollbar - Scrollbars Redux: Часть 12
- Есть два типа полос прокрутки
- Почему
WHEEL_DELTA
выбрал 120 вместо гораздо более удобного значения, например, 100 или даже 10? - Почему установка горизонтальной диапазоны стержней прокрутки в первый раз также устанавливает вертикальный диапазон и наоборот?
- Автопозреваемая на перетаскивании, часть 1: базовая реализация
- Автопосказывание на перетаскивании, часть 2: Почему прокрутка идет быстрее, если я покачиваю мышь?
- Автопрогнование на перетаскивании, часть 3: Динамический автоматический цикл на основе положения мыши
- Автопрогнование на перетаскивании, часть 4: Динамический автоматический цикл на основе скорости побега
- Автопрогнование на перетаскивании, часть 5: Добавление макияжа к прокрутке, чтобы избежать скорости.
Статические элементы управления
- Когда статическое управление автоматически удаляет загруженное изображение, а когда он обязан применять?
Управление вкладками
- Как мне создать элементы управления в моем диалоговом окне, в котором есть управление вкладками?
- Как я должен создать детей управления вкладками Win32?
Панели инструментов
- Почему есть и
TBSTYLE_EX_VERTICAL
, и CCS_VERT
? - Как создать панель инструментов, которая находится на панели задач?
- Как мне создать кнопку панели инструментов с выравниваемой правой стороны?
- Создание пользовательских задач в списке прыжков
По мотивам инструментов
- Кодирование подсказки инструментов на месте
- Использование пользовательских подсказков для настройки шрифта
- Мультиплексирование нескольких инструментов в одну в подъеме инструментов
- Динамическое генерация текста выдержки инструментов
- Почему я не могу отобразить подсказку для отключенного окна?
- Чрезмерный документальный документ
TTM_RELAYEVENT
и почему он приводит к однородному периодическому таймеру, работающему до тех пор, пока выявляется подсказка
Трекбары
- Добавление ускорителя стрелки
Ctrl
+для перемещения трекбара только на одну единицу, часть 1: начальный погружение - Добавление акселератора стрелки
Ctrl
+для перемещения трекбара только на одну единицу, часть 2: Вторая попытка - Как помешать пользователям использовать мышь для перетаскивания большого пальца трекбар в позиции, которые не являются кратными из пяти? Часть 1: переосмыслить проблему
- Как помешать пользователям использовать мышь для перетаскивания большого пальца трекбар в позиции, которые не являются кратными из пяти? Часть 2: подталкивание позиции большого пальца
Виды с деревьями
- Стиль
TVS_CHECKBOXES
причудливый, что является вежливым способом сказать, что это сумасшедший - Остерегайтесь списка просочившихся изображений при использовании стиля
TVS_CHECKBOXES
- Создание флажков просмотра дерева вручную: простой список изображений состояния
- Создание флажков просмотра дерева вручную: Отвечая на клики
- Создание флажков View View -флажки вручную: тематические флажки
- Флагические флажки по просмотру дерева: грязная история
- Флагиальные флажки с деревьями: расширенная флажок
Обработка сообщений
- Какие номера сообщений принадлежат кому?
- Различные способы отправки сообщения
- Вещание пользовательских сообщений
- Когда поток может получить сообщения оконных сообщений?
- В чем разница между
GetKeyState
и GetAsyncKeyState
? - Сообщения потоков едят модальными петлями
- Спасение сообщений потоков от модальных петлей через фильтры сообщений
- Опасность фильтрации оконных сообщений
- Вы не можете имитировать ввод клавиатуры с
PostMessage
- Перекачивание сообщений в ожидании периода времени
- В поисках очереди сообщения
- Нет, на самом деле, вам нужно передать все беззаботные сообщения
DefWindowProc
- Даже если у вас есть код для обработки сообщения, вам разрешено позвонить в
DefWindowProc
, потому что вы все равно делали это в конце концов - Для чего когда -либо использовались
Get/SetMessageExtraInfo
? - Почему
GetWindowLongPtr
возвращает значение мусора в 64-битных окнах? -
TrackMouseEvent
отслеживает события мыши в вашем окне, но только если события принадлежат вашему окну - Не забудьте включить очередь сообщения в свою иерархию блокировки
- Что происходит с отправленным сообщением, когда
SendMessageTimeout
достигает своего тайм -аута? - Почему я не могу
PostMessage
сообщение WM_COPYDATA
, но я могу SendMessageTimeout
его с крошечным тайм -аутом? - Несмотря на то, что сообщения мыши, краски и таймер генерируются по требованию, все еще возможно, чтобы оказаться в вашей очереди
- Размещенные сообщения обрабатываются перед входными сообщениями, даже если они были опубликованы позже
- Какие сообщения могут получить окно только для сообщения?
- Если прототипы
DispatchMessageA
и DispatchMessageW
идентичны, зачем оба? - Те, кто не понимает менеджера диалогов, обречены на повторение его, плохо
- Как я могу запустить переоборудование курсора мыши после того, как я сменил часть моего внутреннего состояния приложения?
- Как я могу запустить перерыв курсора мыши после того, как я изменил часть моего внутреннего состояния приложения?
-
GetQueueStatus
и состояние очереди
Зацепление
- Для чего используется
HINSTANCE
для SetWindowsHookEx
? - How can I get notified when the cursor changes?
- What does the thread parameter to
SetWindowsHookEx
actually mean? - Why does
SetFocus
fail without telling me why?
Specific Messages
Уведомления
- What's the difference between the
wParam
of the WM_NOTIFY
message and the idFrom
in the NMHDR
structure. - Restating the obvious about the
WM_COMMAND
message - Restating the obvious about the
WM_NOTIFY
message
Window Construction and Destruction
- What is the difference between
WM_DESTROY
and WM_NCDESTROY
? - How can I determine the reason why my window is closing? (
WM_CLOSE
)
Window Geometry Messages
- Use
WM_WINDOWPOSCHANGED
to react to window state changes - Use
WM_WINDOWPOSCHANGING
to intercept window state changes
Window Painting Messages
- Paint messages will come in as fast as you let them (
WM_PAINT
) - What happens if I don't paint when I get a
WM_PAINT
message? - What is the implementation of
WM_PRINTCLIENT
? - There's a default implementation for
WM_SETREDRAW
, but you might be able to do better - Speeding up adding items to a combobox or listbox (
WM_SETREDRAW
) - Using
WM_SETREDRAW
to speed up adding a lot of elements to a control
Window Focus Messages
-
WM_KILLFOCUS
is the wrong time to do field validation - The dangers of playing focus games when handling a
WM_KILLFOCUS
message - Why doesn't the
MoveWindow
function generate the WM_GETMINMAXINFO
message?
Keyboard Messages
- How do I respond to the
WM_MENUCHAR
message?
Mouse Messages
- Why is there no
WM_MOUSEENTER
message? - Why do I get spurious
WM_MOUSEMOVE
messages? - Sure, I can get spurious
WM_MOUSEMOVE
messages, but why do they keep streaming in? - How do I get mouse messages faster than
WM_MOUSEMOVE
? - Logical consequences of the way Windows converts single-clicks into double-clicks
- Implementing higher-order clicks
- How slow do you have to slow-double-click for it to be a rename?
- How can I prevent the mouse from moving in response to touch input?
Dialog Messages
- Those who do not understand the dialog manager are doomed to reimplement it, badly
- Managing the UI state of accelerators and focus rectangles (
WM_CHANGEUISTATE
, WM_QUERYUISTATE
and WM_UPDATEUISTATE
) - Untangling the confusingly-named
WM_UPDATEUISTATE
and WM_CHANGEUISTATE
messages - Who sends the initial
WM_UPDATEUISTATE
message? - How can I prevent the keyboard focus rectangle from appearing on a control I created?
- Other tricks with
WM_GETDLGCODE
- How do I prevent multi-line edit controls from eating the Enter key?
- Why do
DLGC_WANTALLKEYS
and DLGC_WANTMESSAGE
have the same value?
Other Window Messages
- The dangers of messing with activation when handling a
WM_ACTIVATE
message - Why does my window get a
WM_ACTIVATE
message when it isn't active? - A timed context menu (
WM_CANCELMODE
) - Pitfalls in handling the
WM_CONTEXTMENU
message ( WM_CONTEXTMENU
) -
WM_NCHITTEST
is for hit-testing, and hit-testing can happen for reasons other than the mouse being over your window - How likely is it that a window will receive a
WM_NULL
message out of the blue? ( WM_NULL
) - Why is there a special
PostQuitMessage
function? ( WM_QUIT
) - How does
PostQuitMessage
know which thread to post the quit message to? ( WM_QUIT
) - Who is responsible for destroying the font passed in the
WM_SETFONT
message? ( WM_SETFONT
) - When I send a
WM_GETFONT
message to a window, why don't I get a font? ( WM_GETFONT
) - If my
WM_TIMER
handler takes longer than the timer period, will my queue fill up with WM_TIMER
messages? - Killing a window timer prevents the
WM_TIMER
message from being generated for that timer, but it doesn't retroactively remove ones that were already generated
System Messages
- If one program blocks shutdown, then all programs block shutdown (
WM_QUERYENDSESSION
, WM_ENDSESSION
) - Why do I have to return this goofy value for
WM_DEVICECHANGE
? ( WM_DEVICECHANGE
) - Windows doesn't close windows when a user logs off; that's your call (
WM_ENDSESSION
) - Once you return from the
WM_ENDSESSION
message, your process can be terminated at any time ( WM_ENDSESSION
)
GDI
- Why are
RECT
s endpoint-exclusive? - Can you create an information context for the display?
- What does the
CS_OWNDC
class style do? - What does the
CS_CLASSDC
class style do? - How do you detect "Large Fonts"? (DPI)
- Drawing a monochrome bitmap with transparency
- Let GDI do your RLE compression for you
- The mysterious stock bitmap: There's no way to summon it, but it shows up in various places
- Why is my icon being drawn at the wrong size when I call
DrawIcon
? - You must flush GDI operations when switching between direct access and GDI access, and direct access includes other parts of GDI
- How do I get the dimensions of a cursor or icon?
- What are the dire consequences of not selecting objects out of my DC?
- Of what use is the
RDW_INTERNALPAINT
flag? - Functions that return GDI regions rarely actually return regions
- Color-aware ClearType requires access to fixed background pixels, which is a problem if you don't know what the background pixels are, or if they aren't fixed
- What is the correct way of using
SaveDC
and RestoreDC
? - How are
BitBlt
raster opcodes calculated? - Notes on
DrawText
and tab stops - Why doesn't
GetTextExtentPoint
return the correct extent for strings containing tabs? - Why are there trivial functions like
CopyRect
and EqualRect
? - More on trivial functions like
CopyRect
and EqualRect
- What are the consequences of increasing the per-process GDI handle limit?
- The focus rectangle says, “I'm not orange. I'm just drawn that way.”
Cursors
- The effect of
SetCursor
lasts only until the next SetCursor
- What can or should I do with the cursor handle returned by
SetCursor
? - What is the deal with the
SM_CXCURSOR
system metric? - How do I find out the size of the mouse cursor?
Щетки
- The hollow brush
- Other uses for bitmap brushes
- What is the DC brush good for?
- I know I can change the color of the DC pen, but what about the other attributes?
- How can I extract the color from a solid color GDI brush?
Pens
- Is there a difference between creating a null pen with
CreatePen
and just using the stock null pen?
Bitmaps
- How do I set the alpha channel of a GDI bitmap to 255?
DIB
- A survey of the various ways of creating GDI bitmaps with predefined data
- Blitting between color and monochrome DCs
- Manipulating the DIB color table for fun and profit
- Using DIB sections to perform bulk color mapping
- The fun and profit of manipulating the DIB color table can be done without having to modify it
- Separating the metadata from the DIB pixels: Precalculating the
BITMAPINFO
- Separating the metadata from the DIB pixels: Changing the raster operation
- The disembodiment of DIBs from the DIB section
- What is the
hSection
parameter to CreateDIBSection
for?
LockWindowUpdate()
- What does
LockWindowUpdate
do? - How is
LockWindowUpdate
meant to be used? - With what operations is
LockWindowUpdate
meant to be used? - With what operations is
LockWindowUpdate
not meant to be used? - Final remarks on
LockWindowUpdate
Painting Standard Elements
- Rendering standard Windows elements
- Rendering menu glyphs is slightly trickier
- What states are possible in a
DRAWITEMSTRUCT
structure?
UXTHEME.DLL
-
BeginBufferedPaint
: It's not just for buffered painting any more - How do
IsThemeActive
, IsAppThemed
, and IsCompositionActive
differ? - How do I get the tabbed dialog effect on my own custom tabbed dialog?
- How do I revert a control back to its default theme?
Multiple Monitors
- For better performance, set all your monitors to the same color format
- How do I get a handle to the primary monitor?
- Why does the primary monitor have
(0,0)
as its upper left coordinate? - How do I get the color depth of the screen?
- How does the window manager adjust
ptMaxSize
and ptMaxPosition
for multiple monitors?
Accessibility
- Accessibility is not just for people with disabilities
- How to retrieve text under the cursor (mouse pointer)
- How do I set an accessible name on an unlabeled control?
- How can I get notified when some other window is destroyed?
- Using accessibility to monitor windows as they come and go
- How can I write a program that monitors another window for a title change?
- How can I write a program that monitors another window for a change in size or position?
Компонент
Declaring COM Interfaces
- The macros for declaring COM interfaces, revisited: C version
- The macros for declaring COM interfaces, revisited: C++ version
- The macros for declaring COM interfaces, revisited: C++ implementation
- The oracle always tells the truth, even when it is wrong: COM method calls with a user-defined type as a return value (on problems of COM interfaces called from C code)
- The COM interface contract rules exist for a reason
- Giving a single object multiple COM identities, part 1
- Giving a single object multiple COM identities, part 2
- Giving a single object multiple COM identities, part 3
- Giving a single object multiple COM identities, part 4
- How do I consume raw COM interfaces from a Windows Runtime metadata file?
COM Apartments
- The dreaded "main" threading model
- A slightly less brief introduction to COM apartments (but it's still brief)
- Yo dawg, I hear you like COM apartments, so I put a COM apartment in your COM apartment so you can COM apartment while you COM apartment
- What kind of apartment is the private apartment I created via
CLSID_ContextSwitcher
? - Setting up private COM contexts to allow yourself to unload cleanly
- How do you get into a context via
IContextCallback::ContextCallback
? - Using contexts to return to a COM apartment later
- What do the output values from
CoGetApartmentType
mean? - User interface code + multi-threaded apartment = death
- Other problems traced to violating COM single-threaded apartment rules in the shell
- What's the point of
APTTYPE_CURRENT
? I mean, of course I'm current. - How do I get a foothold in the neutral apartment?
- What is so special about the Application STA?
- What does it mean when a call fails with
0x8000001F = RO_E_BLOCKED_CROSS_ASTA_CALL
?
COM Initialization
- What does the
COINIT_SPEED_OVER_MEMORY
flag to CoInitializeEx
do? - Crashing in COM after I call
CoUninitialize
, how can COM be running after it is uninitalized?
COM Static Store
- The COM static store, part 1: Introduction
- The COM static store, part 2: Race conditions in setting a singleton
- The COM static store, part 3: Avoiding creation of an expensive temporary when setting a singleton
- The COM static store, part 4: Aggregating into a single object
- The COM static store, part 5: Using COM weak references
- The COM static store, part 6: Using C++ weak references
COM Marshaling
- What is COM marshaling and how do I use it?
- On proper handling of buffers in COM and RPC methods
- What are the rules for
CoMarshalInterThreadInterfaceInStream
and CoGetInterfaceAndReleaseStream
? - What are the rules for
CoMarshalInterface
and CoUnmarshalInterface
? -
CoGetInterfaceAndReleaseStream
does not mix with smart pointers - The COM marshaller uses the COM task allocator to allocate and free memory
- Why do I get a
QueryInterface(IID_IMarshal)
and then nothing? - We batched up our COM requests and return a single stream of results, but the performance is still slow
- What are the various usage patterns for manually-marshaled interfaces?
- An initial look at the mechanics of how COM marshaling is performed
- https://devblogs.microsoft.com/oldnewthing/20220616-00/?p=106757
- Writing a marshal-by-value marshaler, part 1
- Writing a marshal-by-value marshaler, part 2
- Writing a compound marshaler
- Understanding the marshaling flags: The free-threaded marshaler
COM Error Handling
- What happens to my COM server-side object when clients die unexpectedly?
- Why does COM require output pointers to be initialized even on failure?
- How do I convert an
HRESULT
to a Win32 error code? - How can I tell the WIL
RETURN_IF_FAILED
macro that some errors are ignorable? - Do not overload the
E_NOINTERFACE
error - What does it mean when a call fails with
0x8000001F = RO_E_BLOCKED_CROSS_ASTA_CALL
? - What does it mean when my cross-thread COM call fails with
RPC_E_SYS_CALL_FAILED
? - Understanding a mysterious
RPC_E_WRONGTHREAD
exception when we're on the right thread
COM Asynchronous Interfaces
- COM asynchronous interfaces, part 1: The basic pattern
- COM asynchronous interfaces, part 2: Abandoning the operation
- COM asynchronous interfaces, part 3: Abandoning the operation after a timeout
- COM asynchronous interfaces, part 4: Doing work while waiting for the asynchronous operation
- COM asynchronous interfaces, part 5: The unreliable server
- COM asynchronous interfaces, part 6: Learning about completion without polling
- COM asynchronous interfaces, part 7: Being called directly when the operation completes
- COM asynchronous interfaces, part 8: Asynchronous release, the problems
- COM asynchronous interfaces, part 9: Asynchronous release, assembling a solution
GUIDs
- What's the difference between
UuidFromString
, IIDFromString
, CLSIDFromString
, GUIDFromString
... - What is the difference between
UuidToString
, StringFromCLSID
, StringFromIID
, and StringFromGUID2
? - Why are there four functions for parsing strings into GUIDs, and why are they in three different DLLs?
- Why does COM express GUIDs in a mix of big-endian and little-endian? Why can't it just pick a side and stick with it?
COM Strings
- Why is there a
BSTR
cache anyway? - Raymond's complete guide to
HSTRING
semantics - What is the correct way of using the string buffer returned by the
WindowsPreallocateStringBuffer
function?
COM Variants
- What's the difference between
VARIANT
and VARIANTARG
? - Nasty gotcha:
VarCmp
vs VariantCompare
- Why can't
VarDateFromStr
parse back a Hungarian date that was generated by VarBstrFromDate
?
IUnknown
- The layout of a COM object
- Under what conditions will the
IUnknown::AddRef
method return 0? - The ways people mess up
IUnknown::QueryInterface
- The ways people mess up
IUnknown::QueryInterface
, episode 2 - The ways people mess up
IUnknown::QueryInterface
, episode 3 - The ways people mess up
IUnknown::QueryInterface
, episode 4 - COM object destructors are very sensitive functions
- Avoiding double-destruction when an object is released
- I'd like an
IUnknown
, I know you have many, I'll take any of them - A very brief introduction to patterns for implementing a COM object that hands out references to itself
- Giving a single object multiple COM identities, part 1
- Giving a single object multiple COM identities, part 2
- Giving a single object multiple COM identities, part 3
- Giving a single object multiple COM identities, part 4
- Reducing chattiness by querying for multiple interfaces at once, part 1
- Reducing chattiness by querying for multiple interfaces at once, part 2
IMoniker
- Pidls and monikers do roughly the same thing, just backwards
ICallback
- A very brief introduction to patterns for implementing a COM object that hands out references to itself
IContextMenu
- Why an object cannot be its own enumerator
- How to host an
IContextMenu
, part 1 - Initial foray - How to host an
IContextMenu
, part 2 - Displaying the context menu - How to host an
IContextMenu
, part 3 - Invocation location - How to host an
IContextMenu
, part 4 - Key context - How to host an
IContextMenu
, part 5 - Handling menu messages - How to host an
IContextMenu
, part 6 - Displaying menu help - How to host an
IContextMenu
, part 7 - Invoking the default verb - How to host an
IContextMenu
, part 8 - Optimizing for the default command - How to host an
IContextMenu
, part 9 - Adding custom commands - How to host an
IContextMenu
, part 10 - Composite extensions - groundwork - How to host an
IContextMenu
, part 11 - Composite extensions - composition - Simplifying context menu extensions with
IExecuteCommand
- How do I launch a file as if it were a text file, even though its extension is not
.txt
? - Do not access the disk in your
IContextMenu
handler, no really, don't do it - Sure, we do that: Context menu edition
- Psychic debugging: Why your
IContextMenu::InvokeCommand
doesn't get called even though you returned success from IContextMenu::QueryContextMenu
- Don't forget to implement canonical names for verbs in your shell context menu extension
IFileDialog
- The
SetClientGuid
method of the common file and folder dialogs lets you give names to those dialogs, too (multiple contexts for open/save dialogs) - How can I get my
FileSavePicker
to open in the same folder that was picked by the FileOpenPicker
or FolderPicker
? (win32/COM equivalent mentioned at the end of the post) - Why does IFileDialog still show non-filesystem folders when I pass
FOS_FORCEFILESYSTEM
?
IMultiLanguage
- Converting between
LCID
s and RFC 1766 language codes - Feel free to stop using
IMultiLanguage2::DetectInputCodepage
INamespaceWalk
- How can I control which parts of the shell namespace the
INamespaceWalk::Walk
operation will walk into? - How can I cancel the
INamespaceWalk::Walk
operation? - Cancelling the
INamespaceWalk::Walk
operation a little faster
IStream
- The subtleties of
CreateStreamOnHGlobal
, part 1: Introduction and basic usage - The subtleties of
CreateStreamOnHGlobal
, part 2: Suppressing the deletion of an unknown HGLOBAL
- The subtleties of
CreateStreamOnHGlobal
, part 3: Suppressing the deletion of a shared HGLOBAL
- The subtleties of
CreateStreamOnHGlobal
, part 4: Non-movable memory - A practical use for
GetHGlobalFromStream
when sharing was never your intention
IVirtualDesktopManager
- Virtual desktops are an end-user window management feature, not a programmatic one
Буфер обмена
- How ownership of the Windows clipboard is tracked in Win32
- What happens when applications try to copy text by sending
Ctrl+C
- How do I make it so that users can copy static text on a dialog box to the clipboard easily?
- What is the proper handling of
WM_RENDERFORMAT
and WM_RENDERALLFORMATS
? - Copying a file to the clipboard so you can paste it into Explorer or an email message or whatever
- Printing the contents of the clipboard as text to
stdout
- Improving the performance of
CF_HDROP
by providing file attribute information - What's up with the
CF_SYLK
and CF_DIF
clipboard formats? - How can I wait more than 30 seconds for a delay-rendered clipboard format to become rendered?
Drag and Drop
- What a drag: Dragging text
- What a drag: Dragging a Uniform Resource Locator (URL)
- What a drag: Dragging a Uniform Resource Locator (URL) and text
- What a drag: Dragging a virtual file (
HGLOBAL
edition) - What a drag: Dragging a virtual file (
IStream
edition) - What a drag: Dragging a virtual file (
IStorage
edition) - You can drag multiple virtual objects, you know
- Reading a contract from the other side: Simulating a drop
- Simulating a drop, part two
- What happens if I drag the mouse by exactly the amount specified by
SM_CXDRAG
? - How do I accept files to be opened via
IDropTarget
instead of on the command line? - How do I accept files to be opened via
IDropTarget
instead of on the command line? - bonus content - Using Explorer's fancy drag/drop effects in your own programs
- Drag/drop effects: The little drop information box
- Why isn't my shell namespace extension getting every single
DragOver
mouse message? - Why doesn't my program get fancy drag/drop effects in high contrast mode with
CLSID_DragDropHelper
?
Enumeration
- Using fibers to simplify enumerators, part 1: When life is easier for the enumerator
- Using fibers to simplify enumerators, part 2: When life is easier for the caller
- Using fibers to simplify enumerators, part 3: Having it both ways
- Using fibers to simplify enumerators, part 4: Filtering
- Using fibers to simplify enumerators, part 5: Composition
Оболочка
- When does
SHLoadInProc
unload a DLL? - What does
SHGFI_USEFILEATTRIBUTES
mean? - What's the difference between
SHGetMalloc
, SHAlloc
, CoGetMalloc
, and CoTaskMemAlloc
- Querying information from an Explorer window
- Execute a file as if it were a program, even though its extension is not
EXE
- How do I launch a file as if it were a text file, even though its extension is not
.txt
? - What does the
SEE_MASK_UNICODE
flag in ShellExecuteEx
actually do? - Simple things you can do with the
ShellExecuteEx
function - What were
ShellExecute
hooks designed for? - Why does
ShellExecute
return SE_ERR_ACCESSDENIED
for nearly everything? - How do I
ShellExecute
a file, but with a specific program instead of the default program? - What is the difference between
CSIDL_DESKTOP
and CSIDL_DESKTOPDIRECTORY
? -
SHCIDS_CANONICALONLY
is the moral equivalent in the shell namespace of the Unicode ordinal comparison - Don't forget to double-null-terminate those strings you pass to
SHFileOperation
- Why does
SHFileOperation
have internal error codes for DVD? - Why do non-folders in my shell namespace extension show up in the folder tree view?
-
SHAutoComplete
giveth, and SHAutoComplete
taketh away - What is the
lpClass
member of SHELLEXECUTEINFO
used for? - Some known folders cannot be moved, but others can, and you'll just have to accept that
- One possible reason why
ShellExecute
returns SE_ERR_ACCESSDENIED
and ShellExecuteEx
returns ERROR_ACCESS_DENIED
- Why does
SHGetSpecialFolderPath
take such a long time before returning a network error? - How do you obtain the icon for a shortcut without the shortcut overlay? (
SHGetFileInfo()
) - How can I get information about the items in the Recycle Bin?
- Modernizing our simple program that retrieves information about the items in the Recycle Bin
- Invoking commands on items in the Recycle Bin
- How do I perform shell file operations while avoiding shell copy hooks?
- Command line tool to manage Windows 7 Libraries, with source code (
IShellLibrary
) -
IShellFolder::BindToObject
is a high-traffic method; don't do any heavy lifting - Obtaining the parsing name (and pidl) for a random shell object
- Creating a simple pidl: For the times you care enough to send the very fake
- Creating a simple shell item, just as fake as a simple pidl
- Displaying a property sheet for multiple files
- How do I get a high resolution icon for a file?
- How do I extract an icon at a nonstandard size if
IExtractIcon::Extract
tells me to go jump in a lake? - How do I read the "Double-click to open an item (single-click to select)" setting in Folder Options?
- The wonderful world of shell bind context strings
- Helper functions to make shell bind contexts slightly more manageable
- Customizing item enumeration with
IShellItem
- Customizing item enumeration with
IShellItem
, the old-fashioned way - How do I create an
IShellItemArray
from a bunch of file paths? - How do I invoke a verb on an
IShellItemArray
? - How does a shell namespace extension provide icons for virtual items that track the standard icons set by the user's file associations?
- How do I get the user-customed name of My Computer or Recycle Bin?
- How do I get the user-customized name of a mapped network drive?
- Enumerating all the programs that can open a particular file extension
- Enumerating all the programs that can launch a particular protocol
- How do I register a command on the desktop background context menu? (And how do I remove one I don't like?)
- How can I get the canonical name for a known folder?
- Peeking inside an
IShellItem
to see what it's made of - Why does
SHGetKnownFolderPath
return E_FAIL
for a known folder? - Why does
SHGetKnownFolderPath
fail when impersonating? - Why can't I use
SHSetKnownFolderPath
to change the location of FOLDERID_LocalAppData
? - How do I programmatically add a folder to my Documents library?
- Why doesn't
SHGetFileInfo
give me customized folder icons? - How can I detect that a shell item refers to a virtual folder, or to a file system inside a file?
- Why is there a limit of 15 shell icon overlays?
- The case of the
SHGetFolderPath(CSIDL_COMMON_DOCUMENTS)
that returned ERROR_PATH_NOT_FOUND
- Why is the
HSHELL_WINDOWDESTROYED
notification raised when a window is hidden, even if it hasn't been destroyed? - Why am I receiving
HCNE_UPDATEDIR
notifications that my code never generates? - Why am I receiving
SHCNE_UPDATEDIR
notifications that my code never generates? - How can I get the original target of a shortcut without applying any 32-bit adjustments?
- How does Explorer calculate the “Date” of a file?
Uncategorized COM Stuff
- The macros for declaring and implementing COM interfaces
- An introduction to COM connection points
- Dispatch interfaces as connection point interfaces
- Adjustor thunks
- What is the underlying object behind a COM interface pointer?
- How to turn off the exception handler that COM "helpfully" wraps around your server
- Shortcuts are serializable objects, which means that they can be stored in places other than just a file
- Why does
IFileOperation
skip junctions even though I passed FOFX_NOSKIPJUNCTIONS
? - Nasty gotcha:
STGM_READ | STGM_WRITE
does not grant read/write access - How can I get the list of programs the same way that Programs and Features gets it?
- How do I obtain the computer manufacturer's name via C++? (
IWbemClassObject
) - The stream pointer position in
IDataObject::GetData
and IDataObject::GetDataHere
is significant - The sad implementation history of COM component categories and why it means you have to click twice to see your newly-installed taskbar toolbar
- How do I request that my out-of-process COM server run unelevated?
- How can a desktop app use a Windows Runtime object that infers UI context from its thread? The
IInitializeWithWindow
pattern ( IInitializeWithWindow
) - How do I protect myself against a COM call that can hang? I'm already running the server out-of-process.
- What can I do about timer build-up when waiting for COM outbound calls to complete?
- Manipulating the positions of desktop icons
- A reminder about the correct way of accessing and manipulating the position of icons on the desktop
- The oracle always tells the truth, even when it is wrong: COM method calls with a user-defined type as a return value (on problems of COM interfaces called from C code)
- Notes on COM aggregation: Obtaining a pointer to your aggregated partner without introducing a reference cycle
- Notes on COM aggregation: How do you implement tear-offs in an aggregated object?
- The theory behind the
IHttpFilter
interface
Память
- Stupid memory-mapping tricks
- Creating a shared memory block that can grow in size
- Why do I have to pass a valid page protection value to
VirtualAlloc
even if it ignores it? - How can I include/exclude specific memory blocks in user-mode crash dumps?
-
IsBadXxxPtr
should really be called CrashProgramRandomly ( IsBadWritePtr()
et al.) - A closer look at the stack guard page
- The case of the stack overflow exception when the stack is nowhere near overflowing
- How to allocate address space with a custom alignment or in a custom address region
Input and Output
- Mount points, volumes, and physical drives, oh my!
- What's the difference between an asynchronous
PIPE_WAIT
pipe and a PIPE_NOWAIT
pipe? - Be careful when redirecting both a process's
stdin
and stdout
to pipes, for you can easily deadlock - Looking at the problem at the wrong level: Closing a process's
stdin
-
ReadDirectoryChangesW
reads directory changes, but what if the directory doesn't change? - How do
FILE_FLAG_SEQUENTIAL_SCAN
and FILE_FLAG_RANDOM_ACCESS
affect how the operating system treats my file? - I used
FILE_FLAG_SEQUENTIAL_SCAN
but it didn't seem to speed up my sequential scanning - You can use an
OVERLAPPED
structure with synchronous I/O, too - We're currently using
FILE_FLAG_NO_BUFFERING
and FILE_FLAG_WRITE_THROUGH
, but we would like our WriteFile
to go even faster - On using
ILE_FLAG_WRITE_THROUGH
and FILE_FLAG_NO_BUFFERING
for memory-mapped files - On the interaction between the
FILE_FLAG_NO_BUFFERING
and FILE_FLAG_WRITE_THROUGH
flags - Why does my synchronous overlapped
ReadFile
return FALSE
when the end of the file is reached? - Why does
SetFileValidData
fail even though I enabled the SE_MANAGE_VOLUME_NAME
privilege? - Is
GENERIC_ALL
equivalent to GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE
? -
CancelIoEx
can cancel I/O on console input, which is kind of nice -
CancelIoEx
can cancel synchronous I/O, which is kind of nice - Why does
IsPathRelative
return FALSE
for paths that are drive-relative? - The security check happens at the acquisition of the handle
- Taking a shortcut: You can query properties from a volume, and it will forward to the physical drive
- https://devblogs.microsoft.com/oldnewthing/20201023-00/?p=104395
- How do I disassociate a thread from an I/O completion port?
- Is it okay to call
MapViewOfFile
on the same mapping handle simultaneously from different threads? - What are these dire multithreading consequences that the
GetFullPathName
documentation is trying to warn me about? - How can I force a
WriteFile
or ReadFile
to complete synchronously or hang, in order to test something? - How can I perform a
CopyFile
, but also flush the file buffers before the destination handle is closed?
Asynchronous Input and Output
- Developing the method for taking advantage of the fact that the
OVERLAPPED
associated with asynchronous I/O is passed by address - Ready... cancel... wait for it! (part 1)
- Ready... cancel... wait for it! (part 2)
- Ready... cancel... wait for it! (part 3)
- If you're waiting for I/O to complete, it helps if you actually have an I/O to begin with
- Why does my asynchronous I/O complete synchronously?
- If an asynchronous I/O completes synchronously, is the
hEvent
in the OVERLAPPED
structure signaled anyway? - You can use an
OVERLAPPED
structure with synchronous I/O, too - Why does my synchronous overlapped
ReadFile
return FALSE
when the end of the file is reached? - If I issue a second overlapped I/O operation without waiting for the first one to complete, are they still guaranteed to complete in order?
- Why are my file write operations synchronous, even though I opened the file as
FILE_FLAG_OVERLAPPED
? - File-extending writes are not always synchronous, which is entirely within the contract
- Why you might need additional control over the secret event hiding inside the file object
- Why doesn't my asynchronous read operation complete when I close the handle?
- The mental model for
StartThreadpoolIo
- How can I force a
WriteFile
or ReadFile
to complete synchronously or hang, in order to test something? - If I issue multiple overlapped I/O requests against the same region of a file, will they execute in the order I issued them?
- What are the potentially-erroneous results if you don't pass
NULL
as the lpNumberOfBytesRead
when issuing overlapped I/O?
Files and Directories
- The Definitive Guide on Win32 to NT Path Conversion
- How can I tell that a directory is really a recycle bin?
- How can I tell that a directory is weird and should be excluded from the user interface?
- How do I get information about the target of a symbolic link?
- How do I access a file without updating its last-access time?
- How do I show the contents of a directory while respecting the user's preferences for hidden and super-hidden files as well as the user's language preferences?
- You can use a file as a synchronization object, too
- How can I append to a file and know where it got written, even if the file is being updated by multiple processes?
- The
FILE_FLAG_DELETE_ON_CLOSE
flag applies to the handle, also known as the file object, which is not the same as the file - How long do I have to keep the
SECURITY_ATTRIBUTES
and SECURITY_DESCRIPTOR
structures valid after using them to create a file? - How do I create a directory where people can create subdirectories but cannot mess with those created by other users?
- How can I tell whether a file is on a removable drive, a fixed drive, or a remote drive?
- How can I tell whether a file is on an SSD?
- Why does a non-recursive
ReadDirectoryChangesW
still report files created inside subdirectories? - The early history of Windows file attributes, and why there is a gap between System and Directory
- Even if you open a file with GUID, you can still get its name, or at least one of its names (
GetFinalPathNameByHandle()
) - How do I get from a file path to the volume that holds it?
- How do I get from a volume to the physical disk that holds it?
- Renaming a file is a multi-step process, only one of which is changing the name of the file
- How can I recognize file systems that don't support 64-bit unique file identifiers?
- How can I recognize whether two handles refer to the same underlying file?
Acl
- The
MoveSecurityAttributes
policy affects only how Explorer recalculates ACLs when a file is moved; everybody else is on their own - How to create a folder that inherits its parent's ACL, and then overrides part of it
Security Permissions, Attributes and Identifiers
- The security check happens at the acquisition of the handle
- What is the default security descriptor?
- How do I convert a SID between binary and string forms?
- What are these SIDs of the form
S-1-15-2-xxx
? - What are these SIDs of the form
S-1-15-3-xxx
? - An easy way to determine whether you have a particular file permission
- What are the access rights and privileges that control changing ownership of an object?
- How do the names in the file security dialog map to access control masks?
- If you ask for
STANDARD_RIGHTS_REQUIRED
, you may as well ask for the moon - A user's SID can change, so make sure to check the SID history
- Detecting whether a SID is well-known SID
- SIDs are really just another a fancy way of creating unique IDs in a decentralized way
- What's the point of giving my unnamed object proper security attributes since unnamed objects aren't accessible outside the process anyway (or are they?)
- Is a SID with zero subauthorities a valid SID? It depends whom you ask
- What's the difference between duplicating the handle to a token and duplicating a token?
- I called
AdjustTokenPrivileges
, but I was still told that a necessary privilege was not held - I called
AdjustTokenPrivileges
, but I was still told that a necessary privilege was not held, redux - The history of the
EncodePointer
function for obfuscating pointers - Additional helpful pseudo-handles: The process token, the thread token, and the effective token
- How can I tell whether my process is running as SYSTEM?
- A brief summary of the various versions of the Security Descriptor Definition Language (SDDL)
- How do I free the pointers returned by functions like
GetTokenInformation
? - A clarification on the multithreading constraints of the
EncryptMessage
function
Реестр
- Beware of non-null-terminated registry strings
- The performance cost of reading a registry key
- So how bad is it that I'm calling
RegOpenKey
instead of RegOpenKeyEx
? - If I simply want to create a registry key but don't intend to do anything else with it, what security access mask should I ask for?
- How can I programmatically inspect and manipulate a registry hive file without mounting it?
- Why doesn't
RegSetKeySecurity
propagate inheritable ACEs, but SetSecurityInfo
does? - Why does
RegNotifyChangeKeyValue
stop notifying once the key is deleted? - How can I emulate the
REG_NOTIFY_THREAD_AGNOSTIC
flag on systems that don't support it? part 1 - How can I emulate the
REG_NOTIFY_THREAD_AGNOSTIC
flag on systems that don't support it? part 2 - How can I emulate the
REG_NOTIFY_THREAD_AGNOSTIC
flag on systems that don't support it? Часть 3 - How can I emulate the
REG_NOTIFY_THREAD_AGNOSTIC
flag on systems that don't support it? Часть 4 - How can I emulate the
REG_NOTIFY_THREAD_AGNOSTIC
flag on systems that don't support it? Часть 5 - The history of passing a null pointer as the key name to
RegOpenKeyEx
- On the failed unrealized promise of
RegOverridePredefKey
(ie don't use it.)
Strings and Locales
-
TEXT
vs. _TEXT
vs. _T
, and UNICODE
vs. _UNICODE
- The sad history of Unicode
printf
-style format specifiers in Visual C++ - Nasty gotcha:
SetThreadUILanguage
cannot be used to restore the thread UI language - How can
CharUpper
and CharLower
guarantee that the uppercase version of a string is the same length as the lowercase version? (use LCMapStringEx()
in any new code) - Is there a code page that matches ASCII and can round trip arbitrary bytes through Unicode?
- A consequence of being the first to adopt a standard is that you may end up being the only one to adopt it: The sad story of Korean jamo
- The
activeCodePage
manifest element can be used for more than just setting UTF-8 as the active code page - Feel free to stop using
IMultiLanguage2::DetectInputCodepage
- On the proper care and feeding of the enigmatic
GetDistanceOfClosestLanguageInList
function - How can I get
WideCharToMultiByte
to convert strings encoded in UTF-16BE?
NT Services
- Calling
ShutdownBlockReasonCreate
from my service doesn't stop the user from shutting down - What does it mean when my attempt to stop a Windows NT service fails with
ERROR_BROKEN_PIPE
? - How can I configure my Windows NT service to autostart when the system gains Internet access?
- On the confusing names for the Windows service SID types
Без рубрики
- How do I determine the processor's cache line size? (
GetLogicalProcessorInformation()
) - Why are structure sizes checked strictly?
- What's the difference between
CreateMenu
and CreatePopupMenu
? - Why are
HANDLE
return values so inconsistent? - How to retrieve text under the cursor (mouse pointer)
- How to detect programmatically whether you are running on 64-bit Windows
- A timed context menu
- The importance of passing the
WT_EXECUTELONGFUNCTION
flag to QueueUserWorkItem
- If your callback fails, it's your responsibility to set the error code
- The double-click time tells the window manager how good your reflexes are
- The cursor isn't associated with a window or a window class; it's associated with a thread group
- Menu item states are not reliable until they are shown because they aren't needed until then
- How can I display a live screenshot of a piece of another application?
- Converting from a UTC-based
SYSTEMTIME
directly to a local-time-based SYSTEMTIME
- Programmatically uploading a file to an FTP site
- How can you use both versions 5 and 6 of the common controls within the same module?
- How can I tell if Windows Update is waiting for the system to reboot?
- How do I call
SetTimer
with a timer ID that is guaranteed not to conflict with any other timer ID? - A window can't have two timers with the same ID, so how do I assign an ID that nobody else is using?
- What does it mean when a display change is temporary?
- How do I obtain the comment for a share?
- How accurate are the various Windows time-querying functions?
- How can I detect whether the user is logging off?
- Why are timer IDs and dialog control IDs 64-bit values on 64-bit Windows? Did you really expect people to create more than 4 billion timers or dialog controls?
- If you suppress GDI+ background thread, then you are expected to pump messages yourself
- If one program blocks shutdown, then all programs block shutdown (
WM_QUERYENDSESSION
, WM_ENDSESSION
) - When I ask the
GetIpAddrTable
function to sort the results, how are they sorted? - How can I detect that the system is no longer showing a UAC prompt? (
EVENT_SYSTEM_DESKTOPSWITCH
) - How can I get the number of processors in the system, when there are more than 64?
- Why are some system functions exported as stubs instead as forwarders?
- How can I check whether the user has disconnected from the session?
- Why does
PF_VIRT_FIRMWARE_ENABLED
return false even when virtualization is enabled in the firmware? - How can I convert between IANA time zones and Windows registry-based time zones?
- The focus rectangle says, “I'm not orange. I'm just drawn that way.”
- Why does the precise point at which I get a stack overflow exception change from run to run? (structured exception handling aka SEH)
- How do I programmatically reposition monitors in a multiple-monitor system? (
ChangeDisplaySettingsEx()
) - How do I upgrade a 32-bit tick count to a 64-bit one?
- The error code you get might not be the one you want
- How can I find out which processor architectures are supported via emulation by the current system?
- How can I detect whether the system has a keyboard attached? On the
GetRawInputDeviceList
function - Filtering out fake keyboards from the
GetRawInputDeviceList
function - How expensive is
PssCaptureSnapshot
? Как быстро это? How much memory does it consume? - What is the
CreateExplorerShellUnelevatedTask
scheduled task? - Under what conditions can I modify the memory that I received in the form a
STGMEDIUM
? - Is it true that raising a structured exception from a structured exception handler terminates the process?
- Why are many Windows user interface elements positioned at multiples of 4 or 8 pixels? (DPI,
DEVICE_SCALE_FACTOR
) - A history of the
fd_set
, FD_SETSIZE
, and how it relates to WinSock - How can I detect programmatically whether Windows is an N or KN version?
- How should I interpret the various values of
NLM_CONNECTIVITY
? - How can I find out the last time a user logged on from C++?
- How can I specify icons for my app to use on the Start menu in high contrast mode?
- How can I add an environment variable to a process launched via
ShellExecuteEx
or IContextMenu
? - Functions that return the size of a required buffer generally return upper bounds, not tight bounds