23#define NONAMELESSUNION
135#define WM_MSI_DIALOG_CREATE (WM_USER+0x100)
136#define WM_MSI_DIALOG_DESTROY (WM_USER+0x101)
138#define USER_INSTALLSTATE_ALL 0x1000
253 if( *
p !=
'\\' && *
p !=
'&' )
257 for(
i=++
p;
i<
q;
i++ )
258 if( *
i ==
'}' || *
i ==
'\\' )
293 memset( &lf, 0,
sizeof lf );
430 TRACE(
"Dialog %s control %s hwnd %p\n",
448 if (!rec)
return NULL;
489 flags &= ~LR_DEFAULTSIZE;
539 memset( &tvi, 0,
sizeof tvi );
576 if (text_fmt)
text = text_fmt;
593 TRACE(
"progress: func %lu val1 %lu val2 %lu\n",
func, val1, val2 );
610 ctrl->progress_current = 0;
616 if (val2)
dialog->package->action_progress_increment = val1;
617 else dialog->package->action_progress_increment = 0;
620 if (
ctrl->progress_backwards)
623 else ctrl->progress_current = 0;
627 if (
ctrl->progress_current + units < ctrl->progress_max)
ctrl->progress_current +=
units;
628 else ctrl->progress_current =
ctrl->progress_max;
636 FIXME(
"unknown progress message %lu\n",
func );
674 TRACE(
"already subscribed\n");
678 if (!(sub =
msi_alloc(
sizeof(*sub) )))
return;
712 L"SELECT * FROM `EventMapping` WHERE `Dialog_` = '%s' AND `Control_` = '%s'",
853 while (*
p && *
p !=
'{')
p++;
854 if (!*
p++)
return text;
856 while (*
p && *
p !=
'}')
p++;
857 if (!*
p++)
return text;
873 if (
p && (
p[1] == 0 ||
p[1] ==
' '))
881 else ERR(
"Badly formatted property string - what happens?\n");
932 L"SELECT * FROM `ControlEvent` WHERE `Dialog_` = '%s' AND `Control_` = '%s' ORDER BY `Ordering`",
936 ERR(
"query failed\n");
943 if (
dialog->pending_event)
956 HBITMAP hOleBitmap = 0,
hBitmap = 0, hOldSrcBitmap, hOldDestBitmap;
974 IStream_Release( stm );
977 ERR(
"failed to load picture\n");
981 r = IPicture_get_Handle( pic, (OLE_HANDLE *)&hOleBitmap );
984 ERR(
"failed to get bitmap handle\n");
992 ERR(
"failed to get bitmap size\n");
1007 StretchBlt( destdc, 0, 0,
cx,
cy, srcdc, 0, 0, bm.bmWidth, bm.bmHeight,
SRCCOPY );
1014 if (pic) IPicture_Release( pic );
1107 return state[0] ? 1 : 0;
1228 TRACE(
"Dialog %s control %s hwnd %p\n",
1441 for (
j = 0;
j <
info->num_items;
j++)
1465 info->addpos_items++;
1477 L"SELECT * FROM `ComboBox` WHERE `Property` = '%s' ORDER BY `Order`",
property );
1588 for (
j = 0;
j <
info->num_items;
j++)
1645 info->addpos_items = 0;
1675#define MAX_NUM_DIGITS 11
1718#define MASK_MAX_GROUPS 20
1760 for(
i=0,
n=0;
i<
info->num_groups;
i++ )
1762 if (
info->group[
i].len == ~0
u)
1770 if (
info->group[
i].len +
n >
info->num_chars)
1772 ERR(
"can't fit control %d text into template\n",
i);
1777 for(
r=0;
r<
info->group[
i].len;
r++)
1784 if(
r !=
info->group[
i].len )
1791 TRACE(
"%d/%d controls were good\n",
i,
info->num_groups);
1793 if(
i ==
info->num_groups )
1808 for(
i=0;
i<
info->num_groups;
i++ )
1813 if(
i >= (
info->num_groups-1) )
1863 for(
i = 0;
i <
info->num_groups;
i++ )
1905 if(
p[0] == 0 ||
p[0] ==
'>' )
1910 info->group[0].type =
'&';
1911 info->group[0].len = ~0
u;
1918 for(
n=0;
p[
n] ==
p[0];
n++ )
1921 info->group[
i].type =
p[0];
1937 info->num_groups =
i;
1957 for(
i = 0;
i <
info->num_groups;
i++ )
1961 if (
info->num_chars)
1975 ERR(
"failed to create mask edit sub window\n");
2006 WARN(
"mask template is empty\n");
2023 ERR(
"Failed to create maskedit container\n");
2238 group->parent->hwnd );
2317 r =
MSI_OpenQuery( package->db, &
view,
L"SELECT * FROM `RadioButton` WHERE `Property` = '%s'", prop );
2320 ERR(
"query failed for dialog %s radio group %s\n",
2326 group.parent = control;
2420 package = info->dialog->package;
2425 ERR(
"item %p feature was NULL\n",
hItem);
2517 memset( &tvis, 0,
sizeof tvis );
2536 if (
feature->Display % 2 != 0 )
2542 info->selected = hfirst;
2547 const int bm_width = 32, bm_height = 16, bm_count = 3;
2548 const int bm_resource = 0x1001;
2556 ERR(
"failed to create image list\n");
2560 for (
i=0;
i<bm_count;
i++)
2565 ERR(
"failed to load bitmap %d\n",
i);
2727 for (
j = 0;
j <
info->num_items;
j++)
2751 info->addpos_items++;
2762 L"SELECT * FROM `ListBox` WHERE `Property` = '%s' ORDER BY `Order`",
property );
2834 info->addpos_items = 0;
2917 if ( !
wcscmp( wfd.cFileName,
L"." ) || !
wcscmp( wfd.cFileName,
L".." ) )
2924 item.pszText = wfd.cFileName;
3020 switch (nmhdr->
code)
3036 ERR(
"no list-view item selected\n");
3121 L"VolumeCostVolume",
3123 L"VolumeCostAvailable",
3124 L"VolumeCostRequired",
3125 L"VolumeCostDifference",
3166 FIXME(
"Style prefix not supported\n");
3198 total_cost += ((
LONGLONG)each_cost) * 512;
3204 total_cost -= ((
LONGLONG)each_cost) * 512;
3229 if ( !
size )
return;
3232 if ( !drives )
return;
3258 difference =
free.QuadPart - cost;
3261 lvitem.iSubItem = 1;
3262 lvitem.pszText = size_text;
3263 lvitem.cchTextMax =
lstrlenW(size_text) + 1;
3267 lvitem.iSubItem = 2;
3268 lvitem.pszText = size_text;
3269 lvitem.cchTextMax =
lstrlenW(size_text) + 1;
3272 lvitem.iSubItem = 3;
3273 lvitem.pszText = cost_text;
3274 lvitem.cchTextMax =
lstrlenW(cost_text) + 1;
3278 lvitem.iSubItem = 4;
3279 lvitem.pszText = size_text;
3280 lvitem.cchTextMax =
lstrlenW(size_text) + 1;
3324 ERR(
"No ComboBox item selected!\n");
3345 if ( !
size )
return;
3348 if ( !drives )
return;
3400 while (*
p && *
p !=
'<')
p++;
3413 if (*
p ==
'\"' || *
p ==
'\'')
quote = *
p++;
3451 else item.szUrl[0] = 0;