Commit 93c68a7e authored by Thuy Nguyen's avatar Thuy Nguyen Committed by Alexandre Julliard

Added support for adding and removing pages dynamically from a

property sheet.
parent 9aded513
/******************************************************************************
*
* Property Sheets
*
* Copyright 1999 Thuy Nguyen
*
*/
extern HMODULE COMCTL32_hModule;
#define IDD_PROPSHEET 1006
#define IDD_WIZARD 1020
#define IDC_TABCONTROL 12320
#define IDC_APPLY_BUTTON 12321
#include "winuser.h"
#include "propsheet.h"
PROPSHEET DIALOG DISCARDABLE 0, 0, 292, 159
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 292, 159
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Properties for "
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK", IDOK,72,138,50,14
PUSHBUTTON "Cancel", IDCANCEL,127,138,50,14
PUSHBUTTON "&Apply", 12321,181,138,50,14
PUSHBUTTON "&Apply", IDC_APPLY_BUTTON,181,138,50,14
PUSHBUTTON "Help", IDHELP,235,138,50,14
CONTROL "Tab", 12320,"SysTabControl32",WS_CLIPSIBLINGS,7,7,278,125
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS,7,7,278,125
END
......@@ -1422,6 +1422,22 @@ TAB_DeleteItem (HWND hwnd, WPARAM wParam, LPARAM lParam)
(infoPtr->uNumItem - iItem) * sizeof(TAB_ITEM));
COMCTL32_Free (oldItems);
/*
* Readjust the selected index.
*/
if ((iItem == infoPtr->iSelected) && (iItem > 0))
infoPtr->iSelected--;
if (iItem < infoPtr->iSelected)
infoPtr->iSelected--;
/*
* Reposition and repaint tabs.
*/
TAB_SetItemBounds(hwnd);
TAB_InvalidateTabArea(hwnd,infoPtr);
bResult = TRUE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment