#include <windows.h>
#include <commctrl.h>
#include <assert.h>
+#include <ctype.h>
#include "winstuff.h"
#include "misc.h"
SWP_NOACTIVATE | SWP_NOCOPYBITS |
SWP_NOMOVE | SWP_NOZORDER);
}
- }
+ } else
+ ctl = NULL;
return ctl;
}
*/
char *staticwrap(struct ctlpos *cp, HWND hwnd, char *text, int *lines)
{
- HFONT font = (HFONT) cp->font;
HDC hdc = GetDC(hwnd);
int lpx = GetDeviceCaps(hdc, LOGPIXELSX);
int width, nlines, j;
if ((int)wParam == hdl->listid) {
DRAGLISTINFO *dlm = (DRAGLISTINFO *)lParam;
- int dest;
+ int dest = 0; /* initialise to placate gcc */
switch (dlm->uNotification) {
case DL_BEGINDRAG:
hdl->dummyitem =
struct ctlpos pos;
- char shortcuts[MAX_SHORTCUTS_PER_CTRL], nshortcuts;
+ char shortcuts[MAX_SHORTCUTS_PER_CTRL];
+ int nshortcuts;
char *escaped;
- int i, base_id, num_ids, orig_tabdelay;
+ int i, base_id, num_ids;
void *data;
base_id = *id;
for (i = 0; i < s->ncontrols; i++) {
union control *ctrl = s->ctrls[i];
- orig_tabdelay = FALSE;
-
/*
* Generic processing that pertains to all control types.
* At the end of this if statement, we'll have produced
assert(!ctrl->generic.tabdelay);
ctrl = ctrl->tabdelay.ctrl;
- orig_tabdelay = TRUE;
for (i = 0; i < ntabdelays; i++)
if (tabdelayed[i] == ctrl)
pos = tabdelays[i]; /* structure copy */
+ colstart = colspan = -1; /* indicate this was tab-delayed */
+
} else {
/*
* If it wasn't one of those, it's a genuine control;
break;
default:
assert(!"Can't happen");
+ num_ids = 0; /* placate gcc */
break;
}
base_id += num_ids;
}
- if (!orig_tabdelay) {
+ if (colstart >= 0) {
/*
* Update the ypos in all columns crossed by this
* control.
/*
* Look up the control ID in our data.
*/
+ c = NULL;
for (i = 0; i < dp->nctrltrees; i++) {
c = winctrl_findbyid(dp->controltrees[i], LOWORD(wParam));
if (c)
* checked before generating an event.
*/
if (msg == WM_COMMAND &&
- HIWORD(wParam) == BN_CLICKED ||
- HIWORD(wParam) == BN_DOUBLECLICKED &&
+ (HIWORD(wParam) == BN_CLICKED ||
+ HIWORD(wParam) == BN_DOUBLECLICKED) &&
IsDlgButtonChecked(dp->hwnd, LOWORD(wParam))) {
ctrl->generic.handler(ctrl, dp, dp->data, EVENT_VALCHANGE);
}
/*
* Look up the control ID in our data.
*/
+ c = NULL;
for (i = 0; i < dp->nctrltrees; i++) {
c = winctrl_findbyid(dp->controltrees[i], id);
if (c)
int msg;
assert(c &&
(c->ctrl->generic.type == CTRL_LISTBOX ||
- c->ctrl->generic.type == CTRL_EDITBOX &&
- c->ctrl->editbox.has_list));
+ (c->ctrl->generic.type == CTRL_EDITBOX &&
+ c->ctrl->editbox.has_list)));
msg = (c->ctrl->generic.type==CTRL_LISTBOX && c->ctrl->listbox.height!=0 ?
LB_RESETCONTENT : CB_RESETCONTENT);
SendDlgItemMessage(dp->hwnd, c->base_id+1, msg, 0, 0);
int msg;
assert(c &&
(c->ctrl->generic.type == CTRL_LISTBOX ||
- c->ctrl->generic.type == CTRL_EDITBOX &&
- c->ctrl->editbox.has_list));
+ (c->ctrl->generic.type == CTRL_EDITBOX &&
+ c->ctrl->editbox.has_list)));
msg = (c->ctrl->generic.type==CTRL_LISTBOX && c->ctrl->listbox.height!=0 ?
LB_DELETESTRING : CB_DELETESTRING);
SendDlgItemMessage(dp->hwnd, c->base_id+1, msg, index, 0);
int msg;
assert(c &&
(c->ctrl->generic.type == CTRL_LISTBOX ||
- c->ctrl->generic.type == CTRL_EDITBOX &&
- c->ctrl->editbox.has_list));
+ (c->ctrl->generic.type == CTRL_EDITBOX &&
+ c->ctrl->editbox.has_list)));
msg = (c->ctrl->generic.type==CTRL_LISTBOX && c->ctrl->listbox.height!=0 ?
LB_ADDSTRING : CB_ADDSTRING);
SendDlgItemMessage(dp->hwnd, c->base_id+1, msg, 0, (LPARAM)text);
int msg, msg2, index;
assert(c &&
(c->ctrl->generic.type == CTRL_LISTBOX ||
- c->ctrl->generic.type == CTRL_EDITBOX &&
- c->ctrl->editbox.has_list));
+ (c->ctrl->generic.type == CTRL_EDITBOX &&
+ c->ctrl->editbox.has_list)));
msg = (c->ctrl->generic.type==CTRL_LISTBOX && c->ctrl->listbox.height!=0 ?
LB_ADDSTRING : CB_ADDSTRING);
msg2 = (c->ctrl->generic.type==CTRL_LISTBOX && c->ctrl->listbox.height!=0 ?
struct winctrls {
tree234 *byctrl, *byid;
};
+struct controlset;
+struct controlbox;
+
void winctrl_init(struct winctrls *);
void winctrl_cleanup(struct winctrls *);
void winctrl_add(struct winctrls *, struct winctrl *);
struct ctlpos *cp, struct controlset *s, int *id);
int winctrl_handle_command(struct dlgparam *dp, UINT msg,
WPARAM wParam, LPARAM lParam);
+void winctrl_rem_shortcuts(struct dlgparam *dp, struct winctrl *c);
+int winctrl_context_help(struct dlgparam *dp, HWND hwnd, int id);
+
+/*
+ * Exports from wincfg.c.
+ */
+void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help,
+ int midsession);
/*
* Exports from windlg.c.
void showeventlog(HWND);
void showabout(HWND);
void force_normal(HWND hwnd);
+void modal_about_box(HWND hwnd);
+void show_help(HWND hwnd);
/*
* Exports from sizetip.c.