Exemplo n.º 1
0
static void Toolbar_setlabel(void)
{
    // Get current workspace name...
    DesktopInfo DI;
    HWND hwnd;

    GetDesktopInfo (& DI);
    strcpy(Toolbar_WorkspaceName, DI.name);
    if (Toolbar_ShowingExternalLabel)
        return;

#ifdef BBOPT_MEMCHECK
    // Display some statistics.
    if (m_alloc_size()) {
        struct menu_stats st;
        Menu_Stats(&st);
        sprintf(Toolbar_CurrentWindow,"Menus %d  MenuItems %d  Memory %d", st.menu_count, st.item_count, m_alloc_size());
        return;
    }
#endif
    hwnd = GetForegroundWindow();
    if (NULL == hwnd || is_bbwindow(hwnd)) {
        if (GetCapture())
            return;
        hwnd = BBhwnd;
    }
    get_window_text(hwnd, Toolbar_CurrentWindow, sizeof Toolbar_CurrentWindow);
}
Exemplo n.º 2
0
INT_PTR configuration_dialog::wm_command(HWND hwnd_dlg, WPARAM wparam, LPARAM /*lparam*/)
{
    switch (LOWORD(wparam))
    {
    case IDOK:
        m_settings->logging.append = SendDlgItemMessage(hwnd_dlg, IDC_APPENDTOLOGFILES, BM_GETCHECK, 0, 0) == BST_CHECKED;
        m_settings->logging.level = txtvc::log_levels[SendDlgItemMessage(hwnd_dlg, IDC_LOGLEVEL, CB_GETCURSEL, 0, 0)].level;
        m_settings->logging.directory = get_window_text(GetDlgItem(hwnd_dlg, IDC_LOGFILEDIRECTORY));
        EndDialog(hwnd_dlg, IDOK);
        return TRUE;
    case IDCANCEL:
        EndDialog(hwnd_dlg, IDCANCEL);
        return TRUE;
    case IDC_BROWSE_LOGFILEDIRECTORY:
        browse_logfiledirectory(hwnd_dlg);
        return TRUE;
    default:
        return FALSE;
    }
}