QuickLaunchBar::QuickLaunchBar(HWND hwnd)
: super(hwnd)
{
+ CONTEXT("QuickLaunchBar::QuickLaunchBar()");
+
_dir = NULL;
_next_id = IDC_FIRST_QUICK_ID;
HWND QuickLaunchBar::Create(HWND hwndParent)
{
+ CONTEXT("QuickLaunchBar::Create()");
+
ClientRect clnt(hwndParent);
HWND hwnd = CreateToolbarEx(hwndParent,
void QuickLaunchBar::AddShortcuts()
{
+ CONTEXT("QuickLaunchBar::AddShortcuts()");
+
WaitCursor wait;
try {
TCHAR path[_MAX_PATH];
- SpecialFolderFSPath app_data(CSIDL_APPDATA, _hwnd);
+ SpecialFolderFSPath app_data(CSIDL_APPDATA, _hwnd); // perhaps also look into CSIDL_COMMON_APPDATA ?
_stprintf(path, TEXT("%s\\")QUICKLAUNCH_FOLDER, (LPCTSTR)app_data);
int QuickLaunchBar::Command(int id, int code)
{
+ CONTEXT("QuickLaunchBar::Command()");
+
_entries[id]._entry->launch_entry(_hwnd);
return 0;
{
int l = wcslen(s) + 1;
_str = (LPSTR) malloc(2*l);
- WideCharToMultiByte(CP_ACP, 0, s, -1, _str, 2*l, 0, 0);
+
+ if (WideCharToMultiByte(CP_ACP, 0, s, -1, _str, 2*l, 0, 0) <= 0)
+ *_str = '\0';
}
~ANS()
{
int l = strlen(s) + 1;
_str = (LPWSTR) malloc(2*l);
- MultiByteToWideChar(CP_ACP, 0, s, -1, _str, l);
+
+ if (MultiByteToWideChar(CP_ACP, 0, s, -1, _str, l) <= 0)
+ *_str = '\0';
}
~UNC()