some reminders.
sh
file handling
Recursively find the most recently changed files in a folder?
find . -type f -exec stat -c "%Y %n" \{\} \; | sort -n | tail -n20
ATL
Dialogs
No XP theming on dialog items?
Deriving from CAxDialogImpl
may prevent XP theming. If possible use CDialogImpl instead.
Assertions on accelerator tables?
Accelerators not working?
Known problem with modeless ATL Dialog (i.e. for property pages) - see
Q216503 or this fix.
Accelerators not working?
Win32
Foreground windows
Problems getting windows to system-level foreground in win>=2000?
Intented behaviour by MS, only application-level foreground is encouraged.This seems to be the most reliable workaround:
HWND hCurrWnd = ::GetForegroundWindow(); DWORD id = ::GetCurrentThreadId(); DWORD currId = ::GetWindowThreadProcessId(hCurrWnd, 0); ::AttachThreadInput(id, currId, TRUE); ::SetForegroundWindow(to); ::AttachThreadInput(id, currId, FALSE);
Getting focus stolen again?
Repeat the above utilizing a timer. Requires to explicitly activate other windows manually though if needed.
.inf files
How to invoke .inf file handlers?
If ShellExecute() is insufficient try e.g. InstallHinfSection.
Outlook
Ribbon
Your IRibbonExtensibility implementation does not get called?
Not implementing the ribbon callback interface may cause that.
Your Ribbon callback interface is not invoked?
Don't forget to set your COM ProgId in the custom ui xml.
OOM
Outlooks duplicate checking for new contacts is not working when a custom addin is active?
Adding custom actions on new and unstored contacts causes duplicate checking to not work (discussion).
Visual Studio 2005
Icons
Icons mysteriously losing color depth?
Only create dummy icons in VS, overwrite them with external ones and
never open them in VS again.
R6002
Runtime error R6002, floating-point support not loaded?
Known issue - printf()/scanf()/et al in a module without floating point instructions. Add dummy floating point operation
to let the compiler enable floating-point support.