ReactOS  0.4.15-dev-4603-gb922b6d
dialog.c File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winnls.h"
#include "msi.h"
#include "msidefs.h"
#include "ocidl.h"
#include "olectl.h"
#include "richedit.h"
#include "commctrl.h"
#include "winreg.h"
#include "shlwapi.h"
#include "shellapi.h"
#include "wine/debug.h"
#include "msipriv.h"
#include "msiserver.h"
#include "resource.h"
Include dependency graph for dialog.c:

Go to the source code of this file.

Classes

struct  msi_control_tag
 
struct  msi_font_tag
 
struct  msi_dialog_tag
 
struct  subscriber
 
struct  control_handler
 
struct  radio_button_group_descr
 
struct  msi_selection_tree_info
 
struct  dialog_control
 
struct  msi_text_info
 
struct  msi_scrolltext_info
 
struct  msi_streamin_info
 
struct  msi_combobox_info
 
struct  msi_mask_group
 
struct  msi_maskedit_info
 
struct  msi_pathedit_info
 
struct  msi_listbox_info
 
struct  listview_param
 
struct  control_event
 

Macros

#define COBJMACROS
 
#define NONAMELESSUNION
 
#define WM_MSI_DIALOG_CREATE   (WM_USER+0x100)
 
#define WM_MSI_DIALOG_DESTROY   (WM_USER+0x101)
 
#define USER_INSTALLSTATE_ALL   0x1000
 
#define MAX_NUM_DIGITS   11
 
#define MASK_MAX_GROUPS   20
 

Typedefs

typedef struct msi_control_tag msi_control
 
typedef UINT(* msi_handler) (msi_dialog *, msi_control *, WPARAM)
 
typedef void(* msi_update) (msi_dialog *, msi_control *)
 
typedef UINT(* control_event_handler) (msi_dialog *, const WCHAR *, const WCHAR *)
 
typedef UINT(* event_handler) (msi_dialog *, const WCHAR *)
 
typedef struct msi_font_tag msi_font
 
typedef UINT(* msi_dialog_control_func) (msi_dialog *dialog, MSIRECORD *rec)
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (msi)
 
static LPWSTR msi_get_window_text (HWND hwnd)
 
static INT msi_dialog_scale_unit (msi_dialog *dialog, INT val)
 
static msi_controlmsi_dialog_find_control (msi_dialog *dialog, LPCWSTR name)
 
static msi_controlmsi_dialog_find_control_by_type (msi_dialog *dialog, LPCWSTR type)
 
static msi_controlmsi_dialog_find_control_by_hwnd (msi_dialog *dialog, HWND hwnd)
 
static LPWSTR msi_get_deformatted_field (MSIPACKAGE *package, MSIRECORD *rec, int field)
 
static LPWSTR msi_dialog_dup_property (msi_dialog *dialog, LPCWSTR property, BOOL indirect)
 
static LPWSTR msi_dialog_get_style (LPCWSTR p, LPCWSTR *rest)
 
static UINT msi_dialog_add_font (MSIRECORD *rec, LPVOID param)
 
static msi_fontmsi_dialog_find_font (msi_dialog *dialog, LPCWSTR name)
 
static UINT msi_dialog_set_font (msi_dialog *dialog, HWND hwnd, LPCWSTR name)
 
static UINT msi_dialog_build_font_list (msi_dialog *dialog)
 
static void msi_destroy_control (msi_control *t)
 
static msi_controldialog_create_window (msi_dialog *dialog, MSIRECORD *rec, DWORD exstyle, const WCHAR *szCls, const WCHAR *name, const WCHAR *text, DWORD style, HWND parent)
 
static LPWSTR msi_dialog_get_uitext (msi_dialog *dialog, LPCWSTR key)
 
static HANDLE msi_load_image (MSIDATABASE *db, LPCWSTR name, UINT type, UINT cx, UINT cy, UINT flags)
 
static HICON msi_load_icon (MSIDATABASE *db, LPCWSTR text, UINT attributes)
 
static void msi_dialog_update_controls (msi_dialog *dialog, LPCWSTR property)
 
static void msi_dialog_update_all_controls (msi_dialog *dialog)
 
static void msi_dialog_set_property (MSIPACKAGE *package, LPCWSTR property, LPCWSTR value)
 
static MSIFEATUREmsi_seltree_feature_from_item (HWND hwnd, HTREEITEM hItem)
 
static MSIFEATUREmsi_seltree_get_selected_feature (msi_control *control)
 
static void dialog_handle_event (msi_dialog *dialog, const WCHAR *control, const WCHAR *attribute, MSIRECORD *rec)
 
static void event_subscribe (msi_dialog *dialog, const WCHAR *event, const WCHAR *control, const WCHAR *attribute)
 
static UINT map_event (MSIRECORD *row, void *param)
 
static void dialog_map_events (msi_dialog *dialog, const WCHAR *control)
 
static msi_controlmsi_dialog_add_control (msi_dialog *dialog, MSIRECORD *rec, LPCWSTR szCls, DWORD style)
 
static void msi_text_on_settext (HWND hWnd)
 
