126#define WM_MSI_DIALOG_CREATE (WM_USER+0x100)
127#define WM_MSI_DIALOG_DESTROY (WM_USER+0x101)
129#define USER_INSTALLSTATE_ALL 0x1000
247 if( *
p !=
'\\' && *
p !=
'&' )
251 for(
i=++
p;
i<
q;
i++ )
252 if( *
i ==
'}' || *
i ==
'\\' )
287 memset( &lf, 0,
sizeof lf );
427 TRACE(
"Dialog %s control %s hwnd %p\n",
444 if (!rec)
return NULL;
484 flags &= ~LR_DEFAULTSIZE;
534 memset( &tvi, 0,
sizeof tvi );
570 if (text_fmt)
text = text_fmt;
587 TRACE(
"progress: func %lu val1 %lu val2 %lu\n",
func, val1, val2 );
604 ctrl->progress_current = 0;
610 if (val2)
dialog->package->action_progress_increment = val1;
611 else dialog->package->action_progress_increment = 0;
614 if (
ctrl->progress_backwards)
617 else ctrl->progress_current = 0;
622 else ctrl->progress_current =
ctrl->progress_max;
630 FIXME(
"unknown progress message %lu\n",
func );
668 TRACE(
"already subscribed\n");
672 if (!(sub =
malloc(
sizeof(*sub) )))
return;
706 L"SELECT * FROM `EventMapping` WHERE `Dialog_` = '%s' AND `Control_` = '%s'",
845 while (*
p && *
p !=
'{')
p++;
846 if (!*
p++)
return text;
848 while (*
p && *
p !=
'}')
p++;
849 if (!*
p++)
return text;
865 if (
p && (
p[1] == 0 ||
p[1] ==
' '))
873 else ERR(
"Badly formatted property string - what happens?\n");
924 L"SELECT * FROM `ControlEvent` WHERE `Dialog_` = '%s' AND `Control_` = '%s' ORDER BY `Ordering`",
928 ERR(
"query failed\n");
935 if (
dialog->pending_event)
948 HBITMAP hOleBitmap = 0,
hBitmap = 0, hOldSrcBitmap, hOldDestBitmap;
966 IStream_Release( stm );
969 ERR(
"failed to load picture\n");
973 r = IPicture_get_Handle( pic, (OLE_HANDLE *)&hOleBitmap );
976 ERR(
"failed to get bitmap handle\n");
984 ERR(
"failed to get bitmap size\n");
999 StretchBlt( destdc, 0, 0,
cx,
cy, srcdc, 0, 0, bm.bmWidth, bm.bmHeight,
SRCCOPY );
1006 if (pic) IPicture_Release( pic );
1099 return state[0] ? 1 : 0;
1378 for (
j = 0;
j <
info->num_items;
j++)
1402 info->addpos_items++;
1414 L"SELECT * FROM `ComboBox` WHERE `Property` = '%s' ORDER BY `Order`",
property );
1525 for (
j = 0;
j <
info->num_items;
j++)
1582 info->addpos_items = 0;
1612#define MAX_NUM_DIGITS 11
1654#define MASK_MAX_GROUPS 20
1696 for(
i=0,
n=0;
i<
info->num_groups;
i++ )
1698 if (
info->group[
i].len == ~0
u)
1706 if (
info->group[
i].len +
n >
info->num_chars)
1708 ERR(
"can't fit control %d text into template\n",
i);
1713 for(
r=0;
r<
info->group[
i].len;
r++)
1720 if(
r !=
info->group[
i].len )
1727 TRACE(
"%d/%d controls were good\n",
i,
info->num_groups);
1729 if(
i ==
info->num_groups )
1744 for(
i=0;
i<
info->num_groups;
i++ )
1749 if(
i >= (
info->num_groups-1) )
1797 for(
i = 0;
i <
info->num_groups;
i++ )
1839 if(
p[0] == 0 ||
p[0] ==
'>' )
1844 info->group[0].type =
'&';
1845 info->group[0].len = ~0
u;
1852 for(
n=0;
p[
n] ==
p[0];
n++ )
1855 info->group[
i].type =
p[0];
1871 info->num_groups =
i;
1890 for(
i = 0;
i <
info->num_groups;
i++ )
1894 if (
info->num_chars)
1908 ERR(
"failed to create mask edit sub window\n");
1938 WARN(
"mask template is empty\n");
1954 ERR(
"Failed to create maskedit container\n");
2168 group->parent->hwnd );
2247 r =
MSI_OpenQuery( package->db, &
view,
L"SELECT * FROM `RadioButton` WHERE `Property` = '%s'", prop );
2250 ERR(
"query failed for dialog %s radio group %s\n",
2344 package = info->dialog->package;
2349 ERR(
"item %p feature was NULL\n",
hItem);
2438 memset( &tvis, 0,
sizeof tvis );
2457 if (
feature->Display % 2 != 0 )
2463 info->selected = hfirst;
2468 const int bm_width = 32, bm_height = 16, bm_count = 3;
2469 const int bm_resource = 0x1001;
2477 ERR(
"failed to create image list\n");
2481 for (
i=0;
i<bm_count;
i++)
2486 ERR(
"failed to load bitmap %d\n",
i);
2647 for (
j = 0;
j <
info->num_items;
j++)
2671 info->addpos_items++;
2682 L"SELECT * FROM `ListBox` WHERE `Property` = '%s' ORDER BY `Order`",
property );
2753 info->addpos_items = 0;
2836 if ( !
wcscmp( wfd.cFileName,
L"." ) || !
wcscmp( wfd.cFileName,
L".." ) )
2843 item.pszText = wfd.cFileName;
2942 switch (nmhdr->
code)
2958 ERR(
"no list-view item selected\n");
3043 L"VolumeCostVolume",
3045 L"VolumeCostAvailable",
3046 L"VolumeCostRequired",
3047 L"VolumeCostDifference",
3088 FIXME(
"Style prefix not supported\n");
3103 free( lvc.pszText );
3119 total_cost += each_cost;
3124 total_cost -= each_cost;
3149 if ( !
size )
return;
3152 if ( !drives )
return;
3178 difference =
unused.QuadPart - cost;
3181 lvitem.iSubItem = 1;
3182 lvitem.pszText = size_text;
3183 lvitem.cchTextMax =
lstrlenW(size_text) + 1;
3187 lvitem.iSubItem = 2;
3188 lvitem.pszText = size_text;
3189 lvitem.cchTextMax =
lstrlenW(size_text) + 1;
3192 lvitem.iSubItem = 3;
3193 lvitem.pszText = cost_text;
3194 lvitem.cchTextMax =
lstrlenW(cost_text) + 1;
3198 lvitem.iSubItem = 4;
3199 lvitem.pszText = size_text;
3200 lvitem.cchTextMax =
lstrlenW(size_text) + 1;
3243 ERR(
"No ComboBox item selected!\n");
3264 if ( !
size )
return;
3267 if ( !drives )
return;
3319 while (*
p && *
p !=
'<')
p++;
3332 if (*
p ==
'\"' || *
p ==
'\'')
quote = *
p++;
3370 else item.szUrl[0] = 0;