static LRESULT WINAPI MSIText_WndProc (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
static UINT msi_dialog_text_control (msi_dialog *dialog, MSIRECORD *rec)
 
static WCHARmsi_get_binary_name (MSIPACKAGE *package, MSIRECORD *rec)
 
static UINT msi_dialog_set_property_event (msi_dialog *dialog, LPCWSTR event, LPCWSTR arg)
 
static UINT msi_dialog_send_event (msi_dialog *dialog, LPCWSTR event, LPCWSTR arg)
 
static UINT msi_dialog_control_event (MSIRECORD *rec, LPVOID param)
 
static UINT msi_dialog_button_handler (msi_dialog *dialog, msi_control *control, WPARAM param)
 
static HBITMAP msi_load_picture (MSIDATABASE *db, const WCHAR *name, INT cx, INT cy, DWORD flags)
 
static UINT msi_dialog_button_control (msi_dialog *dialog, MSIRECORD *rec)
 
static LPWSTR msi_get_checkbox_value (msi_dialog *dialog, LPCWSTR prop)
 
static UINT msi_dialog_get_checkbox_state (msi_dialog *dialog, msi_control *control)
 
static void msi_dialog_set_checkbox_state (msi_dialog *dialog, msi_control *control, UINT state)
 
static void msi_dialog_checkbox_sync_state (msi_dialog *dialog, msi_control *control)
 
static UINT msi_dialog_checkbox_handler (msi_dialog *dialog, msi_control *control, WPARAM param)
 
static UINT msi_dialog_checkbox_control (msi_dialog *dialog, MSIRECORD *rec)
 
static UINT msi_dialog_line_control (msi_dialog *dialog, MSIRECORD *rec)
 
static LRESULT WINAPI MSIScrollText_WndProc (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
static DWORD CALLBACK msi_richedit_stream_in (DWORD_PTR arg, LPBYTE buffer, LONG count, LONG *pcb)
 
static void msi_scrolltext_add_text (msi_control *control, LPCWSTR text)
 
static UINT msi_dialog_scrolltext_control (msi_dialog *dialog, MSIRECORD *rec)
 
static UINT msi_dialog_bitmap_control (msi_dialog *dialog, MSIRECORD *rec)
 
static UINT msi_dialog_icon_control (msi_dialog *dialog, MSIRECORD *rec)
 
static LRESULT WINAPI MSIComboBox_WndProc (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
static UINT msi_combobox_add_item (MSIRECORD *rec, LPVOID param)
 
static UINT msi_combobox_add_items (struct msi_combobox_info *info, LPCWSTR property)
 
static UINT msi_dialog_set_control_condition (MSIRECORD *rec, LPVOID param)
 
static UINT msi_dialog_evaluate_control_conditions (msi_dialog *dialog)
 
static UINT msi_dialog_combobox_handler (msi_dialog *dialog, msi_control *control, WPARAM param)
 
static void msi_dialog_combobox_update (msi_dialog *dialog, msi_control *control)
 
static UINT msi_dialog_combo_control (msi_dialog *dialog, MSIRECORD *rec)
 
static UINT msi_dialog_edit_handler (msi_dialog *dialog, msi_control *control, WPARAM param)
 
static UINT msi_dialog_edit_control (msi_dialog *dialog, MSIRECORD *rec)
 
static BOOL msi_mask_editable (WCHAR type)
 
static void msi_mask_control_change (struct msi_maskedit_info *info)
 
static VOID msi_mask_next_control (struct msi_maskedit_info *info, HWND hWnd)
 
static LRESULT WINAPI MSIMaskedEdit_WndProc (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
static void msi_maskedit_set_text (struct msi_maskedit_info *info, LPCWSTR text)
 
static struct msi_maskedit_infomsi_dialog_parse_groups (LPCWSTR mask)
 
static void msi_maskedit_create_children (struct msi_maskedit_info *info, LPCWSTR font)
 
static UINT msi_dialog_maskedit_control (msi_dialog *dialog, MSIRECORD *rec)
 
static UINT msi_dialog_progress_bar (msi_dialog *dialog, MSIRECORD *rec)
 
static WCHARget_path_property (msi_dialog *dialog, msi_control *control)
 
static void msi_dialog_update_pathedit (msi_dialog *dialog, msi_control *control)
 
static BOOL msi_dialog_verify_path (LPWSTR path)
 
static BOOL msi_dialog_onkillfocus (msi_dialog *dialog, msi_control *control)
 
static LRESULT WINAPI MSIPathEdit_WndProc (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
static UINT msi_dialog_pathedit_control (msi_dialog *dialog, MSIRECORD *rec)
 
static UINT msi_dialog_radiogroup_handler (msi_dialog *dialog, msi_control *control, WPARAM param)
 
static UINT msi_dialog_create_radiobutton (MSIRECORD *rec, LPVOID param)
 
static BOOL CALLBACK msi_radioground_child_enum (HWND hWnd, LPARAM lParam)
 
static LRESULT WINAPI MSIRadioGroup_WndProc (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
static UINT msi_dialog_radiogroup_control (msi_dialog *dialog, MSIRECORD *rec)
 
static void msi_seltree_sync_item_state (HWND hwnd, MSIFEATURE *feature, HTREEITEM hItem)
 
static UINT msi_seltree_popup_menu (HWND hwnd, INT x, INT y)
 
static void msi_seltree_update_feature_installstate (HWND hwnd, HTREEITEM hItem, MSIPACKAGE *package, MSIFEATURE *feature, INSTALLSTATE state)
 
static void msi_seltree_update_siblings_and_children_installstate (HWND hwnd, HTREEITEM curr, MSIPACKAGE *package, INSTALLSTATE state)
 
static LRESULT msi_seltree_menu (HWND hwnd, HTREEITEM hItem)
 
static LRESULT WINAPI MSISelectionTree_WndProc (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
static void msi_seltree_add_child_features (MSIPACKAGE *package, HWND hwnd, LPCWSTR parent, HTREEITEM hParent)
 
static void msi_seltree_create_imagelist (HWND hwnd)
 
static UINT msi_dialog_seltree_handler (msi_dialog *dialog, msi_control *control, WPARAM param)
 
static UINT msi_dialog_selection_tree (msi_dialog *dialog, MSIRECORD *rec)
 
static UINT msi_dialog_group_box (msi_dialog *dialog, MSIRECORD *rec)
 
static LRESULT WINAPI MSIListBox_WndProc (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
static UINT msi_listbox_add_item (MSIRECORD *rec, LPVOID param)
 
static UINT msi_listbox_add_items (struct msi_listbox_info *info, LPCWSTR property)
 
static UINT msi_dialog_listbox_handler (msi_dialog *dialog, msi_control *control, WPARAM param)
 
static UINT msi_dialog_list_box (msi_dialog *dialog, MSIRECORD *rec)
 
static void msi_dialog_update_directory_combo (msi_dialog *dialog, msi_control *control)
 
static UINT msi_dialog_directory_combo (msi_dialog *dialog, MSIRECORD *rec)
 
static void msi_dialog_update_directory_list (msi_dialog *dialog, msi_control *control)
 
static UINT msi_dialog_directorylist_up (msi_dialog *dialog)
 
static WCHARget_unique_folder_name (const WCHAR *root, int *ret_len)
 
static UINT msi_dialog_directorylist_new (msi_dialog *dialog)
 
static UINT msi_dialog_dirlist_handler (msi_dialog *dialog, msi_control *control, WPARAM param)
 
static UINT msi_dialog_directory_list (msi_dialog *dialog, MSIRECORD *rec)
 
static BOOL str_is_number (LPCWSTR str)
 
static void msi_dialog_vcl_add_columns (msi_dialog *dialog, msi_control *control, MSIRECORD *rec)
 
static LONGLONG msi_vcl_get_cost (msi_dialog *dialog)
 
static void msi_dialog_vcl_add_drives (msi_dialog *dialog, msi_control *control)
 
static UINT msi_dialog_volumecost_list (msi_dialog *dialog, MSIRECORD *rec)
 
static UINT msi_dialog_volsel_handler (msi_dialog *dialog, msi_control *control, WPARAM param)
 
static void msi_dialog_vsc_add_drives (msi_dialog *dialog, msi_control *control)
 
static UINT msi_dialog_volumeselect_combo (msi_dialog *dialog, MSIRECORD *rec)
 
static UINT msi_dialog_hyperlink_handler (msi_dialog *dialog, msi_control *control, WPARAM param)
 
static UINT msi_dialog_hyperlink (msi_dialog *dialog, MSIRECORD *rec)
 
static UINT msi_dialog_listview_handler (msi_dialog *dialog, msi_control *control, WPARAM param)
 
static UINT msi_listview_add_item (MSIRECORD *rec, LPVOID param)
 
static UINT msi_listview_add_items (msi_dialog *dialog, msi_control *control)
 
static UINT msi_dialog_listview (msi_dialog *dialog, MSIRECORD *rec)
 
static UINT msi_dialog_create_controls (MSIRECORD *rec, LPVOID param)
 
static UINT msi_dialog_fill_controls (msi_dialog *dialog)
 
static UINT msi_dialog_reset (msi_dialog *dialog)
 
static INT msi_dialog_get_sans_serif_height (HWND hwnd)
 
static MSIRECORDmsi_get_dialog_record (msi_dialog *dialog)
 
static void msi_dialog_adjust_dialog_pos (msi_dialog *dialog, MSIRECORD *rec, LPRECT pos)
 
static void msi_dialog_set_tab_order (msi_dialog *dialog, LPCWSTR first)
 
static LRESULT msi_dialog_oncreate (HWND hwnd, LPCREATESTRUCTW cs)
 
static LRESULT msi_dialog_oncommand (msi_dialog *dialog, WPARAM param, HWND hwnd)
 
static LRESULT msi_dialog_onnotify (msi_dialog *dialog, LPARAM param)
 
static void dialog_setfocus (msi_dialog *dialog)
 
static LRESULT WINAPI MSIDialog_WndProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
static void process_pending_messages (HWND hdlg)
 
static UINT dialog_run_message_loop (msi_dialog *dialog)
 
static LRESULT WINAPI MSIHiddenWindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
static BOOL dialog_register_class (void)
 
static msi_dialogdialog_create (MSIPACKAGE *package, const WCHAR *name, msi_dialog *parent, control_event_handler event_handler)
 
static void msi_dialog_end_dialog (msi_dialog *dialog)
 
void msi_dialog_check_messages (HANDLE handle)
 
static void dialog_do_preview (msi_dialog *dialog)
 
static void free_subscriber (struct subscriber *sub)
 
static void event_cleanup_subscriptions (MSIPACKAGE *package, const WCHAR *dialog)
 
void msi_dialog_destroy (msi_dialog *dialog)
 
void msi_dialog_unregister_class (void)
 
void msi_event_cleanup_all_subscriptions (MSIPACKAGE *package)
 
static void MSI_ClosePreview (MSIOBJECTHDR *arg)
 
static MSIPREVIEWMSI_EnableUIPreview (MSIDATABASE *db)
 
UINT WINAPI MsiEnableUIPreview (MSIHANDLE hdb, MSIHANDLE *phPreview)
 
static UINT preview_event_handler (msi_dialog *dialog, const WCHAR *event, const WCHAR *argument)
 
static UINT MSI_PreviewDialogW (MSIPREVIEW *preview, LPCWSTR szDialogName)
 
UINT WINAPI MsiPreviewDialogW (MSIHANDLE hPreview, LPCWSTR szDialogName)
 
UINT WINAPI MsiPreviewDialogA (MSIHANDLE hPreview, LPCSTR szDialogName)
 
UINT WINAPI MsiPreviewBillboardW (MSIHANDLE hPreview, const WCHAR *szControlName, const WCHAR *szBillboard)
 
UINT WINAPI MsiPreviewBillboardA (MSIHANDLE hPreview, const char *szControlName, const char *szBillboard)
 
static UINT dialog_event_handler (msi_dialog *, const WCHAR *, const WCHAR *)
 
static INT event_do_dialog (MSIPACKAGE *package, const WCHAR *name, msi_dialog *parent, BOOL destroy_modeless)
 
static UINT event_end_dialog (msi_dialog *dialog, const WCHAR *argument)
 
static UINT pending_event_end_dialog (msi_dialog *dialog, const WCHAR *argument)
 
static UINT event_new_dialog (msi_dialog *dialog, const WCHAR *argument)
 
static UINT pending_event_new_dialog (msi_dialog *dialog, const WCHAR *argument)
 
static UINT event_spawn_dialog (msi_dialog *dialog, const WCHAR *argument)
 
static UINT pending_event_spawn_dialog (msi_dialog *dialog, const WCHAR *argument)
 
static UINT event_spawn_wait_dialog (msi_dialog *dialog, const WCHAR *argument)
 
static UINT event_do_action (msi_dialog *dialog, const WCHAR *argument)
 
static UINT event_add_local (msi_dialog *dialog, const WCHAR *argument)
 
static UINT event_remove (msi_dialog *dialog, const WCHAR *argument)
 
static UINT event_add_source (msi_dialog *dialog, const WCHAR *argument)
 
void msi_event_fire (MSIPACKAGE *package, const WCHAR *event, MSIRECORD *rec)
 
static UINT event_set_target_path (msi_dialog *dialog, const WCHAR *argument)
 
static UINT event_reset (msi_dialog *dialog, const WCHAR *argument)
 
INT ACTION_ShowDialog (MSIPACKAGE *package, const WCHAR *dialog)
 
INT ACTION_DialogBox (MSIPACKAGE *package, const WCHAR *dialog)
 
static UINT event_set_install_level (msi_dialog *dialog, const WCHAR *argument)
 
static UINT event_directory_list_up (msi_dialog *dialog, const WCHAR *argument)
 
static UINT event_directory_list_new (msi_dialog *dialog, const WCHAR *argument)
 
static UINT event_reinstall_mode (msi_dialog *dialog, const WCHAR *argument)
 
static UINT event_reinstall (msi_dialog *dialog, const WCHAR *argument)
 
static UINT event_validate_product_id (msi_dialog *dialog, const WCHAR *argument)
 

Variables

HINSTANCE msi_hInstance
 
static DWORD uiThreadId
 
static HWND hMsiHiddenWindow
 
static const WCHAR column_keys [][80]
 
static const struct control_handler msi_dialog_handler []
 
static const struct control_event control_events []
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 22 of file dialog.c.

◆ MASK_MAX_GROUPS

#define MASK_MAX_GROUPS   20

Definition at line 1718 of file dialog.c.

◆ MAX_NUM_DIGITS

#define MAX_NUM_DIGITS   11

Definition at line 1675 of file dialog.c.

◆ NONAMELESSUNION

#define NONAMELESSUNION

Definition at line 23 of file dialog.c.

◆ USER_INSTALLSTATE_ALL

#define USER_INSTALLSTATE_ALL   0x1000

Definition at line 138 of file dialog.c.

◆ WM_MSI_DIALOG_CREATE

#define WM_MSI_DIALOG_CREATE   (WM_USER+0x100)

Definition at line 135 of file dialog.c.

◆ WM_MSI_DIALOG_DESTROY

#define WM_MSI_DIALOG_DESTROY   (WM_USER+0x101)

Definition at line 136 of file dialog.c.

Typedef Documentation

◆ control_event_handler

typedef UINT(* control_event_handler) (msi_dialog *, const WCHAR *, const WCHAR *)

Definition at line 56 of file dialog.c.

◆ event_handler

typedef UINT(* event_handler) (msi_dialog *, const WCHAR *)

Definition at line 57 of file dialog.c.

◆ msi_control

Definition at line 53 of file dialog.c.

◆ msi_dialog_control_func

typedef UINT(* msi_dialog_control_func) (msi_dialog *dialog, MSIRECORD *rec)

Definition at line 119 of file dialog.c.

◆ msi_font

◆ msi_handler

typedef UINT(* msi_handler) (msi_dialog *, msi_control *, WPARAM)

Definition at line 54 of file dialog.c.

◆ msi_update

typedef void(* msi_update) (msi_dialog *, msi_control *)

Definition at line 55 of file dialog.c.

Function Documentation

◆ ACTION_DialogBox()

INT ACTION_DialogBox ( MSIPACKAGE package,
const WCHAR dialog 
)

Definition at line 4548 of file dialog.c.

4549 {
4550  INT r;
4551 
4552  if (package->next_dialog) ERR("Already got next dialog... ignoring it\n");
4553  package->next_dialog = NULL;
4554 
4555  /* Dialogs are chained through NewDialog, which sets the next_dialog member.
4556  * We fall out of the loop if we reach a modeless dialog, which immediately
4557  * returns IDOK, or an EndDialog event, which returns the value corresponding
4558  * to its argument.
4559  */
4560  r = event_do_dialog( package, dialog, NULL, TRUE );
4561  while (package->next_dialog)
4562  {
4563  WCHAR *name = package->next_dialog;
4564 
4565  package->next_dialog = NULL;
4566  r = event_do_dialog( package, name, NULL, TRUE );
4567  msi_free( name );
4568  }
4569  return r;
4570 }
#define TRUE
Definition: types.h:120
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
static void msi_free(void *mem)
Definition: msipriv.h:1159
int32_t INT
Definition: typedefs.h:58
LPWSTR next_dialog
Definition: msipriv.h:454
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define ERR(fmt,...)
Definition: debug.h:110
#define NULL
Definition: types.h:112
static INT event_do_dialog(MSIPACKAGE *package, const WCHAR *name, msi_dialog *parent, BOOL destroy_modeless)
Definition: dialog.c:4316
static HWND dialog
Definition: gui.c:33
Definition: name.c:38

Referenced by internal_ui_handler().

◆ ACTION_ShowDialog()

INT ACTION_ShowDialog ( MSIPACKAGE package,
const WCHAR dialog 
)

Definition at line 4520 of file dialog.c.

4521 {
4522  MSIRECORD *row;
4523  INT rc;
4524 
4525  if (!TABLE_Exists(package->db, L"Dialog")) return 0;
4526 
4527  row = MSI_CreateRecord(0);
4528  if (!row) return -1;
4531  msiobj_release(&row->hdr);
4532 
4533  if (rc == -2) rc = 0;
4534 
4535  if (!rc)
4536  {
4538  if (!row) return -1;
4539  MSI_RecordSetInteger(row, 1, 2726);
4542 
4543  msiobj_release(&row->hdr);
4544  }
4545  return rc;
4546 }
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
Definition: record.c:597
int32_t INT
Definition: typedefs.h:58
BOOL TABLE_Exists(MSIDATABASE *db, LPCWSTR name) DECLSPEC_HIDDEN
Definition: table.c:960
#define L(x)
Definition: ntvdm.h:50
UINT MSI_RecordSetInteger(MSIRECORD *, UINT, int) DECLSPEC_HIDDEN
Definition: record.c:280
INT MSI_ProcessMessage(MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
Definition: package.c:1858
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
Definition: record.c:76
static HWND dialog
Definition: gui.c:33
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78

Referenced by ACTION_HandleCustomAction().

◆ dialog_create()

static msi_dialog* dialog_create ( MSIPACKAGE package,
const WCHAR name,
msi_dialog parent,
control_event_handler  event_handler 
)
static

Definition at line 3997 of file dialog.c.

3999 {
4000  MSIRECORD *rec = NULL;
4001  msi_dialog *dialog;
4002 
4003  TRACE("%s\n", debugstr_w(name));
4004 
4006 
4007  /* allocate the structure for the dialog to use */
4009  if( !dialog )
4010  return NULL;
4011  lstrcpyW( dialog->name, name );
4012  dialog->parent = parent;
4013  dialog->package = package;
4014  dialog->event_handler = event_handler;
4015  dialog->finished = 0;
4016  list_init( &dialog->controls );
4017  list_init( &dialog->fonts );
4018 
4019  /* verify that the dialog exists */
4020  rec = msi_get_dialog_record( dialog );
4021  if( !rec )
4022  {
4023  msi_free( dialog );
4024  return NULL;
4025  }
4026  dialog->attributes = MSI_RecordGetInteger( rec, 6 );
4027  dialog->control_default = strdupW( MSI_RecordGetString( rec, 9 ) );
4028  dialog->control_cancel = strdupW( MSI_RecordGetString( rec, 10 ) );
4029  msiobj_release( &rec->hdr );
4030 
4031  rec = MSI_CreateRecord(2);
4032  if (!rec)
4033  {
4035  return NULL;
4036  }
4037  MSI_RecordSetStringW(rec, 1, name);
4038  MSI_RecordSetStringW(rec, 2, L"Dialog created");
4040  msiobj_release(&rec->hdr);
4041 
4042  return dialog;
4043 }
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
Definition: record.c:597
static MSIRECORD * msi_get_dialog_record(msi_dialog *dialog)
Definition: dialog.c:3642
static WCHAR * strdupW(const WCHAR *src)
Definition: main.c:92
MSIOBJECTHDR hdr
Definition: msipriv.h:151
void msi_dialog_destroy(msi_dialog *dialog)
Definition: dialog.c:4120
static void msi_free(void *mem)
Definition: msipriv.h:1159
#define lstrlenW
Definition: compat.h:609
static void * msi_alloc_zero(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1148
static BOOL dialog_register_class(void)
Definition: dialog.c:3965
#define L(x)
Definition: ntvdm.h:50
UINT(* event_handler)(msi_dialog *, const WCHAR *)
Definition: dialog.c:57
#define debugstr_w
Definition: kernel32.h:32
INT MSI_ProcessMessage(MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
Definition: package.c:1858
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:433
#define TRACE(s)
Definition: solgame.cpp:4
r parent
Definition: btrfs.c:2979
static HWND hMsiHiddenWindow
Definition: dialog.c:141
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
Definition: record.c:76
int MSI_RecordGetInteger(MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:213
#define lstrcpyW
Definition: compat.h:608
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
#define NULL
Definition: types.h:112
static HWND dialog
Definition: gui.c:33
Definition: name.c:38
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149

Referenced by event_do_dialog(), and MSI_PreviewDialogW().

◆ dialog_create_window()

static msi_control* dialog_create_window ( msi_dialog dialog,
MSIRECORD rec,
DWORD  exstyle,
const WCHAR szCls,
const WCHAR name,
const WCHAR text,
DWORD  style,
HWND  parent 
)
static

Definition at line 380 of file dialog.c.

383 {
384  DWORD x, y, width, height;
385  LPWSTR font = NULL, title_font = NULL;
386  LPCWSTR title = NULL;
387  msi_control *control;
388 
389  style |= WS_CHILD;
390 
391  control = msi_alloc( FIELD_OFFSET( msi_control, name[lstrlenW( name ) + 1] ));
392  if (!control)
393  return NULL;
394 
395  lstrcpyW( control->name, name );
396  list_add_tail( &dialog->controls, &control->entry );
397  control->handler = NULL;
398  control->update = NULL;
399  control->property = NULL;
400  control->value = NULL;
401  control->hBitmap = NULL;
402  control->hIcon = NULL;
403  control->hImageList = NULL;
404  control->hDll = NULL;
405  control->tabnext = strdupW( MSI_RecordGetString( rec, 11) );
406  control->type = strdupW( MSI_RecordGetString( rec, 3 ) );
407  control->progress_current = 0;
408  control->progress_max = 100;
409  control->progress_backwards = FALSE;
410 
411  x = MSI_RecordGetInteger( rec, 4 );
412  y = MSI_RecordGetInteger( rec, 5 );
413  width = MSI_RecordGetInteger( rec, 6 );
414  height = MSI_RecordGetInteger( rec, 7 );
415 
420 
421  if( text )
422  {
423  deformat_string( dialog->package, text, &title_font );
424  font = msi_dialog_get_style( title_font, &title );
425  }
426 
427  control->hwnd = CreateWindowExW( exstyle, szCls, title, style,
428  x, y, width, height, parent, NULL, NULL, NULL );
429 
430  TRACE("Dialog %s control %s hwnd %p\n",
431  debugstr_w(dialog->name), debugstr_w(text), control->hwnd );
432 
433  msi_dialog_set_font( dialog, control->hwnd,
434  font ? font : dialog->default_font );
435 
436  msi_free( title_font );
437  msi_free( font );
438 
439  return control;
440 }
GLint GLint GLsizei width
Definition: gl.h:1546
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
Definition: mk_font.cpp:20
float progress_current
Definition: dialog.c:73
static WCHAR * strdupW(const WCHAR *src)
Definition: main.c:92
const WCHAR * text
Definition: package.c:1743
HICON hIcon
Definition: dialog.c:68
msi_handler handler
Definition: dialog.c:63
static INT msi_dialog_scale_unit(msi_dialog *dialog, INT val)
Definition: dialog.c:162
WCHAR name[1]
Definition: dialog.c:77
HMODULE hDll
Definition: dialog.c:72
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
static void msi_free(void *mem)
Definition: msipriv.h:1159
#define WS_CHILD
Definition: pedump.c:617
msi_update update
Definition: dialog.c:64
HIMAGELIST hImageList
Definition: dialog.c:69
#define lstrlenW
Definition: compat.h:609
static LPWSTR msi_dialog_get_style(LPCWSTR p, LPCWSTR *rest)
Definition: dialog.c:239
LPWSTR type
Definition: dialog.c:71
__WINE_SERVER_LIST_INLINE void list_add_tail(struct list *list, struct list *elem)
Definition: list.h:102
static UINT msi_dialog_set_font(msi_dialog *dialog, HWND hwnd, LPCWSTR name)
Definition: dialog.c:333
#define FALSE
Definition: types.h:117
#define debugstr_w
Definition: kernel32.h:32
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:433
LPWSTR property
Definition: dialog.c:65
DWORD deformat_string(MSIPACKAGE *package, const WCHAR *fmt, WCHAR **data)
Definition: format.c:1016
#define TRACE(s)
Definition: solgame.cpp:4
r parent
Definition: btrfs.c:2979
unsigned long DWORD
Definition: ntddk_ex.h:95
float progress_max
Definition: dialog.c:74
LPWSTR tabnext
Definition: dialog.c:70
LPWSTR value
Definition: dialog.c:66
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
struct list entry
Definition: dialog.c:61
BOOL progress_backwards
Definition: dialog.c:75
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
int MSI_RecordGetInteger(MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:213
#define lstrcpyW
Definition: compat.h:608
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
#define NULL
Definition: types.h:112
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
static HWND dialog
Definition: gui.c:33
Definition: name.c:38
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1142
WCHAR * LPWSTR
Definition: xmlstorage.h:184
Arabic default style
Definition: afstyles.h:93
HBITMAP hBitmap
Definition: dialog.c:67
static char title[]
Definition: ps.c:92

Referenced by msi_dialog_add_control(), and msi_dialog_create_radiobutton().

◆ dialog_do_preview()

static void dialog_do_preview ( msi_dialog dialog)
static

Definition at line 4090 of file dialog.c.

4091 {
4092  TRACE("\n");
4093  dialog->attributes |= msidbDialogAttributesVisible;
4094  dialog->attributes &= ~msidbDialogAttributesModal;
4096 }
#define TRACE(s)
Definition: solgame.cpp:4
static UINT dialog_run_message_loop(msi_dialog *dialog)
Definition: dialog.c:3903
static HWND dialog
Definition: gui.c:33

Referenced by MSI_PreviewDialogW().

◆ dialog_event_handler()

static UINT dialog_event_handler ( msi_dialog dialog,
const WCHAR event,
const WCHAR argument 
)
static

Definition at line 4627 of file dialog.c.

4628 {
4629  unsigned int i;
4630 
4631  TRACE("handling event %s\n", debugstr_w(event));
4632 
4633  if (!event) return ERROR_SUCCESS;
4634 
4635  for (i = 0; control_events[i].event; i++)
4636  {
4637  if (!wcscmp( control_events[i].event, event ))
4638  return control_events[i].handler( dialog, argument );
4639  }
4640  FIXME("unhandled event %s arg(%s)\n", debugstr_w(event), debugstr_w(argument));
4641  return ERROR_SUCCESS;
4642 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
#define TRACE(s)
Definition: solgame.cpp:4
struct _cl_event * event
Definition: glext.h:7739
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
static const struct control_event control_events[]
Definition: dialog.c:4605
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static HWND dialog
Definition: gui.c:33

Referenced by event_do_dialog().

◆ dialog_handle_event()

static void dialog_handle_event ( msi_dialog dialog,
const WCHAR control,
const WCHAR attribute,
MSIRECORD rec 
)
static

Definition at line 560 of file dialog.c.

562 {
563  msi_control* ctrl;
564 
565  ctrl = msi_dialog_find_control( dialog, control );
566  if (!ctrl)
567  return;
568  if( !wcscmp( attribute, L"Text" ) )
569  {
570  const WCHAR *font_text, *text = NULL;
571  WCHAR *font, *text_fmt = NULL;
572 
573  font_text = MSI_RecordGetString( rec , 1 );
574  font = msi_dialog_get_style( font_text, &text );
575  deformat_string( dialog->package, text, &text_fmt );
576  if (text_fmt) text = text_fmt;
577  else text = L"";
578 
579  SetWindowTextW( ctrl->hwnd, text );
580 
581  msi_free( font );
582  msi_free( text_fmt );
584  }
585  else if( !wcscmp( attribute, L"Progress" ) )
586  {
587  DWORD func, val1, val2, units;
588 
589  func = MSI_RecordGetInteger( rec, 1 );
590  val1 = MSI_RecordGetInteger( rec, 2 );
591  val2 = MSI_RecordGetInteger( rec, 3 );
592 
593  TRACE( "progress: func %lu val1 %lu val2 %lu\n", func, val1, val2 );
594 
595  units = val1 / 512;
596  switch (func)
597  {
598  case 0: /* init */
599  SendMessageW( ctrl->hwnd, PBM_SETRANGE, 0, MAKELPARAM(0,100) );
600  if (val2)
601  {
602  ctrl->progress_max = units ? units : 100;
603  ctrl->progress_current = units;
604  ctrl->progress_backwards = TRUE;
605  SendMessageW( ctrl->hwnd, PBM_SETPOS, 100, 0 );
606  }
607  else
608  {
609  ctrl->progress_max = units ? units : 100;
610  ctrl->progress_current = 0;
611  ctrl->progress_backwards = FALSE;
612  SendMessageW( ctrl->hwnd, PBM_SETPOS, 0, 0 );
613  }
614  break;
615  case 1: /* action data increment */
616  if (val2) dialog->package->action_progress_increment = val1;
617  else dialog->package->action_progress_increment = 0;
618  break;
619  case 2: /* move */
620  if (ctrl->progress_backwards)
621  {
622  if (units >= ctrl->progress_current) ctrl->progress_current -= units;
623  else ctrl->progress_current = 0;
624  }
625  else
626  {
627  if (ctrl->progress_current + units < ctrl->progress_max) ctrl->progress_current += units;
628  else ctrl->progress_current = ctrl->progress_max;
629  }
630  SendMessageW( ctrl->hwnd, PBM_SETPOS, MulDiv(100, ctrl->progress_current, ctrl->progress_max), 0 );
631  break;
632  case 3: /* add */
633  ctrl->progress_max += units;
634  break;
635  default:
636  FIXME( "unknown progress message %lu\n", func );
637  break;
638  }
639  }
640  else if ( !wcscmp( attribute, L"Property" ) )
641  {
643  if (feature) msi_dialog_set_property( dialog->package, ctrl->property, feature->Directory );
644  }
645  else if ( !wcscmp( attribute, L"SelectionPath" ) )
646  {
649  if (!path) return;
650  SetWindowTextW( ctrl->hwnd, path );
651  msi_free(path);
652  }
653  else
654  {
655  FIXME("Attribute %s not being set\n", debugstr_w(attribute));
656  return;
657  }
658 }
GLenum func
Definition: glext.h:6028
INTERNETFEATURELIST feature
Definition: misc.c:1719
Definition: mk_font.cpp:20
#define TRUE
Definition: types.h:120
const WCHAR * text
Definition: package.c:1743
#define MAKELPARAM(l, h)
Definition: winuser.h:3988
#define PBM_SETPOS
Definition: commctrl.h:2184
static void msi_free(void *mem)
Definition: msipriv.h:1159
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
Definition: muldiv.c:25
static LPWSTR msi_dialog_get_style(LPCWSTR p, LPCWSTR *rest)
Definition: dialog.c:239
#define PBM_SETRANGE
Definition: commctrl.h:2183
#define L(x)
Definition: ntvdm.h:50
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
static msi_control * msi_dialog_find_control(msi_dialog *dialog, LPCWSTR name)
Definition: dialog.c:167
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:433
#define ctrl
Definition: input.c:1757
DWORD deformat_string(MSIPACKAGE *package, const WCHAR *fmt, WCHAR **data)
Definition: format.c:1016
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
static MSIFEATURE * msi_seltree_get_selected_feature(msi_control *control)
Definition: dialog.c:554
unsigned long DWORD
Definition: ntddk_ex.h:95
int MSI_RecordGetInteger(MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:213
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
static LPWSTR msi_dialog_dup_property(msi_dialog *dialog, LPCWSTR property, BOOL indirect)
Definition: dialog.c:217
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define NULL
Definition: types.h:112
static HWND dialog
Definition: gui.c:33
WCHAR * LPWSTR
Definition: xmlstorage.h:184
GLfloat units
Definition: glext.h:11727
static void msi_dialog_set_property(MSIPACKAGE *package, LPCWSTR property, LPCWSTR value)
Definition: dialog.c:527
void msi_dialog_check_messages(HANDLE handle)
Definition: dialog.c:4052

Referenced by msi_event_fire().

◆ dialog_map_events()

static void dialog_map_events ( msi_dialog dialog,
const WCHAR control 
)
static

Definition at line 702 of file dialog.c.

703 {
704  MSIQUERY *view;
706  {
707  dialog,
708  control
709  };
710 
711  if (!MSI_OpenQuery( dialog->package->db, &view,
712  L"SELECT * FROM `EventMapping` WHERE `Dialog_` = '%s' AND `Control_` = '%s'",
713  dialog->name, control ))
714  {
716  msiobj_release( &view->hdr );
717  }
718 }
UINT WINAPIV MSI_OpenQuery(MSIDATABASE *, MSIQUERY **, LPCWSTR,...) DECLSPEC_HIDDEN
Definition: msiquery.c:138
#define L(x)
Definition: ntvdm.h:50
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
const WCHAR * control
Definition: dialog.c:689
static UINT map_event(MSIRECORD *row, void *param)
Definition: dialog.c:692
#define NULL
Definition: types.h:112
static HWND dialog
Definition: gui.c:33
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163

Referenced by msi_dialog_add_control(), and msi_dialog_line_control().

◆ dialog_register_class()

static BOOL dialog_register_class ( void  )
static

Definition at line 3965 of file dialog.c.

3966 {
3967  WNDCLASSW cls;
3968 
3969  ZeroMemory( &cls, sizeof cls );
3971  cls.hInstance = NULL;
3973  cls.hCursor = LoadCursorW(0, (LPWSTR)IDC_ARROW);
3974  cls.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1);
3975  cls.lpszMenuName = NULL;
3976  cls.lpszClassName = L"MsiDialogCloseClass";
3977 
3978  if( !RegisterClassW( &cls ) )
3979  return FALSE;
3980 
3982  cls.lpszClassName = L"MsiHiddenWindow";
3983 
3984  if( !RegisterClassW( &cls ) )
3985  return FALSE;
3986 
3988 
3989  hMsiHiddenWindow = CreateWindowW( L"MsiHiddenWindow", NULL, WS_OVERLAPPED,
3990  0, 0, 100, 100, NULL, NULL, NULL, NULL );
3991  if( !hMsiHiddenWindow )
3992  return FALSE;
3993 
3994  return TRUE;
3995 }
LPCWSTR lpszMenuName
Definition: winuser.h:3164
static DWORD uiThreadId
Definition: dialog.c:140
#define TRUE
Definition: types.h:120
#define ZeroMemory
Definition: winbase.h:1667
#define IDI_APPLICATION
Definition: winuser.h:699
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4296
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
#define L(x)
Definition: ntvdm.h:50
#define COLOR_3DFACE
Definition: winuser.h:923
#define FALSE
Definition: types.h:117
WNDPROC lpfnWndProc
Definition: winuser.h:3157
LPCWSTR lpszClassName
Definition: winuser.h:3165
DWORD WINAPI GetCurrentThreadId(VOID)
Definition: thread.c:459
#define WS_OVERLAPPED
Definition: pedump.c:615
static LRESULT WINAPI MSIHiddenWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: dialog.c:3947
HICON hIcon
Definition: winuser.h:3161
static HWND hMsiHiddenWindow
Definition: dialog.c:141
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2074
HCURSOR hCursor
Definition: winuser.h:3162
HBRUSH hbrBackground
Definition: winuser.h:3163
#define NULL
Definition: types.h:112
HINSTANCE hInstance
Definition: winuser.h:3160
#define IDC_ARROW
Definition: winuser.h:682
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2044
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static LRESULT WINAPI MSIDialog_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: dialog.c:3843

Referenced by dialog_create().

◆ dialog_run_message_loop()

static UINT dialog_run_message_loop ( msi_dialog dialog)
static

Definition at line 3903 of file dialog.c.

3904 {
3905  DWORD style;
3906  HWND hwnd, parent;
3907 
3908  if( uiThreadId != GetCurrentThreadId() )
3910 
3911  /* create the dialog window, don't show it yet */
3913  if( dialog->attributes & msidbDialogAttributesVisible )
3914  style |= WS_VISIBLE;
3915 
3916  if (dialog->parent == NULL && (dialog->attributes & msidbDialogAttributesMinimize))
3917  style |= WS_MINIMIZEBOX;
3918 
3919  parent = dialog->parent ? dialog->parent->hwnd : 0;
3920 
3921  hwnd = CreateWindowW( L"MsiDialogCloseClass", dialog->name, style,
3923  parent, NULL, NULL, dialog );
3924  if( !hwnd )
3925  {
3926  ERR("Failed to create dialog %s\n", debugstr_w( dialog->name ));
3927  return ERROR_FUNCTION_FAILED;
3928  }
3929 
3930  ShowWindow( hwnd, SW_SHOW );
3931  /* UpdateWindow( hwnd ); - and causes the transparent static controls not to paint */
3932 
3933  if( dialog->attributes & msidbDialogAttributesModal )
3934  {
3935  while( !dialog->finished )
3936  {
3939  }
3940  }
3941  else
3942  return ERROR_IO_PENDING;
3943 
3944  return ERROR_SUCCESS;
3945 }
#define ERROR_SUCCESS
Definition: deptool.c:10
static DWORD uiThreadId
Definition: dialog.c:140
#define WM_MSI_DIALOG_CREATE
Definition: dialog.c:135
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define ERROR_IO_PENDING
Definition: dderror.h:15
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4296
#define L(x)
Definition: ntvdm.h:50
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
#define debugstr_w
Definition: kernel32.h:32
#define CW_USEDEFAULT
Definition: winuser.h:225
LONG_PTR LPARAM
Definition: windef.h:208
#define SW_SHOW
Definition: winuser.h:769
DWORD WINAPI GetCurrentThreadId(VOID)
Definition: thread.c:459
#define WS_OVERLAPPED
Definition: pedump.c:615
r parent
Definition: btrfs.c:2979
unsigned long DWORD
Definition: ntddk_ex.h:95
static HWND hMsiHiddenWindow
Definition: dialog.c:141
DWORD WINAPI MsgWaitForMultipleObjects(_In_ DWORD nCount, _In_reads_opt_(nCount) CONST HANDLE *pHandles, _In_ BOOL fWaitAll, _In_ DWORD dwMilliseconds, _In_ DWORD dwWakeMask)
#define ERR(fmt,...)
Definition: debug.h:110
static HWND hwnd[MAXHWNDS]
Definition: dialog.c:44
static void process_pending_messages(HWND hdlg)
Definition: dialog.c:3891
#define WS_MINIMIZEBOX
Definition: pedump.c:631
#define QS_ALLINPUT
Definition: winuser.h:897
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define NULL
Definition: types.h:112
static HWND dialog
Definition: gui.c:33
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4022
#define INFINITE
Definition: serial.h:102
Arabic default style
Definition: afstyles.h:93
#define WS_VISIBLE
Definition: pedump.c:620
#define WS_SYSMENU
Definition: pedump.c:629

Referenced by dialog_do_preview(), event_do_dialog(), and MSIHiddenWindowProc().

◆ dialog_setfocus()

static void dialog_setfocus ( msi_dialog dialog)
static

Definition at line 3833 of file dialog.c.

3834 {
3835  HWND hwnd = dialog->hWndFocus;
3836 
3837  hwnd = GetNextDlgTabItem( dialog->hwnd, hwnd, TRUE);
3838  hwnd = GetNextDlgTabItem( dialog->hwnd, hwnd, FALSE);
3839  SetFocus( hwnd );
3840  dialog->hWndFocus = hwnd;
3841 }
HWND WINAPI GetNextDlgTabItem(HWND hDlg, HWND hCtl, BOOL bPrevious)
Definition: dialog.c:2398
#define TRUE
Definition: types.h:120
HWND WINAPI SetFocus(_In_opt_ HWND)
#define FALSE
Definition: types.h:117
static HWND hwnd[MAXHWNDS]
Definition: dialog.c:44
static HWND dialog
Definition: gui.c:33
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4022

Referenced by MSIDialog_WndProc().

◆ event_add_local()

static UINT event_add_local ( msi_dialog dialog,
const WCHAR argument 
)
static

Definition at line 4435 of file dialog.c.

4436 {
4438 
4439  LIST_FOR_EACH_ENTRY( feature, &dialog->package->features, MSIFEATURE, entry )
4440  {
4441  if (!wcscmp( argument, feature->Feature ) || !wcscmp( argument, L"ALL" ))
4442  {
4443  if (feature->ActionRequest != INSTALLSTATE_LOCAL)
4444  msi_set_property( dialog->package->db, L"Preselected", L"1", -1 );
4445  MSI_SetFeatureStateW( dialog->package, feature->Feature, INSTALLSTATE_LOCAL );
4446  }
4447  }
4448  return ERROR_SUCCESS;
4449 }
INTERNETFEATURELIST feature
Definition: misc.c:1719
#define ERROR_SUCCESS
Definition: deptool.c:10
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define L(x)
Definition: ntvdm.h:50
UINT MSI_SetFeatureStateW(MSIPACKAGE *package, LPCWSTR szFeature, INSTALLSTATE iState)
Definition: install.c:915
uint32_t entry
Definition: isohybrid.c:63
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
UINT msi_set_property(MSIDATABASE *, const WCHAR *, const WCHAR *, int) DECLSPEC_HIDDEN
Definition: package.c:2044
static HWND dialog
Definition: gui.c:33

◆ event_add_source()

static UINT event_add_source ( msi_dialog dialog,
const WCHAR argument 
)
static

Definition at line 4467 of file dialog.c.

4468 {
4470 
4471  LIST_FOR_EACH_ENTRY( feature, &dialog->package->features, MSIFEATURE, entry )
4472  {
4473  if (!wcscmp( argument, feature->Feature ) || !wcscmp( argument, L"ALL" ))
4474  {
4475  if (feature->ActionRequest != INSTALLSTATE_SOURCE)
4476  msi_set_property( dialog->package->db, L"Preselected", L"1", -1 );
4477  MSI_SetFeatureStateW( dialog->package, feature->Feature, INSTALLSTATE_SOURCE );
4478  }
4479  }
4480  return ERROR_SUCCESS;
4481 }
INTERNETFEATURELIST feature
Definition: misc.c:1719
#define ERROR_SUCCESS
Definition: deptool.c:10
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define L(x)
Definition: ntvdm.h:50
UINT MSI_SetFeatureStateW(MSIPACKAGE *package, LPCWSTR szFeature, INSTALLSTATE iState)
Definition: install.c:915
uint32_t entry
Definition: isohybrid.c:63
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
UINT msi_set_property(MSIDATABASE *, const WCHAR *, const WCHAR *, int) DECLSPEC_HIDDEN
Definition: package.c:2044
static HWND dialog
Definition: gui.c:33

◆ event_cleanup_subscriptions()

static void event_cleanup_subscriptions ( MSIPACKAGE package,
const WCHAR dialog 
)
static

Definition at line 4106 of file dialog.c.

4107 {
4108  struct list *item, *next;
4109 
4110  LIST_FOR_EACH_SAFE( item, next, &package->subscriptions )
4111  {
4112  struct subscriber *sub = LIST_ENTRY( item, struct subscriber, entry );
4113 
4114  if (wcscmp( sub->dialog->name, dialog )) continue;
4115  list_remove( &sub->entry );
4116  free_subscriber( sub );
4117  }
4118 }
#define LIST_FOR_EACH_SAFE(cursor, cursor2, list)
Definition: list.h:192
struct list entry
Definition: dialog.c:112
msi_dialog * dialog
Definition: dialog.c:113
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
uint32_t entry
Definition: isohybrid.c:63
Definition: _list.h:228
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
struct list subscriptions
Definition: msipriv.h:461
static unsigned __int64 next
Definition: rand_nt.c:6
static ATOM item
Definition: dde.c:856
static HWND dialog
Definition: gui.c:33
#define LIST_ENTRY(type)
Definition: queue.h:175
static void free_subscriber(struct subscriber *sub)
Definition: dialog.c:4098
WCHAR name[1]
Definition: dialog.c:107

Referenced by event_end_dialog(), and msi_dialog_destroy().

◆ event_directory_list_new()

static UINT event_directory_list_new ( msi_dialog dialog,
const WCHAR argument 
)
static

Definition at line 4585 of file dialog.c.

4586 {
4588 }
static UINT msi_dialog_directorylist_new(msi_dialog *dialog)
Definition: dialog.c:2989
static HWND dialog
Definition: gui.c:33

◆ event_directory_list_up()

static UINT event_directory_list_up ( msi_dialog dialog,
const WCHAR argument 
)
static

Definition at line 4580 of file dialog.c.

4581 {
4583 }
static UINT msi_dialog_directorylist_up(msi_dialog *dialog)
Definition: dialog.c:2933
static HWND dialog
Definition: gui.c:33

◆ event_do_action()

static UINT event_do_action ( msi_dialog dialog,
const WCHAR argument 
)
static

Definition at line 4429 of file dialog.c.

4430 {
4431  ACTION_PerformAction(dialog->package, argument);
4432  return ERROR_SUCCESS;
4433 }
#define ERROR_SUCCESS
Definition: deptool.c:10
UINT ACTION_PerformAction(MSIPACKAGE *package, const WCHAR *action)
Definition: action.c:7610
static HWND dialog
Definition: gui.c:33

◆ event_do_dialog()

static INT event_do_dialog ( MSIPACKAGE package,
const WCHAR name,
msi_dialog parent,
BOOL  destroy_modeless 
)
static

Definition at line 4316 of file dialog.c.

4317 {
4318  msi_dialog *dialog;
4319  UINT r;
4320  INT retval;
4321 
4322  /* create a new dialog */
4324  if (dialog)
4325  {
4326  /* kill the current modeless dialog */
4327  if (destroy_modeless && package->dialog)
4328  {
4329  msi_dialog_destroy( package->dialog );
4330  package->dialog = NULL;
4331  }
4332 
4333  /* modeless dialogs return an error message */
4335  if (r == ERROR_SUCCESS)
4336  {
4337  retval = dialog->retval;
4339  return retval;
4340  }
4341  else
4342  {
4343  package->dialog = dialog;
4344  return IDOK;
4345  }
4346  }
4347  else return 0;
4348 }
#define IDOK
Definition: winuser.h:824
#define ERROR_SUCCESS
Definition: deptool.c:10
static msi_dialog * dialog_create(MSIPACKAGE *package, const WCHAR *name, msi_dialog *parent, control_event_handler event_handler)
Definition: dialog.c:3997
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
msi_dialog * dialog
Definition: msipriv.h:453
void msi_dialog_destroy(msi_dialog *dialog)
Definition: dialog.c:4120
int32_t INT
Definition: typedefs.h:58
r parent
Definition: btrfs.c:2979
static UINT dialog_event_handler(msi_dialog *, const WCHAR *, const WCHAR *)
Definition: dialog.c:4627
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static UINT dialog_run_message_loop(msi_dialog *dialog)
Definition: dialog.c:3903
static HWND dialog
Definition: gui.c:33
Definition: name.c:38

Referenced by ACTION_DialogBox(), and event_spawn_dialog().

◆ event_end_dialog()

static UINT event_end_dialog ( msi_dialog dialog,
const WCHAR argument 
)
static

Definition at line 4351 of file dialog.c.

4352 {
4353  if (!wcscmp( argument, L"Exit" ))
4354  dialog->retval = IDCANCEL;
4355  else if (!wcscmp( argument, L"Retry" ))
4356  dialog->retval = IDRETRY;
4357  else if (!wcscmp( argument, L"Ignore" ))
4358  dialog->retval = IDOK;
4359  else if (!wcscmp( argument, L"Return" ))
4360  dialog->retval = 0;
4361  else
4362  {
4363  ERR("Unknown argument string %s\n", debugstr_w(argument));
4364  dialog->retval = IDABORT;
4365  }
4366  event_cleanup_subscriptions( dialog->package, dialog->name );
4368  return ERROR_SUCCESS;
4369 }
#define IDOK
Definition: winuser.h:824
#define IDABORT
Definition: winuser.h:826
#define ERROR_SUCCESS
Definition: deptool.c:10
static void event_cleanup_subscriptions(MSIPACKAGE *package, const WCHAR *dialog)
Definition: dialog.c:4106
#define L(x)
Definition: ntvdm.h:50
#define debugstr_w
Definition: kernel32.h:32
#define IDRETRY
Definition: winuser.h:827
#define ERR(fmt,...)
Definition: debug.h:110
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
static HWND dialog
Definition: gui.c:33
static void msi_dialog_end_dialog(msi_dialog *dialog)
Definition: dialog.c:4045
#define IDCANCEL
Definition: winuser.h:825

Referenced by pending_event_end_dialog().

◆ event_new_dialog()

static UINT event_new_dialog ( msi_dialog dialog,
const WCHAR argument 
)
static

Definition at line 4380 of file dialog.c.

4381 {
4382  /* store the name of the next dialog, and signal this one to end */
4383  dialog->package->next_dialog = strdupW( argument );
4386  return ERROR_SUCCESS;
4387 }
#define ERROR_SUCCESS
Definition: deptool.c:10
static WCHAR * strdupW(const WCHAR *src)
Definition: main.c:92
void msi_event_cleanup_all_subscriptions(MSIPACKAGE *package)
Definition: dialog.c:4173
static HWND dialog
Definition: gui.c:33
static void msi_dialog_end_dialog(msi_dialog *dialog)
Definition: dialog.c:4045

Referenced by pending_event_new_dialog().

◆ event_reinstall()

static UINT event_reinstall ( msi_dialog dialog,
const WCHAR argument 
)
static

Definition at line 4595 of file dialog.c.

4596 {
4597  return msi_set_property( dialog->package->db, L"REINSTALL", argument, -1 );
4598 }
#define L(x)
Definition: ntvdm.h:50
UINT msi_set_property(MSIDATABASE *, const WCHAR *, const WCHAR *, int) DECLSPEC_HIDDEN
Definition: package.c:2044
static HWND dialog
Definition: gui.c:33

◆ event_reinstall_mode()

static UINT event_reinstall_mode ( msi_dialog dialog,
const WCHAR argument 
)
static

Definition at line 4590 of file dialog.c.

4591 {
4592  return msi_set_property( dialog->package->db, L"REINSTALLMODE", argument, -1 );
4593 }
#define L(x)
Definition: ntvdm.h:50
UINT msi_set_property(MSIDATABASE *, const WCHAR *, const WCHAR *, int) DECLSPEC_HIDDEN
Definition: package.c:2044
static HWND dialog
Definition: gui.c:33

◆ event_remove()

static UINT event_remove ( msi_dialog dialog,
const WCHAR argument 
)
static

Definition at line 4451 of file dialog.c.

4452 {
4454 
4455  LIST_FOR_EACH_ENTRY( feature, &dialog->package->features, MSIFEATURE, entry )
4456  {
4457  if (!wcscmp( argument, feature->Feature ) || !wcscmp( argument, L"ALL" ))
4458  {
4459  if (feature->ActionRequest != INSTALLSTATE_ABSENT)
4460  msi_set_property( dialog->package->db, L"Preselected", L"1", -1 );
4461  MSI_SetFeatureStateW( dialog->package, feature->Feature, INSTALLSTATE_ABSENT );
4462  }
4463  }
4464  return ERROR_SUCCESS;
4465 }
INTERNETFEATURELIST feature
Definition: misc.c:1719
#define ERROR_SUCCESS
Definition: deptool.c:10
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define L(x)
Definition: ntvdm.h:50
UINT MSI_SetFeatureStateW(MSIPACKAGE *package, LPCWSTR szFeature, INSTALLSTATE iState)
Definition: install.c:915
uint32_t entry
Definition: isohybrid.c:63
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
UINT msi_set_property(MSIDATABASE *, const WCHAR *, const WCHAR *, int) DECLSPEC_HIDDEN
Definition: package.c:2044
static HWND dialog
Definition: gui.c:33

◆ event_reset()

static UINT event_reset ( msi_dialog dialog,
const WCHAR argument 
)
static

Definition at line 4514 of file dialog.c.

4515 {
4517  return ERROR_SUCCESS;
4518 }
#define ERROR_SUCCESS
Definition: deptool.c:10
static UINT msi_dialog_reset(msi_dialog *dialog)
Definition: dialog.c:3604
static HWND dialog
Definition: gui.c:33

◆ event_set_install_level()

static UINT event_set_install_level ( msi_dialog dialog,
const WCHAR argument 
)
static

Definition at line 4572 of file dialog.c.

4573 {
4574  int level = wcstol( argument, NULL, 10 );
4575 
4576  TRACE("setting install level to %d\n", level);
4577  return MSI_SetInstallLevel( dialog->package, level );
4578 }
GLint level
Definition: gl.h:1546
_Check_return_ long __cdecl wcstol(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
UINT MSI_SetInstallLevel(MSIPACKAGE *package, int iInstallLevel)
Definition: install.c:1572
#define TRACE(s)
Definition: solgame.cpp:4
#define NULL
Definition: types.h:112
static HWND dialog
Definition: gui.c:33

◆ event_set_target_path()

static UINT event_set_target_path ( msi_dialog dialog,
const WCHAR argument 
)
static

Definition at line 4496 of file dialog.c.

4497 {
4498  WCHAR *path = msi_dup_property( dialog->package->db, argument );
4499  MSIRECORD *rec = MSI_CreateRecord( 1 );
4500  UINT r = ERROR_SUCCESS;
4501 
4502  MSI_RecordSetStringW( rec, 1, path );
4503  msi_event_fire( dialog->package, L"SelectionPath", rec );
4504  if (path)
4505  {
4506  /* failure to set the path halts the executing of control events */
4507  r = MSI_SetTargetPathW( dialog->package, argument, path );
4508  msi_free( path );
4509  }
4510  msi_free( &rec->hdr );
4511  return r;
4512 }
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
Definition: record.c:597
#define ERROR_SUCCESS
Definition: deptool.c:10
MSIOBJECTHDR hdr
Definition: msipriv.h:151
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
static void msi_free(void *mem)
Definition: msipriv.h:1159
#define L(x)
Definition: ntvdm.h:50
void msi_event_fire(MSIPACKAGE *package, const WCHAR *event, MSIRECORD *rec)
Definition: dialog.c:4483
UINT MSI_SetTargetPathW(MSIPACKAGE *package, LPCWSTR szFolder, LPCWSTR szFolderPath)
Definition: install.c:564
__wchar_t WCHAR
Definition: xmlstorage.h:180
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
Definition: record.c:76
unsigned int UINT
Definition: ndis.h:50
static HWND dialog
Definition: gui.c:33
LPWSTR msi_dup_property(MSIDATABASE *db, LPCWSTR prop) DECLSPEC_HIDDEN
Definition: package.c:2227

◆ event_spawn_dialog()

static UINT event_spawn_dialog ( msi_dialog dialog,
const WCHAR argument 
)
static

Definition at line 4398 of file dialog.c.

4399 {
4400  INT r;
4401  /* don't destroy a modeless dialogs that might be our parent */
4402  r = event_do_dialog( dialog->package, argument, dialog, FALSE );
4403  if (r != 0)
4404  {
4405  dialog->retval = r;
4407  }
4408  else
4410 
4411  return ERROR_SUCCESS;
4412 }
#define ERROR_SUCCESS
Definition: deptool.c:10
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
int32_t INT
Definition: typedefs.h:58
#define FALSE
Definition: types.h:117
static void msi_dialog_update_all_controls(msi_dialog *dialog)
Definition: dialog.c:516
static INT event_do_dialog(MSIPACKAGE *package, const WCHAR *name, msi_dialog *parent, BOOL destroy_modeless)
Definition: dialog.c:4316
static HWND dialog
Definition: gui.c:33
static void msi_dialog_end_dialog(msi_dialog *dialog)
Definition: dialog.c:4045

Referenced by pending_event_spawn_dialog().

◆ event_spawn_wait_dialog()

static UINT event_spawn_wait_dialog ( msi_dialog dialog,
const WCHAR argument 
)
static

Definition at line 4423 of file dialog.c.

4424 {
4425  FIXME("doing nothing\n");
4426  return ERROR_SUCCESS;
4427 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define FIXME(fmt,...)
Definition: debug.h:111

◆ event_subscribe()

static void event_subscribe ( msi_dialog dialog,
const WCHAR event,
const WCHAR control,
const WCHAR attribute 
)
static

Definition at line 660 of file dialog.c.

661 {
662  struct subscriber *sub;
663 
664  TRACE("dialog %s event %s control %s attribute %s\n", debugstr_w(dialog->name), debugstr_w(event),
666 
667  LIST_FOR_EACH_ENTRY( sub, &dialog->package->subscriptions, struct subscriber, entry )
668  {
669  if (sub->dialog == dialog &&
670  !wcsicmp( sub->event, event ) &&
671  !wcsicmp( sub->control, control ) &&
672  !wcsicmp( sub->attribute, attribute ))
673  {
674  TRACE("already subscribed\n");
675  return;
676  };
677  }
678  if (!(sub = msi_alloc( sizeof(*sub) ))) return;
679  sub->dialog = dialog;
680  sub->event = strdupW( event );
681  sub->control = strdupW( control );
682  sub->attribute = strdupW( attribute );
683  list_add_tail( &dialog->package->subscriptions, &sub->entry );
684 }
struct list entry
Definition: dialog.c:112
static WCHAR * strdupW(const WCHAR *src)
Definition: main.c:92
msi_dialog * dialog
Definition: dialog.c:113
WCHAR * attribute
Definition: dialog.c:116
WCHAR * event
Definition: dialog.c:114
__WINE_SERVER_LIST_INLINE void list_add_tail(struct list *list, struct list *elem)
Definition: list.h:102
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
#define wcsicmp
Definition: compat.h:15
uint32_t entry
Definition: isohybrid.c:63
struct _cl_event * event
Definition: glext.h:7739
WCHAR * control
Definition: dialog.c:115
static HWND dialog
Definition: gui.c:33
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1142

Referenced by map_event(), msi_dialog_progress_bar(), msi_dialog_selection_tree(), and msi_dialog_text_control().

◆ event_validate_product_id()

static UINT event_validate_product_id ( msi_dialog dialog,
const WCHAR argument 
)
static

Definition at line 4600 of file dialog.c.

4601 {
4602  return msi_validate_product_id( dialog->package );
4603 }
UINT msi_validate_product_id(MSIPACKAGE *package)
Definition: action.c:7148
static HWND dialog
Definition: gui.c:33

◆ free_subscriber()

static void free_subscriber ( struct subscriber sub)
static

Definition at line 4098 of file dialog.c.

4099 {
4100  msi_free( sub->event );
4101  msi_free( sub->control );
4102  msi_free( sub->attribute );
4103  msi_free( sub );
4104 }
static void msi_free(void *mem)
Definition: msipriv.h:1159
WCHAR * attribute
Definition: dialog.c:116
WCHAR * event
Definition: dialog.c:114
WCHAR * control
Definition: dialog.c:115

Referenced by event_cleanup_subscriptions(), and msi_event_cleanup_all_subscriptions().

◆ get_path_property()

static WCHAR* get_path_property ( msi_dialog dialog,
msi_control control 
)
static

Definition at line 2089 of file dialog.c.

2090 {
2091  WCHAR *prop, *path;
2093  if (!(prop = msi_dialog_dup_property( dialog, control->property, indirect ))) return NULL;
2095  msi_free( prop );
2096  return path;
2097 }
#define TRUE
Definition: types.h:120
GLsizei const GLchar ** path
Definition: glext.h:7234
static void msi_free(void *mem)
Definition: msipriv.h:1159
unsigned int BOOL
Definition: ntddk_ex.h:94
__wchar_t WCHAR
Definition: xmlstorage.h:180
static LPWSTR msi_dialog_dup_property(msi_dialog *dialog, LPCWSTR property, BOOL indirect)
Definition: dialog.c:217
#define NULL
Definition: types.h:112
WCHAR * control
Definition: dialog.c:115
static HWND dialog
Definition: gui.c:33

Referenced by msi_dialog_directorylist_new(), msi_dialog_update_directory_combo(), msi_dialog_update_directory_list(), and msi_dialog_update_pathedit().

◆ get_unique_folder_name()

static WCHAR* get_unique_folder_name ( const WCHAR root,
int ret_len 
)
static

Definition at line 2961 of file dialog.c.

2962 {
2963  WCHAR newfolder[MAX_PATH], *path, *ptr;
2964  int len, count = 2;
2965 
2966  len = LoadStringW( msi_hInstance, IDS_NEWFOLDER, newfolder, ARRAY_SIZE(newfolder) );
2967  len += lstrlenW(root) + 1;
2968  if (!(path = msi_alloc( (len + 4) * sizeof(WCHAR) ))) return NULL;
2969  lstrcpyW( path, root );
2970  lstrcatW( path, newfolder );
2971 
2972  for (;;)
2973  {
2975  if (count > 99)
2976  {
2977  msi_free( path );
2978  return NULL;
2979  }
2980  swprintf( path, len + 4, L"%s%s %u", root, newfolder, count++ );
2981  }
2982 
2983  ptr = wcsrchr( path, '\\' ) + 1;
2984  *ret_len = lstrlenW(ptr);
2985  memmove( path, ptr, *ret_len * sizeof(WCHAR) );
2986  return path;
2987 }
#define memmove(s1, s2, n)
Definition: mkisofs.h:881
#define IDS_NEWFOLDER
GLsizei const GLchar ** path
Definition: glext.h:7234
GLuint GLuint GLsizei count
Definition: gl.h:1545
static void msi_free(void *mem)
Definition: msipriv.h:1159
#define lstrlenW
Definition: compat.h:609
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define L(x)
Definition: ntvdm.h:50
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
Definition: fileinfo.c:652
static PVOID ptr
Definition: dispmode.c:27
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MAX_PATH
Definition: compat.h:34
HINSTANCE msi_hInstance
Definition: msi_main.c:51
#define INVALID_FILE_ATTRIBUTES
Definition: vfdcmd.c:23
static JOBOBJECTINFOCLASS LPVOID DWORD LPDWORD ret_len
Definition: process.c:79
GLenum GLsizei len
Definition: glext.h:6722
#define wcsrchr
Definition: compat.h:16
int _cdecl swprintf(const WCHAR *,...)
#define lstrcpyW
Definition: compat.h:608
#define ARRAY_SIZE(a)
Definition: main.h:24
#define NULL
Definition: types.h:112
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1142
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274

Referenced by msi_dialog_directorylist_new().

◆ map_event()

static UINT map_event ( MSIRECORD row,
void param 
)
static

Definition at line 692 of file dialog.c.

693 {
694  struct dialog_control *dc = param;
695  const WCHAR *event = MSI_RecordGetString( row, 3 );
696  const WCHAR *attribute = MSI_RecordGetString( row, 4 );
697 
698  event_subscribe( dc->dialog, event, dc->control, attribute );
699  return ERROR_SUCCESS;
700 }
#define ERROR_SUCCESS
Definition: deptool.c:10
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:433
__wchar_t WCHAR
Definition: xmlstorage.h:180
GLfloat param
Definition: glext.h:5796
struct _cl_event * event
Definition: glext.h:7739
static void event_subscribe(msi_dialog *dialog, const WCHAR *event, const WCHAR *control, const WCHAR *attribute)
Definition: dialog.c:660
static const WCHAR dc[]
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78

Referenced by dialog_map_events().

◆ MSI_ClosePreview()

static void MSI_ClosePreview ( MSIOBJECTHDR arg)
static

Definition at line 4185 of file dialog.c.

4186 {
4188  msiobj_release( &preview->package->hdr );
4189 }
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
static previewinfo preview
Definition: print.c:56

Referenced by MSI_EnableUIPreview().

◆ msi_combobox_add_item()

static UINT msi_combobox_add_item ( MSIRECORD rec,
LPVOID  param 
)
static

Definition at line 1452 of file dialog.c.

1453 {
1454  struct msi_combobox_info *info = param;
1455  LPCWSTR value, text;
1456  int pos;
1457 
1458  value = MSI_RecordGetString( rec, 3 );
1459  text = MSI_RecordGetString( rec, 4 );
1460 
1461  info->items[info->addpos_items] = strdupW( value );
1462 
1463  pos = SendMessageW( info->hwnd, CB_ADDSTRING, 0, (LPARAM)text );
1464  SendMessageW( info->hwnd, CB_SETITEMDATA, pos, (LPARAM)info->items[info->addpos_items] );
1465  info->addpos_items++;
1466 
1467  return ERROR_SUCCESS;
1468 }
#define CB_SETITEMDATA
Definition: winuser.h:1953
Definition: pdh_main.c:93
#define ERROR_SUCCESS
Definition: deptool.c:10
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
static WCHAR * strdupW(const WCHAR *src)
Definition: main.c:92
const WCHAR * text
Definition: package.c:1743
#define CB_ADDSTRING
Definition: winuser.h:1923
LONG_PTR LPARAM
Definition: windef.h:208
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:433
GLfloat param
Definition: glext.h:5796
GLsizei const GLfloat * value
Definition: glext.h:6069
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

Referenced by msi_combobox_add_items().

◆ msi_combobox_add_items()

static UINT msi_combobox_add_items ( struct msi_combobox_info info,
LPCWSTR  property 
)
static

Definition at line 1470 of file dialog.c.

1471 {
1472  MSIQUERY *view;
1473  DWORD count;
1474  UINT r;
1475 
1476  r = MSI_OpenQuery( info->dialog->package->db, &view,
1477  L"SELECT * FROM `ComboBox` WHERE `Property` = '%s' ORDER BY `Order`", property );
1478  if (r != ERROR_SUCCESS)
1479  return r;
1480 
1481  /* just get the number of records */
1482  count = 0;
1484  if (r != ERROR_SUCCESS)
1485  {
1486  msiobj_release( &view->hdr );
1487  return r;
1488  }
1489  info->num_items = count;
1490  info->items = msi_alloc( sizeof(*info->items) * count );
1491 
1493  msiobj_release( &view->hdr );
1494  return r;
1495 }
#define ERROR_SUCCESS
Definition: deptool.c:10
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLuint GLuint GLsizei count
Definition: gl.h:1545
UINT WINAPIV MSI_OpenQuery(MSIDATABASE *, MSIQUERY **, LPCWSTR,...) DECLSPEC_HIDDEN
Definition: msiquery.c:138
#define L(x)
Definition: ntvdm.h:50
unsigned long DWORD
Definition: ntddk_ex.h:95
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1142
static IOleDocumentView * view
Definition: activex.c:1749
static UINT msi_combobox_add_item(MSIRECORD *rec, LPVOID param)
Definition: dialog.c:1452
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163

Referenced by msi_dialog_combo_control().

◆ msi_destroy_control()

static void msi_destroy_control ( msi_control t)
static

Definition at line 361 of file dialog.c.

362 {
363  list_remove( &t->entry );
364  /* leave dialog->hwnd - destroying parent destroys child windows */
365  msi_free( t->property );
366  msi_free( t->value );
367  if( t->hBitmap )
368  DeleteObject( t->hBitmap );
369  if( t->hIcon )
370  DestroyIcon( t->hIcon );
371  if ( t->hImageList )
372  ImageList_Destroy( t->hImageList );
373  msi_free( t->tabnext );
374  msi_free( t->type );
375  if (t->hDll)
376  FreeLibrary( t->hDll );
377  msi_free( t );
378 }
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2022
GLdouble GLdouble t
Definition: gl.h:2047
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
static void msi_free(void *mem)
Definition: msipriv.h:1159
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
Definition: imagelist.c:928
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
#define FreeLibrary(x)
Definition: compat.h:607

Referenced by msi_dialog_destroy().

◆ msi_dialog_add_control()

static msi_control* msi_dialog_add_control ( msi_dialog dialog,
MSIRECORD rec,
LPCWSTR  szCls,
DWORD  style 
)
static

Definition at line 721 of file dialog.c.

723 {
724  DWORD attributes;
725  const WCHAR *text = NULL, *name, *control_type;
726  DWORD exstyle = 0;
727 
728  name = MSI_RecordGetString( rec, 2 );
729  control_type = MSI_RecordGetString( rec, 3 );
730  attributes = MSI_RecordGetInteger( rec, 8 );
731  if (wcscmp( control_type, L"ScrollableText" )) text = MSI_RecordGetString( rec, 10 );
732 
733  TRACE( "%s, %s, %#lx, %s, %#lx\n", debugstr_w(szCls), debugstr_w(name), attributes, debugstr_w(text), style );
734 
735  if( attributes & msidbControlAttributesVisible )
736  style |= WS_VISIBLE;
737  if( ~attributes & msidbControlAttributesEnabled )
738  style |= WS_DISABLED;
739  if( attributes & msidbControlAttributesSunken )
740  exstyle |= WS_EX_CLIENTEDGE;
741 
743 
744  return dialog_create_window( dialog, rec, exstyle, szCls, name, text, style, dialog->hwnd );
745 }
static msi_control * dialog_create_window(msi_dialog *dialog, MSIRECORD *rec, DWORD exstyle, const WCHAR *szCls, const WCHAR *name, const WCHAR *text, DWORD style, HWND parent)
Definition: dialog.c:380
#define WS_DISABLED
Definition: pedump.c:621
const WCHAR * text
Definition: package.c:1743
static const char * control_type(DWORD dwControlType)
Definition: mixer.c:110
#define L(x)
Definition: ntvdm.h:50
#define debugstr_w
Definition: kernel32.h:32
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:433
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long DWORD
Definition: ntddk_ex.h:95
int MSI_RecordGetInteger(MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:213
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
#define NULL
Definition: types.h:112
static HWND dialog
Definition: gui.c:33
Definition: name.c:38
static void dialog_map_events(msi_dialog *dialog, const WCHAR *control)
Definition: dialog.c:702
Arabic default style
Definition: afstyles.h:93
#define WS_VISIBLE
Definition: pedump.c:620
GLuint const GLchar * name
Definition: glext.h:6031

Referenced by msi_dialog_bitmap_control(), msi_dialog_button_control(), msi_dialog_checkbox_control(), msi_dialog_combo_control(), msi_dialog_directory_combo(), msi_dialog_directory_list(), msi_dialog_edit_control(), msi_dialog_group_box(), msi_dialog_hyperlink(), msi_dialog_icon_control(), msi_dialog_list_box(), msi_dialog_listview(), msi_dialog_maskedit_control(), msi_dialog_pathedit_control(), msi_dialog_progress_bar(), msi_dialog_radiogroup_control(), msi_dialog_scrolltext_control(), msi_dialog_selection_tree(), msi_dialog_text_control(), msi_dialog_volumecost_list(), and msi_dialog_volumeselect_combo().

◆ msi_dialog_add_font()

static UINT msi_dialog_add_font ( MSIRECORD rec,
LPVOID  param 
)
static

Definition at line 276 of file dialog.c.

277 {
279  msi_font *font;
280  LPCWSTR face, name;
281  LOGFONTW lf;
282  INT style;
283  HDC hdc;
284 
285  /* create a font and add it to the list */
286  name = MSI_RecordGetString( rec, 1 );
288  lstrcpyW( font->name, name );
289  list_add_head( &dialog->fonts, &font->entry );
290 
291  font->color = MSI_RecordGetInteger( rec, 4 );
292 
293  memset( &lf, 0, sizeof lf );
294  face = MSI_RecordGetString( rec, 2 );
295  lf.lfHeight = MSI_RecordGetInteger( rec, 3 );
296  style = MSI_RecordGetInteger( rec, 5 );
298  lf.lfWeight = FW_BOLD;
300  lf.lfItalic = TRUE;
302  lf.lfUnderline = TRUE;
304  lf.lfStrikeOut = TRUE;
306 
307  /* adjust the height */
308  hdc = GetDC( dialog->hwnd );
309  if (hdc)
310  {
312  ReleaseDC( dialog->hwnd, hdc );
313  }
314 
315  font->hfont = CreateFontIndirectW( &lf );
316 
317  TRACE("Adding font style %s\n", debugstr_w(font->name) );
318 
319  return ERROR_SUCCESS;
320 }
#define LF_FACESIZE
Definition: dimm.idl:39
#define ERROR_SUCCESS
Definition: deptool.c:10
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
HDC WINAPI GetDC(_In_opt_ HWND)
Definition: mk_font.cpp:20
#define TRUE
Definition: types.h:120
LONG lfHeight
Definition: dimm.idl:59
static HDC
Definition: imagelist.c:92
__WINE_SERVER_LIST_INLINE void list_add_head(struct list *list, struct list *elem)
Definition: list.h:96
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
Definition: muldiv.c:25
#define lstrlenW
Definition: compat.h:609
int32_t INT
Definition: typedefs.h:58
#define lstrcpynW
Definition: compat.h:597
#define debugstr_w
Definition: kernel32.h:32
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:433
#define TRACE(s)
Definition: solgame.cpp:4
GLfloat param
Definition: glext.h:5796
WORD face[3]
Definition: mesh.c:4747
HDC hdc
Definition: main.c:9
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
int MSI_RecordGetInteger(MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:213
#define FW_BOLD
Definition: wingdi.h:378
#define lstrcpyW
Definition: compat.h:608
BYTE lfStrikeOut
Definition: dimm.idl:66
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
BYTE lfItalic
Definition: dimm.idl:64
static HWND dialog
Definition: gui.c:33
Definition: name.c:38
WCHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:72
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1142
#define LOGPIXELSY
Definition: wingdi.h:719
LONG lfWeight
Definition: dimm.idl:63
Arabic default style
Definition: afstyles.h:93
BYTE lfUnderline
Definition: dimm.idl:65
#define memset(x, y, z)
Definition: compat.h:39
GLenum GLuint GLint GLenum face
Definition: glext.h:7025
GLuint const GLchar * name
Definition: glext.h:6031

Referenced by msi_dialog_build_font_list().

◆ msi_dialog_adjust_dialog_pos()

static void msi_dialog_adjust_dialog_pos ( msi_dialog dialog,
MSIRECORD rec,
LPRECT  pos 
)
static

Definition at line 3656 of file dialog.c.

3657 {
3658  UINT xres, yres;
3659  POINT center;
3660  SIZE sz;
3661  LONG style;
3662 
3663  center.x = MSI_RecordGetInteger( rec, 2 );
3664  center.y = MSI_RecordGetInteger( rec, 3 );
3665 
3666  sz.cx = MSI_RecordGetInteger( rec, 4 );
3667  sz.cy = MSI_RecordGetInteger( rec, 5 );
3668 
3669  sz.cx = msi_dialog_scale_unit( dialog, sz.cx );
3670  sz.cy = msi_dialog_scale_unit( dialog, sz.cy );
3671 
3672  xres = msi_get_property_int( dialog->package->db, L"ScreenX", 0 );
3673  yres = msi_get_property_int( dialog->package->db, L"ScreenY", 0 );
3674 
3675  center.x = MulDiv( center.x, xres, 100 );
3676  center.y = MulDiv( center.y, yres, 100 );
3677 
3678  /* turn the client pos into the window rectangle */
3679  if (dialog->package->center_x && dialog->package->center_y)
3680  {
3681  pos->left = dialog->package->center_x - sz.cx / 2.0;
3682  pos->right = pos->left + sz.cx;
3683  pos->top = dialog->package->center_y - sz.cy / 2.0;
3684  pos->bottom = pos->top + sz.cy;
3685  }
3686  else
3687  {
3688  pos->left = center.x - sz.cx/2;
3689  pos->right = pos->left + sz.cx;
3690  pos->top = center.y - sz.cy/2;
3691  pos->bottom = pos->top + sz.cy;
3692 
3693  /* save the center */
3694  dialog->package->center_x = center.x;
3695  dialog->package->center_y = center.y;
3696  }
3697 
3698  dialog->size.cx = sz.cx;
3699  dialog->size.cy = sz.cy;
3700 
3701  TRACE("%s\n", wine_dbgstr_rect(pos));
3702 
3705 }
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
int msi_get_property_int(MSIDATABASE *package, LPCWSTR prop, int def) DECLSPEC_HIDDEN
Definition: package.c:2249
static INT msi_dialog_scale_unit(msi_dialog *dialog, INT val)
Definition: dialog.c:162
#define GetWindowLongPtrW
Definition: winuser.h:4809
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
Definition: muldiv.c:25
BOOL WINAPI AdjustWindowRect(_Inout_ LPRECT, _In_ DWORD, _In_ BOOL)
#define L(x)
Definition: ntvdm.h:50
#define FALSE
Definition: types.h:117
long LONG
Definition: pedump.c:60
LONG cx
Definition: windef.h:334
#define TRACE(s)
Definition: solgame.cpp:4
const char * wine_dbgstr_rect(const RECT *rect)
int MSI_RecordGetInteger(MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:213
#define GWL_STYLE
Definition: winuser.h:846
unsigned int UINT
Definition: ndis.h:50
static HWND dialog
Definition: gui.c:33
Arabic default style
Definition: afstyles.h:93
LONG cy
Definition: windef.h:335

Referenced by msi_dialog_oncreate().

◆ msi_dialog_bitmap_control()

static UINT msi_dialog_bitmap_control ( msi_dialog dialog,
MSIRECORD rec 
)
static

Definition at line 1355 of file dialog.c.

1356 {
1357  UINT cx, cy, flags, style, attributes;
1358  msi_control *control;
1359  LPWSTR name;
1360 
1363 
1364  attributes = MSI_RecordGetInteger( rec, 8 );
1365  if( attributes & msidbControlAttributesFixedSize )
1366  {
1367  flags |= LR_DEFAULTSIZE;
1368  style |= SS_CENTERIMAGE;
1369  }
1370 
1371  control = msi_dialog_add_control( dialog, rec, L"Static", style );
1372  cx = MSI_RecordGetInteger( rec, 6 );
1373  cy = MSI_RecordGetInteger( rec, 7 );
1376 
1377  name = msi_get_binary_name( dialog->package, rec );
1378  control->hBitmap = msi_load_picture( dialog->package->db, name, cx, cy, flags );
1379  if( control->hBitmap )
1380  SendMessageW( control->hwnd, STM_SETIMAGE,
1381  IMAGE_BITMAP, (LPARAM) control->hBitmap );
1382  else
1383  ERR("Failed to load bitmap %s\n", debugstr_w(name));
1384 
1385  msi_free( name );
1386 
1387  return ERROR_SUCCESS;
1388 }
#define WS_GROUP
Definition: pedump.c:633
#define ERROR_SUCCESS
Definition: deptool.c:10
#define LR_LOADFROMFILE
Definition: winuser.h:1086
static INT msi_dialog_scale_unit(msi_dialog *dialog, INT val)
Definition: dialog.c:162
static void msi_free(void *mem)
Definition: msipriv.h:1159
#define SS_BITMAP
Definition: pedump.c:704
#define L(x)
Definition: ntvdm.h:50
#define debugstr_w
Definition: kernel32.h:32
#define SS_LEFT
Definition: pedump.c:692
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:585
LONG_PTR LPARAM
Definition: windef.h:208
static HBITMAP msi_load_picture(MSIDATABASE *db, const WCHAR *name, INT cx, INT cy, DWORD flags)
Definition: dialog.c:954
#define LR_DEFAULTSIZE
Definition: winuser.h:1088
GLbitfield flags
Definition: glext.h:7161
#define SS_CENTERIMAGE
Definition: winuser.h:339
int MSI_RecordGetInteger(MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:213
#define ERR(fmt,...)
Definition: debug.h:110
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
unsigned int UINT
Definition: ndis.h:50
#define IMAGE_BITMAP
Definition: winuser.h:211
#define STM_SETIMAGE
Definition: winuser.h:2080
static HWND dialog
Definition: gui.c:33
_Out_opt_ int * cx
Definition: commctrl.h:585
Definition: name.c:38
static msi_control * msi_dialog_add_control(msi_dialog *dialog, MSIRECORD *rec, LPCWSTR szCls, DWORD style)
Definition: dialog.c:721
static WCHAR * msi_get_binary_name(MSIPACKAGE *package, MSIRECORD *rec)
Definition: dialog.c:844
WCHAR * LPWSTR
Definition: xmlstorage.h:184
Arabic default style
Definition: afstyles.h:93
HBITMAP hBitmap
Definition: dialog.c:67
GLuint const GLchar * name
Definition: glext.h:6031

◆ msi_dialog_build_font_list()

static UINT msi_dialog_build_font_list ( msi_dialog dialog)
static

Definition at line 345 of file dialog.c.

346 {
347  MSIQUERY *view;
348  UINT r;
349 
350  TRACE("dialog %p\n", dialog );
351 
352  r = MSI_OpenQuery( dialog->package->db, &view, L"SELECT * FROM `TextStyle`" );
353  if( r != ERROR_SUCCESS )
354  return r;
355 
357  msiobj_release( &view->hdr );
358  return r;
359 }
#define ERROR_SUCCESS
Definition: deptool.c:10
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
static UINT msi_dialog_add_font(MSIRECORD *rec, LPVOID param)
Definition: dialog.c:276
UINT WINAPIV MSI_OpenQuery(MSIDATABASE *, MSIQUERY **, LPCWSTR,...) DECLSPEC_HIDDEN
Definition: msiquery.c:138
#define L(x)
Definition: ntvdm.h:50
#define TRACE(s)
Definition: solgame.cpp:4
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static HWND dialog
Definition: gui.c:33
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163

Referenced by msi_dialog_oncreate().

◆ msi_dialog_button_control()

static UINT msi_dialog_button_control ( msi_dialog dialog,
MSIRECORD rec 
)
static

Definition at line 1018 of file dialog.c.

1019 {
1020  msi_control *control;
1021  UINT attributes, style, cx = 0, cy = 0, flags = 0;
1022  WCHAR *name = NULL;
1023 
1024  TRACE("%p %p\n", dialog, rec);
1025 
1026  style = WS_TABSTOP;
1027  attributes = MSI_RecordGetInteger( rec, 8 );
1028  if (attributes & msidbControlAttributesIcon) style |= BS_ICON;
1029  else if (attributes & msidbControlAttributesBitmap)
1030  {
1031  style |= BS_BITMAP;
1033  else
1034  {
1037  }
1038  }
1039 
1040  control = msi_dialog_add_control( dialog, rec, L"BUTTON", style );
1041  if (!control)
1042  return ERROR_FUNCTION_FAILED;
1043 
1045 
1046  if (attributes & msidbControlAttributesIcon)
1047  {
1048  name = msi_get_binary_name( dialog->package, rec );
1049  control->hIcon = msi_load_icon( dialog->package->db, name, attributes );
1050  if (control->hIcon)
1051  {
1052  SendMessageW( control->hwnd, BM_SETIMAGE, IMAGE_ICON, (LPARAM) control->hIcon );
1053  }
1054  else ERR("Failed to load icon %s\n", debugstr_w(name));
1055  }
1056  else if (attributes & msidbControlAttributesBitmap)
1057  {
1058  name = msi_get_binary_name( dialog->package, rec );
1059  control->hBitmap = msi_load_picture( dialog->package->db, name, cx, cy, flags );
1060  if (control->hBitmap)
1061  {
1062  SendMessageW( control->hwnd, BM_SETIMAGE, IMAGE_BITMAP, (LPARAM) control->hBitmap );
1063  }
1064  else ERR("Failed to load bitmap %s\n", debugstr_w(name));
1065  }
1066 
1067  msi_free( name );
1068  return ERROR_SUCCESS;
1069 }
#define IMAGE_ICON
Definition: winuser.h:212
#define ERROR_SUCCESS
Definition: deptool.c:10
HICON hIcon
Definition: dialog.c:68
msi_handler handler
Definition: dialog.c:63
static INT msi_dialog_scale_unit(msi_dialog *dialog, INT val)
Definition: dialog.c:162
static HICON msi_load_icon(MSIDATABASE *db, LPCWSTR text, UINT attributes)
Definition: dialog.c:482
static void msi_free(void *mem)
Definition: msipriv.h:1159
#define BM_SETIMAGE
Definition: winuser.h:1909
#define L(x)
Definition: ntvdm.h:50
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
#define debugstr_w
Definition: kernel32.h:32
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:585
LONG_PTR LPARAM
Definition: windef.h:208
static HBITMAP msi_load_picture(MSIDATABASE *db, const WCHAR *name, INT cx, INT cy, DWORD flags)
Definition: dialog.c:954
#define TRACE(s)
Definition: solgame.cpp:4
#define LR_DEFAULTSIZE
Definition: winuser.h:1088
__wchar_t WCHAR
Definition: xmlstorage.h:180
static UINT msi_dialog_button_handler(msi_dialog *dialog, msi_control *control, WPARAM param)
Definition: dialog.c:923
GLbitfield flags
Definition: glext.h:7161
#define BS_ICON
Definition: winuser.h:264
#define BS_BITMAP
Definition: winuser.h:258
#define WS_TABSTOP
Definition: pedump.c:634
int MSI_RecordGetInteger(MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:213
#define ERR(fmt,...)
Definition: debug.h:110
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
#define IMAGE_BITMAP
Definition: winuser.h:211
static HWND dialog
Definition: gui.c:33
_Out_opt_ int * cx
Definition: commctrl.h:585
Definition: name.c:38
static msi_control * msi_dialog_add_control(msi_dialog *dialog, MSIRECORD *rec, LPCWSTR szCls, DWORD style)
Definition: dialog.c:721
static WCHAR * msi_get_binary_name(MSIPACKAGE *package, MSIRECORD *rec)
Definition: dialog.c:844
Arabic default style
Definition: afstyles.h:93
HBITMAP hBitmap
Definition: dialog.c:67

◆ msi_dialog_button_handler()

static UINT msi_dialog_button_handler ( msi_dialog dialog,
msi_control control,
WPARAM  param 
)
static

Definition at line 923 of file dialog.c.

924 {
925  MSIQUERY *view;
926  UINT r;
927 
928  if (HIWORD(param) != BN_CLICKED)
929  return ERROR_SUCCESS;
930 
931  r = MSI_OpenQuery( dialog->package->db, &view,
932  L"SELECT * FROM `ControlEvent` WHERE `Dialog_` = '%s' AND `Control_` = '%s' ORDER BY `Ordering`",
933  dialog->name, control->name );
934  if (r != ERROR_SUCCESS)
935  {
936  ERR("query failed\n");
937  return ERROR_SUCCESS;
938  }
940  msiobj_release( &view->hdr );
941 
942  /* dialog control events must be processed last regardless of ordering */
943  if (dialog->pending_event)
944  {
945  r = dialog->pending_event( dialog, dialog->pending_argument );
946 
947  msi_free( dialog->pending_argument );
948  dialog->pending_event = NULL;
949  dialog->pending_argument = NULL;
950  }
951  return r;
952 }
#define ERROR_SUCCESS
Definition: deptool.c:10
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
WCHAR name[1]
Definition: dialog.c:77
static UINT msi_dialog_control_event(MSIRECORD *rec, LPVOID param)
Definition: dialog.c:903
static void msi_free(void *mem)
Definition: msipriv.h:1159
UINT WINAPIV MSI_OpenQuery(MSIDATABASE *, MSIQUERY **, LPCWSTR,...) DECLSPEC_HIDDEN
Definition: msiquery.c:138
#define L(x)
Definition: ntvdm.h:50
GLfloat param
Definition: glext.h:5796
#define BN_CLICKED
Definition: winuser.h:1912
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
#define ERR(fmt,...)
Definition: debug.h:110
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static HWND dialog
Definition: gui.c:33
#define HIWORD(l)
Definition: typedefs.h:247
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163

Referenced by msi_dialog_button_control(), msi_dialog_checkbox_handler(), msi_dialog_radiogroup_handler(), and MSIScrollText_WndProc().

◆ msi_dialog_check_messages()

void msi_dialog_check_messages ( HANDLE  handle)

Definition at line 4052 of file dialog.c.

4053 {
4054  DWORD r;
4055 
4056  /* in threads other than the UI thread, block */
4057  if( uiThreadId != GetCurrentThreadId() )
4058  {
4059  if (!handle) return;
4061  {
4062  MSG msg;
4063  while (PeekMessageW( &msg, NULL, 0, 0, PM_REMOVE ))
4064  {
4065  TranslateMessage( &msg );
4066  DispatchMessageW( &msg );
4067  }
4068  }
4069  return;
4070  }
4071 
4072  /* there are two choices for the UI thread */
4073  while (1)
4074  {
4076 
4077  if( !handle )
4078  break;
4079 
4080  /*
4081  * block here until somebody creates a new dialog or
4082  * the handle we're waiting on becomes ready
4083  */
4085  if( r == WAIT_OBJECT_0 )
4086  break;
4087  }
4088 }
BOOL WINAPI TranslateMessage(_In_ const MSG *)
static DWORD uiThreadId
Definition: dialog.c:140
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
DWORD WINAPI MsgWaitForMultipleObjectsEx(_In_ DWORD nCount, _In_reads_opt_(nCount) CONST HANDLE *pHandles, _In_ DWORD dwMilliseconds, _In_ DWORD dwWakeMask, _In_ DWORD dwFlags)
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
DWORD WINAPI GetCurrentThreadId(VOID)
Definition: thread.c:459
#define WAIT_OBJECT_0
Definition: winbase.h:403
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD WINAPI MsgWaitForMultipleObjects(_In_ DWORD nCount, _In_reads_opt_(nCount) CONST HANDLE *pHandles, _In_ BOOL fWaitAll, _In_ DWORD dwMilliseconds, _In_ DWORD dwWakeMask)
static void process_pending_messages(HWND hdlg)
Definition: dialog.c:3891
#define QS_ALLINPUT
Definition: winuser.h:897
#define NULL
Definition: types.h:112
#define msg(x)
Definition: auth_time.c:54
BOOL WINAPI PeekMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
#define PM_REMOVE
Definition: winuser.h:1186
#define INFINITE
Definition: serial.h:102

Referenced by ACTION_FinishCustomActions(), dialog_handle_event(), ITERATE_Actions(), msi_ui_progress(), register_dll(), wait_process_handle(), and wait_thread_handle().

◆ msi_dialog_checkbox_control()

static UINT msi_dialog_checkbox_control ( msi_dialog dialog,
MSIRECORD rec 
)
static

Definition at line 1153 of file dialog.c.

1154 {
1155  msi_control *control;
1156  LPCWSTR prop;
1157 
1158  TRACE("%p %p\n", dialog, rec);
1159 
1160  control = msi_dialog_add_control( dialog, rec, L"BUTTON", BS_CHECKBOX | BS_MULTILINE | WS_TABSTOP );
1163  prop = MSI_RecordGetString( rec, 9 );
1164  if (prop)
1165  {
1166  control->property = strdupW( prop );
1167  control->value = msi_get_checkbox_value( dialog, prop );
1168  TRACE("control %s value %s\n", debugstr_w(control->property), debugstr_w(control->value));
1169  }
1171  return ERROR_SUCCESS;
1172 }
static UINT msi_dialog_checkbox_handler(msi_dialog *dialog, msi_control *control, WPARAM param)
Definition: dialog.c:1136
#define ERROR_SUCCESS
Definition: deptool.c:10
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
static void msi_dialog_checkbox_sync_state(msi_dialog *dialog, msi_control *control)
Definition: dialog.c:1130
static WCHAR * strdupW(const WCHAR *src)
Definition: main.c:92
msi_handler handler
Definition: dialog.c:63
msi_update update
Definition: dialog.c:64
#define L(x)
Definition: ntvdm.h:50
#define debugstr_w
Definition: kernel32.h:32
#define BS_CHECKBOX
Definition: pedump.c:653
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:433
LPWSTR property
Definition: dialog.c:65
#define TRACE(s)
Definition: solgame.cpp:4
#define BS_MULTILINE
Definition: winuser.h:267
LPWSTR value
Definition: dialog.c:66
#define WS_TABSTOP
Definition: pedump.c:634
static LPWSTR msi_get_checkbox_value(msi_dialog *dialog, LPCWSTR prop)
Definition: dialog.c:1071
static HWND dialog
Definition: gui.c:33
static msi_control * msi_dialog_add_control(msi_dialog *dialog, MSIRECORD *rec, LPCWSTR szCls, DWORD style)
Definition: dialog.c:721

◆ msi_dialog_checkbox_handler()

static UINT msi_dialog_checkbox_handler ( msi_dialog dialog,
msi_control control,
WPARAM  param 
)
static

Definition at line 1136 of file dialog.c.

1137 {
1138  UINT state;
1139 
1140  if (HIWORD(param) != BN_CLICKED)
1141  return ERROR_SUCCESS;
1142 
1143  TRACE("clicked checkbox %s, set %s\n", debugstr_w(control->name), debugstr_w(control->property));
1144 
1146  state = state ? 0 : 1;
1149 
1150  return msi_dialog_button_handler( dialog, control, param );
1151 }
#define ERROR_SUCCESS
Definition: deptool.c:10
static void msi_dialog_checkbox_sync_state(msi_dialog *dialog, msi_control *control)
Definition: dialog.c:1130
WCHAR name[1]
Definition: dialog.c:77
static void msi_dialog_set_checkbox_state(msi_dialog *dialog, msi_control *control, UINT state)
Definition: dialog.c:1110
static UINT msi_dialog_get_checkbox_state(msi_dialog *dialog, msi_control *control)
Definition: dialog.c:1101
#define debugstr_w
Definition: kernel32.h:32
LPWSTR property
Definition: dialog.c:65
#define TRACE(s)
Definition: solgame.cpp:4
static UINT msi_dialog_button_handler(msi_dialog *dialog, msi_control *control, WPARAM param)
Definition: dialog.c:923
GLfloat param
Definition: glext.h:5796
#define BN_CLICKED
Definition: winuser.h:1912
static int state
Definition: maze.c:121
unsigned int UINT
Definition: ndis.h:50
static HWND dialog
Definition: gui.c:33
#define HIWORD(l)
Definition: typedefs.h:247

Referenced by msi_dialog_checkbox_control().

◆ msi_dialog_checkbox_sync_state()

static void msi_dialog_checkbox_sync_state ( msi_dialog dialog,
msi_control control 
)
static

Definition at line 1130 of file dialog.c.

1131 {
1134 }
static UINT msi_dialog_get_checkbox_state(msi_dialog *dialog, msi_control *control)
Definition: dialog.c:1101
#define BM_SETCHECK
Definition: winuser.h:1908
static int state
Definition: maze.c:121
#define BST_UNCHECKED
Definition: winuser.h:199
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
unsigned int UINT
Definition: ndis.h:50
static HWND dialog
Definition: gui.c:33
#define BST_CHECKED
Definition: winuser.h:197

Referenced by msi_dialog_checkbox_control(), and msi_dialog_checkbox_handler().

◆ msi_dialog_combo_control()

static UINT msi_dialog_combo_control ( msi_dialog dialog,
MSIRECORD rec 
)
static

Definition at line 1608 of file dialog.c.

1609 {
1610  struct msi_combobox_info *info;
1611  msi_control *control;
1612  DWORD attributes, style;
1613  LPCWSTR prop;
1614 
1615  info = msi_alloc( sizeof *info );
1616  if (!info)
1617  return ERROR_FUNCTION_FAILED;
1618 
1620  attributes = MSI_RecordGetInteger( rec, 8 );
1621  if ( ~attributes & msidbControlAttributesSorted)
1622  style |= CBS_SORT;
1623  if ( attributes & msidbControlAttributesComboList)
1625  else
1626  style |= CBS_DROPDOWN;
1627 
1628  control = msi_dialog_add_control( dialog, rec, WC_COMBOBOXW, style );
1629  if (!control)
1630  {
1631  msi_free( info );
1632  return ERROR_FUNCTION_FAILED;
1633  }
1634 
1637 
1638  prop = MSI_RecordGetString( rec, 9 );
1639  control->property = msi_dialog_dup_property( dialog, prop, FALSE );
1640 
1641  /* subclass */
1642  info->dialog = dialog;
1643  info->hwnd = control->hwnd;
1644  info->items = NULL;
1645  info->addpos_items = 0;
1646  info->oldproc = (WNDPROC)SetWindowLongPtrW( control->hwnd, GWLP_WNDPROC,
1648  SetPropW( control->hwnd, L"MSIDATA", info );
1649 
1650  if (control->property)
1651  msi_combobox_add_items( info, control->property );
1652 
1653  msi_dialog_combobox_update( dialog, control );
1654 
1655  return ERROR_SUCCESS;
1656 }
#define WS_GROUP
Definition: pedump.c:633
#define CBS_SORT
Definition: winuser.h:292
static UINT msi_combobox_add_items(struct msi_combobox_info *info, LPCWSTR property)
Definition: dialog.c:1470
#define ERROR_SUCCESS
Definition: deptool.c:10
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
msi_handler handler
Definition: dialog.c:63
static void msi_free(void *mem)
Definition: msipriv.h:1159
#define CBS_AUTOHSCROLL
Definition: winuser.h:281
#define WS_CHILD
Definition: pedump.c:617
msi_update update
Definition: dialog.c:64
#define L(x)
Definition: ntvdm.h:50
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
#define FALSE
Definition: types.h:117
static struct _test_info info[]
Definition: SetCursorPos.c:19
#define CBS_DROPDOWNLIST
Definition: winuser.h:284
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:433
LPWSTR property
Definition: dialog.c:65
BOOL WINAPI SetPropW(_In_ HWND, _In_ LPCWSTR, _In_opt_ HANDLE)
static void msi_dialog_combobox_update(msi_dialog *dialog, msi_control *control)
Definition: dialog.c:1573
static UINT msi_dialog_combobox_handler(msi_dialog *dialog, msi_control *control, WPARAM param)
Definition: dialog.c:1548
static LRESULT WINAPI MSIComboBox_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: dialog.c:1424
unsigned long DWORD
Definition: ntddk_ex.h:95
#define WS_TABSTOP
Definition: pedump.c:634
#define GWLP_WNDPROC
Definition: treelist.c:66
int MSI_RecordGetInteger(MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:213
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2886
static LPWSTR msi_dialog_dup_property(msi_dialog *dialog, LPCWSTR property, BOOL indirect)
Definition: dialog.c:217
#define CBS_DROPDOWN
Definition: winuser.h:283
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define NULL
Definition: types.h:112
static HWND dialog
Definition: gui.c:33
static msi_control * msi_dialog_add_control(msi_dialog *dialog, MSIRECORD *rec, LPCWSTR szCls, DWORD style)
Definition: dialog.c:721
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1142
#define SetWindowLongPtrW
Definition: winuser.h:5326
Arabic default style
Definition: afstyles.h:93
#define WC_COMBOBOXW
Definition: commctrl.h:4717

◆ msi_dialog_combobox_handler()

static UINT msi_dialog_combobox_handler ( msi_dialog dialog,
msi_control control,
WPARAM  param 
)
static

Definition at line 1548 of file dialog.c.

1549 {
1550  struct msi_combobox_info *info;
1551  int index;
1552  LPWSTR value;
1553 
1555  return ERROR_SUCCESS;
1556 
1557  info = GetPropW( control->hwnd, L"MSIDATA" );
1558  index = SendMessageW( control->hwnd, CB_GETCURSEL, 0, 0 );
1559  if (index == CB_ERR)
1560  value = msi_get_window_text( control->hwnd );
1561  else
1562  value = (LPWSTR) SendMessageW( control->hwnd, CB_GETITEMDATA, index, 0 );
1563 
1564  msi_dialog_set_property( info->dialog->package, control->property, value );
1566 
1567  if (index == CB_ERR)
1568  msi_free( value );
1569 
1570  return ERROR_SUCCESS;
1571 }
Definition: pdh_main.c:93
#define ERROR_SUCCESS
Definition: deptool.c:10
#define CB_GETITEMDATA
Definition: winuser.h:1937
static void msi_free(void *mem)
Definition: msipriv.h:1159
#define CB_GETCURSEL
Definition: winuser.h:1930
#define L(x)
Definition: ntvdm.h:50
static struct _test_info info[]
Definition: SetCursorPos.c:19
GLuint index
Definition: glext.h:6031
#define CB_ERR
Definition: winuser.h:2415
LPWSTR property
Definition: dialog.c:65
#define CBN_EDITCHANGE
Definition: winuser.h:1962
GLfloat param
Definition: glext.h:5796
#define index(s, c)
Definition: various.h:29
GLsizei const GLfloat * value
Definition: glext.h:6069
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)
#define CBN_SELCHANGE
Definition: winuser.h:1966
static LPWSTR msi_get_window_text(HWND hwnd)
Definition: dialog.c:143
#define HIWORD(l)
Definition: typedefs.h:247
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static UINT msi_dialog_evaluate_control_conditions(msi_dialog *dialog)
Definition: dialog.c:1530
static void msi_dialog_set_property(MSIPACKAGE *package, LPCWSTR property, LPCWSTR value)
Definition: dialog.c:527

Referenced by msi_dialog_combo_control().

◆ msi_dialog_combobox_update()

static void msi_dialog_combobox_update ( msi_dialog dialog,
msi_control control 
)
static

Definition at line 1573 of file dialog.c.

1574 {
1575  struct msi_combobox_info *info;
1576  LPWSTR value, tmp;
1577  DWORD j;
1578 
1579  info = GetPropW( control->hwnd, L"MSIDATA" );
1580 
1581  value = msi_dup_property( dialog->package->db, control->property );
1582  if (!value)
1583  {
1584  SendMessageW( control->hwnd, CB_SETCURSEL, -1, 0 );
1585  return;
1586  }
1587 
1588  for (j = 0; j < info->num_items; j++)
1589  {
1590  tmp = (LPWSTR) SendMessageW( control->hwnd, CB_GETITEMDATA, j, 0 );
1591  if (!wcscmp( value, tmp ))
1592  break;
1593  }
1594 
1595  if (j < info->num_items)
1596  {
1597  SendMessageW( control->hwnd, CB_SETCURSEL, j, 0 );
1598  }
1599  else
1600  {
1601  SendMessageW( control->hwnd, CB_SETCURSEL, -1, 0 );
1602  SetWindowTextW( control->hwnd, value );
1603  }
1604 
1605  msi_free(value);
1606 }
Definition: pdh_main.c:93
#define CB_GETITEMDATA
Definition: winuser.h:1937
static void msi_free(void *mem)
Definition: msipriv.h:1159
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
#define L(x)
Definition: ntvdm.h:50
static struct _test_info info[]
Definition: SetCursorPos.c:19
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
LPWSTR property
Definition: dialog.c:65
unsigned long DWORD
Definition: ntddk_ex.h:95
GLsizei const GLfloat * value
Definition: glext.h:6069
#define CB_SETCURSEL
Definition: winuser.h:1948
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)
static HWND dialog
Definition: gui.c:33
WCHAR * LPWSTR
Definition: xmlstorage.h:184
LPWSTR msi_dup_property(MSIDATABASE *db, LPCWSTR prop) DECLSPEC_HIDDEN
Definition: package.c:2227

Referenced by msi_dialog_combo_control().

◆ msi_dialog_control_event()

static UINT msi_dialog_control_event ( MSIRECORD rec,
LPVOID  param 
)
static

Definition at line 903 of file dialog.c.

904 {
907  UINT r;
908 
909  condition = MSI_RecordGetString( rec, 5 );
910  r = MSI_EvaluateConditionW( dialog->package, condition );
911  if (r == MSICONDITION_TRUE || r == MSICONDITION_NONE)
912  {
913  event = MSI_RecordGetString( rec, 3 );
914  arg = MSI_RecordGetString( rec, 4 );
915  if (event[0] == '[')
917  else
919  }
920  return ERROR_SUCCESS;
921 }
#define ERROR_SUCCESS
Definition: deptool.c:10
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
static UINT msi_dialog_send_event(msi_dialog *dialog, LPCWSTR event, LPCWSTR arg)
Definition: dialog.c:886
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
void * arg
Definition: msvc.h:10
MSICONDITION MSI_EvaluateConditionW(MSIPACKAGE *, LPCWSTR) DECLSPEC_HIDDEN
GLenum condition
Definition: glext.h:9255
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:433
GLfloat param
Definition: glext.h:5796
struct _cl_event * event
Definition: glext.h:7739
unsigned int UINT
Definition: ndis.h:50
static HWND dialog
Definition: gui.c:33
static UINT msi_dialog_set_property_event(msi_dialog *dialog, LPCWSTR event, LPCWSTR arg)
Definition: dialog.c:864

Referenced by msi_dialog_button_handler().

◆ msi_dialog_create_controls()

static UINT msi_dialog_create_controls ( MSIRECORD rec,
LPVOID  param 
)
static

Definition at line 3564 of file dialog.c.

3565 {
3566  msi_dialog *dialog = param;
3568  UINT i;
3569 
3570  /* find and call the function that can create this type of control */
3571  control_type = MSI_RecordGetString( rec, 3 );
3572  for( i = 0; i < ARRAY_SIZE( msi_dialog_handler ); i++ )
3574  break;
3575  if( i != ARRAY_SIZE( msi_dialog_handler ))
3576  msi_dialog_handler[i].func( dialog, rec );
3577  else
3578  ERR("no handler for element type %s\n", debugstr_w(control_type));
3579 
3580  return ERROR_SUCCESS;
3581 }
GLenum func
Definition: glext.h:6028
#define ERROR_SUCCESS
Definition: deptool.c:10
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
static const char * control_type(DWORD dwControlType)
Definition: mixer.c:110
static const struct control_handler msi_dialog_handler[]
Definition: dialog.c:3538
#define debugstr_w
Definition: kernel32.h:32
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:433
GLfloat param
Definition: glext.h:5796
#define wcsicmp
Definition: compat.h:15
#define ERR(fmt,...)
Definition: debug.h:110
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define ARRAY_SIZE(a)
Definition: main.h:24
unsigned int UINT
Definition: ndis.h:50
static HWND dialog
Definition: gui.c:33

Referenced by msi_dialog_fill_controls().

◆ msi_dialog_create_radiobutton()

static UINT msi_dialog_create_radiobutton ( MSIRECORD rec,
LPVOID  param 
)
static

Definition at line 2226 of file dialog.c.

2227 {
2229  msi_dialog *dialog = group->dialog;
2230  msi_control *control;
2231  LPCWSTR prop, text, name;
2233 
2234  name = MSI_RecordGetString( rec, 3 );
2235  text = MSI_RecordGetString( rec, 8 );
2236 
2237  control = dialog_create_window( dialog, rec, 0, L"BUTTON", name, text, style,
2238  group->parent->hwnd );
2239  if (!control)
2240  return ERROR_FUNCTION_FAILED;
2242 
2243  if (group->propval && !wcscmp( control->name, group->propval ))
2244  SendMessageW(control->hwnd, BM_SETCHECK, BST_CHECKED, 0);
2245 
2246  prop = MSI_RecordGetString( rec, 1 );
2247  if( prop )
2248  control->property = strdupW( prop );
2249 
2250  return ERROR_SUCCESS;
2251 }
static msi_control * dialog_create_window(msi_dialog *dialog, MSIRECORD *rec, DWORD exstyle, const WCHAR *szCls, const WCHAR *name, const WCHAR *text, DWORD style, HWND parent)
Definition: dialog.c:380
#define ERROR_SUCCESS
Definition: deptool.c:10
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
static WCHAR * strdupW(const WCHAR *src)
Definition: main.c:92
const WCHAR * text
Definition: package.c:1743
msi_handler handler
Definition: dialog.c:63
WCHAR name[1]
Definition: dialog.c:77
#define WS_CHILD
Definition: pedump.c:617
#define L(x)
Definition: ntvdm.h:50
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:433
LPWSTR property
Definition: dialog.c:65
GLboolean GLuint group
Definition: glext.h:11120
#define BM_SETCHECK
Definition: winuser.h:1908
#define BS_MULTILINE
Definition: winuser.h:267
GLfloat param
Definition: glext.h:5796
unsigned long DWORD
Definition: ntddk_ex.h:95
#define WS_TABSTOP
Definition: pedump.c:634
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
static UINT msi_dialog_radiogroup_handler(msi_dialog *dialog, msi_control *control, WPARAM param)
Definition: dialog.c:2213
#define BS_AUTORADIOBUTTON
Definition: pedump.c:660
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static HWND dialog
Definition: gui.c:33
#define BST_CHECKED
Definition: winuser.h:197
Definition: name.c:38
Arabic default style
Definition: afstyles.h:93
#define WS_VISIBLE
Definition: pedump.c:620
GLuint const GLchar * name
Definition: glext.h:6031

Referenced by msi_dialog_radiogroup_control().

◆ msi_dialog_destroy()

void msi_dialog_destroy ( msi_dialog dialog)

Definition at line 4120 of file dialog.c.

4121 {
4122  msi_font *font, *next;
4123 
4124  if( uiThreadId != GetCurrentThreadId() )
4125  {
4127  return;
4128  }
4129 
4130  if( dialog->hwnd )
4131  {
4132  ShowWindow( dialog->hwnd, SW_HIDE );
4133  DestroyWindow( dialog->hwnd );
4134  }
4135 
4136  /* unsubscribe events */
4137  event_cleanup_subscriptions( dialog->package, dialog->name );
4138 
4139  /* destroy the list of controls */
4140  while( !list_empty( &dialog->controls ) )
4141  {
4142  msi_control *t;
4143 
4144  t = LIST_ENTRY( list_head( &dialog->controls ),
4145  msi_control, entry );
4147  }
4148 
4149  /* destroy the list of fonts */
4151  {
4152  list_remove( &font->entry );
4153  DeleteObject( font->hfont );
4154  msi_free( font );
4155  }
4156  msi_free( dialog->default_font );
4157 
4158  msi_free( dialog->control_default );
4159  msi_free( dialog->control_cancel );
4160  dialog->package = NULL;
4161  msi_free( dialog );
4162 }
#define WM_MSI_DIALOG_DESTROY
Definition: dialog.c:136
Definition: mk_font.cpp:20
static DWORD uiThreadId
Definition: dialog.c:140
#define SW_HIDE
Definition: winuser.h:762
GLdouble GLdouble t
Definition: gl.h:2047
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
static void msi_free(void *mem)
Definition: msipriv.h:1159
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
static void event_cleanup_subscriptions(MSIPACKAGE *package, const WCHAR *dialog)
Definition: dialog.c:4106
BOOL WINAPI DestroyWindow(_In_ HWND)
__WINE_SERVER_LIST_INLINE struct list * list_head(const struct list *list)
Definition: list.h:131
LONG_PTR LPARAM
Definition: windef.h:208
DWORD WINAPI GetCurrentThreadId(VOID)
Definition: thread.c:459
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
static HWND hMsiHiddenWindow
Definition: dialog.c:141
uint32_t entry
Definition: isohybrid.c:63
__WINE_SERVER_LIST_INLINE int list_empty(const struct list *list)
Definition: list.h:143
static unsigned __int64 next
Definition: rand_nt.c:6
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define NULL
Definition: types.h:112
static HWND dialog
Definition: gui.c:33
static void msi_destroy_control(msi_control *t)
Definition: dialog.c:361
#define LIST_ENTRY(type)
Definition: queue.h:175

Referenced by dialog_create(), event_do_dialog(), MSI_FreePackage(), MSI_PreviewDialogW(), and MSIHiddenWindowProc().

◆ msi_dialog_directory_combo()

static UINT msi_dialog_directory_combo ( msi_dialog dialog,
MSIRECORD rec 
)
static

Definition at line 2864 of file dialog.c.

2865 {
2866  msi_control *control;
2867  LPCWSTR prop;
2868  DWORD style;
2869 
2870  /* FIXME: use CBS_OWNERDRAWFIXED and add owner draw code */
2873  control = msi_dialog_add_control( dialog, rec, WC_COMBOBOXW, style );
2874  if (!control)
2875  return ERROR_FUNCTION_FAILED;
2876 
2877  control->attributes = MSI_RecordGetInteger( rec, 8 );
2878  prop = MSI_RecordGetString( rec, 9 );
2879  control->property = msi_dialog_dup_property( dialog, prop, FALSE );
2880 
2882 
2883  return ERROR_SUCCESS;
2884 }
#define WS_GROUP
Definition: pedump.c:633
#define ERROR_SUCCESS
Definition: deptool.c:10
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
DWORD attributes
Definition: dialog.c:76
#define WS_CHILD
Definition: pedump.c:617
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
#define FALSE
Definition: types.h:117
#define CBS_DROPDOWNLIST
Definition: winuser.h:284
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:433
#define CBS_HASSTRINGS
Definition: winuser.h:285
LPWSTR property
Definition: dialog.c:65
unsigned long DWORD
Definition: ntddk_ex.h:95
#define WS_TABSTOP
Definition: pedump.c:634
int MSI_RecordGetInteger(MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:213
static LPWSTR msi_dialog_dup_property(msi_dialog *dialog, LPCWSTR property, BOOL indirect)
Definition: dialog.c:217
#define WS_VSCROLL
Definition: pedump.c:627
static HWND dialog
Definition: gui.c:33
static msi_control * msi_dialog_add_control(msi_dialog *dialog, MSIRECORD *rec, LPCWSTR szCls, DWORD style)
Definition: dialog.c:721
Arabic default style
Definition: afstyles.h:93
static void msi_dialog_update_directory_combo(msi_dialog *dialog, msi_control *control)
Definition: dialog.c:2847
#define WC_COMBOBOXW
Definition: commctrl.h:4717

◆ msi_dialog_directory_list()

static UINT msi_dialog_directory_list ( msi_dialog dialog,
MSIRECORD rec 
)
static

Definition at line 3079 of file dialog.c.

3080 {
3081  msi_control *control;
3082  LPCWSTR prop;
3083  DWORD style;
3084 
3088  control = msi_dialog_add_control( dialog, rec, WC_LISTVIEWW, style );
3089  if (!control)
3090  return ERROR_FUNCTION_FAILED;
3091 
3092  control->attributes = MSI_RecordGetInteger( rec, 8 );
3094  prop = MSI_RecordGetString( rec, 9 );
3095  control->property = msi_dialog_dup_property( dialog, prop, FALSE );
3096 
3097  /* double click to activate an item in the list */
3100 
3102 
3103  return ERROR_SUCCESS;
3104 }
#define WS_GROUP
Definition: pedump.c:633
#define ERROR_SUCCESS
Definition: deptool.c:10
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
DWORD attributes
Definition: dialog.c:76
msi_handler handler
Definition: dialog.c:63
static UINT msi_dialog_dirlist_handler(msi_dialog *dialog, msi_control *control, WPARAM param)
Definition: dialog.c:3014
#define WC_LISTVIEWW
Definition: commctrl.h:2257
#define WS_CHILD
Definition: pedump.c:617
#define LVS_SHAREIMAGELISTS
Definition: commctrl.h:2270
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
#define FALSE
Definition: types.h:117
#define LVS_SORTASCENDING
Definition: commctrl.h:2268
static void msi_dialog_update_directory_list(msi_dialog *dialog, msi_control *control)
Definition: dialog.c:2888
#define LVS_AUTOARRANGE
Definition: commctrl.h:2272
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:433
#define LVS_LIST
Definition: commctrl.h:2264
LPWSTR property
Definition: dialog.c:65
#define LVS_EX_TWOCLICKACTIVATE
Definition: commctrl.h:2736
#define LVS_SINGLESEL
Definition: commctrl.h:2266
unsigned long DWORD
Definition: ntddk_ex.h:95
#define LVM_SETEXTENDEDLISTVIEWSTYLE
Definition: commctrl.h:2724
#define WS_TABSTOP
Definition: pedump.c:634
int MSI_RecordGetInteger(MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:213
#define WS_BORDER
Definition: pedump.c:625
static LPWSTR msi_dialog_dup_property(msi_dialog *dialog, LPCWSTR property, BOOL indirect)
Definition: dialog.c:217
#define LVS_EDITLABELS
Definition: commctrl.h:2273
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WS_VSCROLL
Definition: pedump.c:627
static HWND dialog
Definition: gui.c:33
static msi_control * msi_dialog_add_control(msi_dialog *dialog, MSIRECORD *rec, LPCWSTR szCls, DWORD style)
Definition: dialog.c:721
Arabic default style
Definition: afstyles.h:93

◆ msi_dialog_directorylist_new()

static UINT msi_dialog_directorylist_new ( msi_dialog dialog)
static

Definition at line 2989 of file dialog.c.

2990 {
2991  msi_control *control;
2992  WCHAR *path;
2993  LVITEMW item;
2994  int index;
2995 
2996  control = msi_dialog_find_control_by_type( dialog, L"DirectoryList" );
2997 
2998  if (!(path = get_path_property( dialog, control ))) return ERROR_OUTOFMEMORY;
2999 
3000  item.mask = LVIF_TEXT;
3001  item.iItem = 0;
3002  item.iSubItem = 0;
3003  item.pszText = get_unique_folder_name( path, &item.cchTextMax );
3004 
3005  index = SendMessageW( control->hwnd, LVM_INSERTITEMW, 0, (LPARAM)&item );
3006  SendMessageW( control->hwnd, LVM_ENSUREVISIBLE, index, 0 );
3007  SendMessageW( control->hwnd, LVM_EDITLABELW, index, -1 );
3008 
3009  msi_free( path );
3010  msi_free( item.pszText );
3011  return ERROR_SUCCESS;
3012 }
static WCHAR * get_path_property(msi_dialog *dialog, msi_control *control)
Definition: dialog.c:2089
#define ERROR_SUCCESS
Definition: deptool.c:10
GLsizei const GLchar ** path
Definition: glext.h:7234
static void msi_free(void *mem)
Definition: msipriv.h:1159
#define LVIF_TEXT
Definition: commctrl.h:2309
#define L(x)
Definition: ntvdm.h:50
#define LVM_EDITLABELW
Definition: commctrl.h:2536
static WCHAR * get_unique_folder_name(const WCHAR *root, int *ret_len)
Definition: dialog.c:2961
LONG_PTR LPARAM
Definition: windef.h:208
GLuint index
Definition: glext.h:6031
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define index(s, c)
Definition: various.h:29
#define LVM_INSERTITEMW
Definition: commctrl.h:2404
static ATOM item
Definition: dde.c:856
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static HWND dialog
Definition: gui.c:33
#define LVM_ENSUREVISIBLE
Definition: commctrl.h:2518
static msi_control * msi_dialog_find_control_by_type(msi_dialog *dialog, LPCWSTR type)
Definition: dialog.c:181
#define ERROR_OUTOFMEMORY
Definition: deptool.c:13

Referenced by event_directory_list_new().

◆ msi_dialog_directorylist_up()

static UINT msi_dialog_directorylist_up ( msi_dialog dialog)
static

Definition at line 2933 of file dialog.c.

2934 {
2935  msi_control *control;
2936  LPWSTR prop, path, ptr;
2937  BOOL indirect;
2938 
2939  control = msi_dialog_find_control_by_type( dialog, L"DirectoryList" );
2941  prop = msi_dialog_dup_property( dialog, control->property, indirect );
2943 
2944  /* strip off the last directory */
2945  ptr = PathFindFileNameW( path );
2946  if (ptr != path) *(ptr - 1) = '\0';
2948 
2949  msi_dialog_set_property( dialog->package, prop, path );
2950