ReactOS  0.4.13-dev-455-g28ed234
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 "wine/unicode.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  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
 
#define NUM_CONTROL_TYPES   (sizeof msi_dialog_handler/sizeof msi_dialog_handler[0])
 

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 MSIRECORDmsi_get_binary_record (MSIDATABASE *db, LPCWSTR name)
 
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 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 HBITMAP msi_load_picture (MSIDATABASE *db, LPCWSTR name, INT cx, INT cy, DWORD flags)
 
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 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 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_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, LPCWSTR szControlName, LPCWSTR szBillboard)
 
UINT WINAPI MsiPreviewBillboardA (MSIHANDLE hPreview, LPCSTR szControlName, LPCSTR 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_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 const WCHAR szMsiDialogClass [] = { 'M','s','i','D','i','a','l','o','g','C','l','o','s','e','C','l','a','s','s',0 }
 
static const WCHAR szMsiHiddenWindow [] = { 'M','s','i','H','i','d','d','e','n','W','i','n','d','o','w',0 }
 
static const WCHAR szStatic [] = { 'S','t','a','t','i','c',0 }
 
static const WCHAR szButton [] = { 'B','U','T','T','O','N', 0 }
 
static const WCHAR szButtonData [] = { 'M','S','I','D','A','T','A',0 }
 
static const WCHAR szProgress [] = { 'P','r','o','g','r','e','s','s',0 }
 
static const WCHAR szText [] = { 'T','e','x','t',0 }
 
static const WCHAR szPushButton [] = { 'P','u','s','h','B','u','t','t','o','n',0 }
 
static const WCHAR szLine [] = { 'L','i','n','e',0 }
 
static const WCHAR szBitmap [] = { 'B','i','t','m','a','p',0 }
 
static const WCHAR szCheckBox [] = { 'C','h','e','c','k','B','o','x',0 }
 
static const WCHAR szScrollableText [] = { 'S','c','r','o','l','l','a','b','l','e','T','e','x','t',0 }
 
static const WCHAR szComboBox [] = { 'C','o','m','b','o','B','o','x',0 }
 
static const WCHAR szEdit [] = { 'E','d','i','t',0 }
 
static const WCHAR szMaskedEdit [] = { 'M','a','s','k','e','d','E','d','i','t',0 }
 
static const WCHAR szPathEdit [] = { 'P','a','t','h','E','d','i','t',0 }
 
static const WCHAR szProgressBar [] = { 'P','r','o','g','r','e','s','s','B','a','r',0 }
 
static const WCHAR szSetProgress [] = { 'S','e','t','P','r','o','g','r','e','s','s',0 }
 
static const WCHAR szRadioButtonGroup [] = { 'R','a','d','i','o','B','u','t','t','o','n','G','r','o','u','p',0 }
 
static const WCHAR szIcon [] = { 'I','c','o','n',0 }
 
static const WCHAR szSelectionTree [] = { 'S','e','l','e','c','t','i','o','n','T','r','e','e',0 }
 
static const WCHAR szGroupBox [] = { 'G','r','o','u','p','B','o','x',0 }
 
static const WCHAR szListBox [] = { 'L','i','s','t','B','o','x',0 }
 
static const WCHAR szDirectoryCombo [] = { 'D','i','r','e','c','t','o','r','y','C','o','m','b','o',0 }
 
static const WCHAR szDirectoryList [] = { 'D','i','r','e','c','t','o','r','y','L','i','s','t',0 }
 
static const WCHAR szVolumeCostList [] = { 'V','o','l','u','m','e','C','o','s','t','L','i','s','t',0 }
 
static const WCHAR szVolumeSelectCombo [] = { 'V','o','l','u','m','e','S','e','l','e','c','t','C','o','m','b','o',0 }
 
static const WCHAR szSelectionDescription [] = {'S','e','l','e','c','t','i','o','n','D','e','s','c','r','i','p','t','i','o','n',0}
 
static const WCHAR szSelectionPath [] = {'S','e','l','e','c','t','i','o','n','P','a','t','h',0}
 
static const WCHAR szHyperLink [] = {'H','y','p','e','r','L','i','n','k',0}
 
static DWORD uiThreadId
 
static HWND hMsiHiddenWindow
 
static const WCHAR column_keys [][80]
 
static const struct control_handler msi_dialog_handler []
 
static const WCHAR end_dialogW [] = {'E','n','d','D','i','a','l','o','g',0}
 
static const WCHAR new_dialogW [] = {'N','e','w','D','i','a','l','o','g',0}
 
static const WCHAR spawn_dialogW [] = {'S','p','a','w','n','D','i','a','l','o','g',0}
 
static const WCHAR spawn_wait_dialogW [] = {'S','p','a','w','n','W','a','i','t','D','i','a','l','o','g',0}
 
static const WCHAR do_actionW [] = {'D','o','A','c','t','i','o','n',0}
 
static const WCHAR add_localW [] = {'A','d','d','L','o','c','a','l',0}
 
static const WCHAR removeW [] = {'R','e','m','o','v','e',0}
 
static const WCHAR add_sourceW [] = {'A','d','d','S','o','u','r','c','e',0}
 
static const WCHAR set_target_pathW [] = {'S','e','t','T','a','r','g','e','t','P','a','t','h',0}
 
static const WCHAR resetW [] = {'R','e','s','e','t',0}
 
static const WCHAR set_install_levelW [] = {'S','e','t','I','n','s','t','a','l','l','L','e','v','e','l',0}
 
static const WCHAR directory_list_upW [] = {'D','i','r','e','c','t','o','r','y','L','i','s','t','U','p',0}
 
static const WCHAR selection_browseW [] = {'S','e','l','e','c','t','i','o','n','B','r','o','w','s','e',0}
 
static const WCHAR reinstall_modeW [] = {'R','e','i','n','s','t','a','l','l','M','o','d','e',0}
 
static const WCHAR reinstallW [] = {'R','e','i','n','s','t','a','l','l',0}
 
static const WCHAR validate_product_idW [] = {'V','a','l','i','d','a','t','e','P','r','o','d','u','c','t','I','D',0}
 
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 1783 of file dialog.c.

◆ MAX_NUM_DIGITS

#define MAX_NUM_DIGITS   11

Definition at line 1740 of file dialog.c.

◆ NONAMELESSUNION

#define NONAMELESSUNION

Definition at line 23 of file dialog.c.

◆ NUM_CONTROL_TYPES

Definition at line 3475 of file dialog.c.

◆ USER_INSTALLSTATE_ALL

#define USER_INSTALLSTATE_ALL   0x1000

Definition at line 169 of file dialog.c.

◆ WM_MSI_DIALOG_CREATE

#define WM_MSI_DIALOG_CREATE   (WM_USER+0x100)

Definition at line 166 of file dialog.c.

◆ WM_MSI_DIALOG_DESTROY

#define WM_MSI_DIALOG_DESTROY   (WM_USER+0x101)

Definition at line 167 of file dialog.c.

Typedef Documentation

◆ control_event_handler

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

Definition at line 57 of file dialog.c.

◆ event_handler

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

Definition at line 58 of file dialog.c.

◆ msi_control

Definition at line 54 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 55 of file dialog.c.

◆ msi_update

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

Definition at line 56 of file dialog.c.

Function Documentation

◆ ACTION_DialogBox()

INT ACTION_DialogBox ( MSIPACKAGE package,
const WCHAR dialog 
)

Definition at line 4494 of file dialog.c.

4495 {
4496  INT r;
4497 
4498  if (package->next_dialog) ERR("Already got next dialog... ignoring it\n");
4499  package->next_dialog = NULL;
4500 
4501  /* Dialogs are chained through NewDialog, which sets the next_dialog member.
4502  * We fall out of the loop if we reach a modeless dialog, which immediately
4503  * returns IDOK, or an EndDialog event, which returns the value corresponding
4504  * to its argument.
4505  */
4506  r = event_do_dialog( package, dialog, NULL, TRUE );
4507  while (package->next_dialog)
4508  {
4509  WCHAR *name = package->next_dialog;
4510 
4511  package->next_dialog = NULL;
4512  r = event_do_dialog( package, name, NULL, TRUE );
4513  msi_free( name );
4514  }
4515  return r;
4516 }
#define TRUE
Definition: types.h:120
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
int32_t INT
Definition: typedefs.h:56
LPWSTR next_dialog
Definition: msipriv.h:432
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define ERR(fmt,...)
Definition: debug.h:109
static INT event_do_dialog(MSIPACKAGE *package, const WCHAR *name, msi_dialog *parent, BOOL destroy_modeless)
Definition: dialog.c:4256
static HWND dialog
Definition: gui.c:33
static BOOL msi_free(void *mem)
Definition: msipriv.h:1227
Definition: name.c:36

Referenced by internal_ui_handler().

◆ ACTION_ShowDialog()

INT ACTION_ShowDialog ( MSIPACKAGE package,
const WCHAR dialog 
)

Definition at line 4465 of file dialog.c.

4466 {
4467  static const WCHAR szDialog[] = {'D','i','a','l','o','g',0};
4468  MSIRECORD *row;
4469  INT rc;
4470 
4471  if (!TABLE_Exists(package->db, szDialog)) return 0;
4472 
4473  row = MSI_CreateRecord(0);
4474  if (!row) return -1;
4477  msiobj_release(&row->hdr);
4478 
4479  if (rc == -2) rc = 0;
4480 
4481  if (!rc)
4482  {
4484  if (!row) return -1;
4485  MSI_RecordSetInteger(row, 1, 2726);
4488 
4489  msiobj_release(&row->hdr);
4490  }
4491  return rc;
4492 }
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
Definition: record.c:649
int32_t INT
Definition: typedefs.h:56
BOOL TABLE_Exists(MSIDATABASE *db, LPCWSTR name) DECLSPEC_HIDDEN
Definition: table.c:971
UINT MSI_RecordSetInteger(MSIRECORD *, UINT, int) DECLSPEC_HIDDEN
Definition: record.c:328
INT MSI_ProcessMessage(MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
Definition: package.c:1946
__wchar_t WCHAR
Definition: xmlstorage.h:180
MSIDATABASE * db
Definition: msipriv.h:386
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:242
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
Definition: record.c:79
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 3926 of file dialog.c.

3928 {
3929  static const WCHAR szDialogCreated[] =
3930  {'D','i','a','l','o','g',' ','c','r','e','a','t','e','d',0};
3931  MSIRECORD *rec = NULL;
3932  msi_dialog *dialog;
3933 
3934  TRACE("%s\n", debugstr_w(name));
3935 
3937 
3938  /* allocate the structure for the dialog to use */
3940  if( !dialog )
3941  return NULL;
3942  strcpyW( dialog->name, name );
3943  dialog->parent = parent;
3944  dialog->package = package;
3945  dialog->event_handler = event_handler;
3946  dialog->finished = 0;
3947  list_init( &dialog->controls );
3948  list_init( &dialog->fonts );
3949 
3950  /* verify that the dialog exists */
3951  rec = msi_get_dialog_record( dialog );
3952  if( !rec )
3953  {
3954  msi_free( dialog );
3955  return NULL;
3956  }
3957  dialog->attributes = MSI_RecordGetInteger( rec, 6 );
3958  dialog->control_default = strdupW( MSI_RecordGetString( rec, 9 ) );
3959  dialog->control_cancel = strdupW( MSI_RecordGetString( rec, 10 ) );
3960  msiobj_release( &rec->hdr );
3961 
3962  rec = MSI_CreateRecord(2);
3963  if (!rec) return NULL;
3964  MSI_RecordSetStringW(rec, 1, name);
3965  MSI_RecordSetStringW(rec, 2, szDialogCreated);
3967  msiobj_release(&rec->hdr);
3968 
3969  return dialog;
3970 }
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
Definition: record.c:649
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
static MSIRECORD * msi_get_dialog_record(msi_dialog *dialog)
Definition: dialog.c:3561
static WCHAR * strdupW(const WCHAR *src)
Definition: main.c:92
MSIOBJECTHDR hdr
Definition: msipriv.h:141
static void * msi_alloc_zero(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1210
static BOOL dialog_register_class(void)
Definition: dialog.c:3894
UINT(* event_handler)(msi_dialog *, const WCHAR *)
Definition: dialog.c:58
#define debugstr_w
Definition: kernel32.h:32
INT MSI_ProcessMessage(MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
Definition: package.c:1946
smooth NULL
Definition: ftsmooth.c:416
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:482
#define TRACE(s)
Definition: solgame.cpp:4
r parent
Definition: btrfs.c:2708
__wchar_t WCHAR
Definition: xmlstorage.h:180
static HWND hMsiHiddenWindow
Definition: dialog.c:172
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:242
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
Definition: record.c:79
int MSI_RecordGetInteger(MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:245
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
static HWND dialog
Definition: gui.c:33
static BOOL msi_free(void *mem)
Definition: msipriv.h:1227
Definition: name.c:36
__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 412 of file dialog.c.

415 {
416  DWORD x, y, width, height;
417  LPWSTR font = NULL, title_font = NULL;
418  LPCWSTR title = NULL;
419  msi_control *control;
420 
421  style |= WS_CHILD;
422 
423  control = msi_alloc( FIELD_OFFSET( msi_control, name[strlenW( name ) + 1] ));
424  if (!control)
425  return NULL;
426 
427  strcpyW( control->name, name );
428  list_add_tail( &dialog->controls, &control->entry );
429  control->handler = NULL;
430  control->update = NULL;
431  control->property = NULL;
432  control->value = NULL;
433  control->hBitmap = NULL;
434  control->hIcon = NULL;
435  control->hDll = NULL;
436  control->tabnext = strdupW( MSI_RecordGetString( rec, 11) );
437  control->type = strdupW( MSI_RecordGetString( rec, 3 ) );
438  control->progress_current = 0;
439  control->progress_max = 100;
440  control->progress_backwards = FALSE;
441 
442  x = MSI_RecordGetInteger( rec, 4 );
443  y = MSI_RecordGetInteger( rec, 5 );
444  width = MSI_RecordGetInteger( rec, 6 );
445  height = MSI_RecordGetInteger( rec, 7 );
446 
451 
452  if( text )
453  {
454  deformat_string( dialog->package, text, &title_font );
455  font = msi_dialog_get_style( title_font, &title );
456  }
457 
458  control->hwnd = CreateWindowExW( exstyle, szCls, title, style,
459  x, y, width, height, parent, NULL, NULL, NULL );
460 
461  TRACE("Dialog %s control %s hwnd %p\n",
462  debugstr_w(dialog->name), debugstr_w(text), control->hwnd );
463 
464  msi_dialog_set_font( dialog, control->hwnd,
465  font ? font : dialog->default_font );
466 
467  msi_free( title_font );
468  msi_free( font );
469 
470  return control;
471 }
GLint GLint GLsizei width
Definition: gl.h:1546
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
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:1827
HICON hIcon
Definition: dialog.c:69
msi_handler handler
Definition: dialog.c:64
static INT msi_dialog_scale_unit(msi_dialog *dialog, INT val)
Definition: dialog.c:193
WCHAR name[1]
Definition: dialog.c:77
HMODULE hDll
Definition: dialog.c:72
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define WS_CHILD
Definition: pedump.c:617
msi_update update
Definition: dialog.c:65
static LPWSTR msi_dialog_get_style(LPCWSTR p, LPCWSTR *rest)
Definition: dialog.c:270
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:364
#define debugstr_w
Definition: kernel32.h:32
smooth NULL
Definition: ftsmooth.c:416
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:482
LPWSTR property
Definition: dialog.c:66
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:2708
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:67
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:62
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:245
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
static HWND dialog
Definition: gui.c:33
static BOOL msi_free(void *mem)
Definition: msipriv.h:1227
Definition: name.c:36
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1204
WCHAR * LPWSTR
Definition: xmlstorage.h:184
Arabic default style
Definition: afstyles.h:93
HBITMAP hBitmap
Definition: dialog.c:68
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 4017 of file dialog.c.

4018 {
4019  TRACE("\n");
4020  dialog->attributes |= msidbDialogAttributesVisible;
4021  dialog->attributes &= ~msidbDialogAttributesModal;
4023 }
#define TRACE(s)
Definition: solgame.cpp:4
static UINT dialog_run_message_loop(msi_dialog *dialog)
Definition: dialog.c:3834
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 4584 of file dialog.c.

4585 {
4586  unsigned int i;
4587 
4588  TRACE("handling event %s\n", debugstr_w(event));
4589 
4590  if (!event) return ERROR_SUCCESS;
4591 
4592  for (i = 0; control_events[i].event; i++)
4593  {
4594  if (!strcmpW( control_events[i].event, event ))
4595  return control_events[i].handler( dialog, argument );
4596  }
4597  FIXME("unhandled event %s arg(%s)\n", debugstr_w(event), debugstr_w(argument));
4598  return ERROR_SUCCESS;
4599 }
#define ERROR_SUCCESS
Definition: deptool.c:10
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 debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
#define TRACE(s)
Definition: solgame.cpp:4
struct _cl_event * event
Definition: glext.h:7739
static const struct control_event control_events[]
Definition: dialog.c:4563
static HWND dialog
Definition: gui.c:33
WINE_UNICODE_INLINE int strcmpW(const WCHAR *str1, const WCHAR *str2)
Definition: unicode.h:229

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 609 of file dialog.c.

611 {
612  msi_control* ctrl;
613 
614  ctrl = msi_dialog_find_control( dialog, control );
615  if (!ctrl)
616  return;
617  if( !strcmpW( attribute, szText ) )
618  {
619  const WCHAR *font_text, *text = NULL;
620  WCHAR *font, *text_fmt = NULL;
621 
622  font_text = MSI_RecordGetString( rec , 1 );
623  font = msi_dialog_get_style( font_text, &text );
624  deformat_string( dialog->package, text, &text_fmt );
625  if (text_fmt) text = text_fmt;
626  else text = szEmpty;
627 
628  SetWindowTextW( ctrl->hwnd, text );
629 
630  msi_free( font );
631  msi_free( text_fmt );
633  }
634  else if( !strcmpW( attribute, szProgress ) )
635  {
636  DWORD func, val1, val2, units;
637 
638  func = MSI_RecordGetInteger( rec, 1 );
639  val1 = MSI_RecordGetInteger( rec, 2 );
640  val2 = MSI_RecordGetInteger( rec, 3 );
641 
642  TRACE("progress: func %u val1 %u val2 %u\n", func, val1, val2);
643 
644  units = val1 / 512;
645  switch (func)
646  {
647  case 0: /* init */
648  SendMessageW( ctrl->hwnd, PBM_SETRANGE, 0, MAKELPARAM(0,100) );
649  if (val2)
650  {
651  ctrl->progress_max = units ? units : 100;
652  ctrl->progress_current = units;
653  ctrl->progress_backwards = TRUE;
654  SendMessageW( ctrl->hwnd, PBM_SETPOS, 100, 0 );
655  }
656  else
657  {
658  ctrl->progress_max = units ? units : 100;
659  ctrl->progress_current = 0;
660  ctrl->progress_backwards = FALSE;
661  SendMessageW( ctrl->hwnd, PBM_SETPOS, 0, 0 );
662  }
663  break;
664  case 1: /* action data increment */
665  if (val2) dialog->package->action_progress_increment = val1;
666  else dialog->package->action_progress_increment = 0;
667  break;
668  case 2: /* move */
669  if (ctrl->progress_backwards)
670  {
671  if (units >= ctrl->progress_current) ctrl->progress_current -= units;
672  else ctrl->progress_current = 0;
673  }
674  else
675  {
676  if (ctrl->progress_current + units < ctrl->progress_max) ctrl->progress_current += units;
677  else ctrl->progress_current = ctrl->progress_max;
678  }
679  SendMessageW( ctrl->hwnd, PBM_SETPOS, MulDiv(100, ctrl->progress_current, ctrl->progress_max), 0 );
680  break;
681  case 3: /* add */
682  ctrl->progress_max += units;
683  break;
684  default:
685  FIXME("Unknown progress message %u\n", func);
686  break;
687  }
688  }
689  else if ( !strcmpW( attribute, szProperty ) )
690  {
692  if (feature) msi_dialog_set_property( dialog->package, ctrl->property, feature->Directory );
693  }
694  else if ( !strcmpW( attribute, szSelectionPath ) )
695  {
698  if (!path) return;
699  SetWindowTextW( ctrl->hwnd, path );
700  msi_free(path);
701  }
702  else
703  {
704  FIXME("Attribute %s not being set\n", debugstr_w(attribute));
705  return;
706  }
707 }
GLenum func
Definition: glext.h:6028
INTERNETFEATURELIST feature
Definition: misc.c:1689
#define TRUE
Definition: types.h:120
Definition: mk_font.cpp:20
const WCHAR * text
Definition: package.c:1827
#define MAKELPARAM(l, h)
Definition: winuser.h:3915
#define PBM_SETPOS
Definition: commctrl.h:2156
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
static LPWSTR msi_dialog_get_style(LPCWSTR p, LPCWSTR *rest)
Definition: dialog.c:270
#define PBM_SETRANGE
Definition: commctrl.h:2155
static const WCHAR szText[]
Definition: dialog.c:139
unsigned int BOOL
Definition: ntddk_ex.h:94
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
static msi_control * msi_dialog_find_control(msi_dialog *dialog, LPCWSTR name)
Definition: dialog.c:198
static const WCHAR szProgress[]
Definition: dialog.c:138
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:482
#define ctrl
Definition: input.c:1669
static const WCHAR szEmpty[]
Definition: provider.c:47
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:603
unsigned long DWORD
Definition: ntddk_ex.h:95
int MSI_RecordGetInteger(MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:245
static LPWSTR msi_dialog_dup_property(msi_dialog *dialog, LPCWSTR property, BOOL indirect)
Definition: dialog.c:248
static const WCHAR szSelectionPath[]
Definition: dialog.c:161
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static const WCHAR szProperty[]
Definition: msipriv.h:1198
Definition: services.c:325
static HWND dialog
Definition: gui.c:33
static BOOL msi_free(void *mem)
Definition: msipriv.h:1227
WINE_UNICODE_INLINE int strcmpW(const WCHAR *str1, const WCHAR *str2)
Definition: unicode.h:229
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:576
#define MulDiv(x, y, z)
Definition: gdifloat.h:86
void msi_dialog_check_messages(HANDLE handle)
Definition: dialog.c:3979

Referenced by msi_event_fire().

◆ dialog_map_events()

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

Definition at line 751 of file dialog.c.

752 {
753  static const WCHAR queryW[] =
754  {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
755  '`','E','v','e','n','t','M','a','p','p','i','n','g','`',' ',
756  'W','H','E','R','E',' ','`','D','i','a','l','o','g','_','`',' ','=',' ','\'','%','s','\'',' ',
757  'A','N','D',' ','`','C','o','n','t','r','o','l','_','`',' ','=',' ','\'','%','s','\'',0};
758  MSIQUERY *view;
760  {
761  dialog,
762  control
763  };
764 
765  if (!MSI_OpenQuery( dialog->package->db, &view, queryW, dialog->name, control ))
766  {
768  msiobj_release( &view->hdr );
769  }
770 }
UINT MSI_OpenQuery(MSIDATABASE *, MSIQUERY **, LPCWSTR,...) DECLSPEC_HIDDEN
Definition: msiquery.c:143
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:242
const WCHAR * control
Definition: dialog.c:738
static UINT map_event(MSIRECORD *row, void *param)
Definition: dialog.c:741
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:168

Referenced by msi_dialog_add_control(), and msi_dialog_line_control().

◆ dialog_register_class()

static BOOL dialog_register_class ( void  )
static

Definition at line 3894 of file dialog.c.

3895 {
3896  WNDCLASSW cls;
3897 
3898  ZeroMemory( &cls, sizeof cls );
3900  cls.hInstance = NULL;
3902  cls.hCursor = LoadCursorW(0, (LPWSTR)IDC_ARROW);
3903  cls.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1);
3904  cls.lpszMenuName = NULL;
3906 
3907  if( !RegisterClassW( &cls ) )
3908  return FALSE;
3909 
3912 
3913  if( !RegisterClassW( &cls ) )
3914  return FALSE;
3915 
3917 
3919  0, 0, 100, 100, NULL, NULL, NULL, NULL );
3920  if( !hMsiHiddenWindow )
3921  return FALSE;
3922 
3923  return TRUE;
3924 }
#define TRUE
Definition: types.h:120
LPCWSTR lpszMenuName
Definition: winuser.h:3137
static DWORD uiThreadId
Definition: dialog.c:171
#define ZeroMemory
Definition: winbase.h:1635
#define IDI_APPLICATION
Definition: winuser.h:699
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4185
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
#define COLOR_3DFACE
Definition: winuser.h:919
static const WCHAR szMsiHiddenWindow[]
Definition: dialog.c:134
WNDPROC lpfnWndProc
Definition: winuser.h:3130
smooth NULL
Definition: ftsmooth.c:416
LPCWSTR lpszClassName
Definition: winuser.h:3138
DWORD WINAPI GetCurrentThreadId(VOID)
Definition: thread.c:420
#define WS_OVERLAPPED
Definition: pedump.c:615
static LRESULT WINAPI MSIHiddenWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: dialog.c:3876
HICON hIcon
Definition: winuser.h:3134
static HWND hMsiHiddenWindow
Definition: dialog.c:172
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2074
HCURSOR hCursor
Definition: winuser.h:3135
static const WCHAR szMsiDialogClass[]
Definition: dialog.c:133
HBRUSH hbrBackground
Definition: winuser.h:3136
HINSTANCE hInstance
Definition: winuser.h:3133
#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:3774

Referenced by dialog_create().

◆ dialog_run_message_loop()

static UINT dialog_run_message_loop ( msi_dialog dialog)
static

Definition at line 3834 of file dialog.c.

3835 {
3836  DWORD style;
3837  HWND hwnd;
3838 
3839  if( uiThreadId != GetCurrentThreadId() )
3841 
3842  /* create the dialog window, don't show it yet */
3844  if( dialog->attributes & msidbDialogAttributesVisible )
3845  style |= WS_VISIBLE;
3846 
3847  if (dialog->parent == NULL && (dialog->attributes & msidbDialogAttributesMinimize))
3848  style |= WS_MINIMIZEBOX;
3849 
3852  NULL, NULL, NULL, dialog );
3853  if( !hwnd )
3854  {
3855  ERR("Failed to create dialog %s\n", debugstr_w( dialog->name ));
3856  return ERROR_FUNCTION_FAILED;
3857  }
3858 
3859  ShowWindow( hwnd, SW_SHOW );
3860  /* UpdateWindow( hwnd ); - and causes the transparent static controls not to paint */
3861 
3862  if( dialog->attributes & msidbDialogAttributesModal )
3863  {
3864  while( !dialog->finished )
3865  {
3868  }
3869  }
3870  else
3871  return ERROR_IO_PENDING;
3872 
3873  return ERROR_SUCCESS;
3874 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define ERROR_SUCCESS
Definition: deptool.c:10
static DWORD uiThreadId
Definition: dialog.c:171
#define WM_MSI_DIALOG_CREATE
Definition: dialog.c:166
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:4185
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
#define debugstr_w
Definition: kernel32.h:32
#define CW_USEDEFAULT
Definition: winuser.h:225
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define SW_SHOW
Definition: winuser.h:769
DWORD WINAPI GetCurrentThreadId(VOID)
Definition: thread.c:420
#define WS_OVERLAPPED
Definition: pedump.c:615
unsigned long DWORD
Definition: ntddk_ex.h:95
static HWND hMsiHiddenWindow
Definition: dialog.c:172
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:109
static HWND hwnd[MAXHWNDS]
Definition: dialog.c:47
static void process_pending_messages(HWND hdlg)
Definition: dialog.c:3822
#define WS_MINIMIZEBOX
Definition: pedump.c:631
static const WCHAR szMsiDialogClass[]
Definition: dialog.c:133
#define QS_ALLINPUT
Definition: winuser.h:874
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static HWND dialog
Definition: gui.c:33
#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 3764 of file dialog.c.

3765 {
3766  HWND hwnd = dialog->hWndFocus;
3767 
3768  hwnd = GetNextDlgTabItem( dialog->hwnd, hwnd, TRUE);
3769  hwnd = GetNextDlgTabItem( dialog->hwnd, hwnd, FALSE);
3770  SetFocus( hwnd );
3771  dialog->hWndFocus = hwnd;
3772 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
HWND WINAPI GetNextDlgTabItem(HWND hDlg, HWND hCtl, BOOL bPrevious)
Definition: dialog.c:2330
#define TRUE
Definition: types.h:120
HWND WINAPI SetFocus(_In_opt_ HWND)
static HWND hwnd[MAXHWNDS]
Definition: dialog.c:47
static HWND dialog
Definition: gui.c:33

Referenced by MSIDialog_WndProc().

◆ event_add_local()

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

Definition at line 4380 of file dialog.c.

4381 {
4383 
4384  LIST_FOR_EACH_ENTRY( feature, &dialog->package->features, MSIFEATURE, entry )
4385  {
4386  if (!strcmpW( argument, feature->Feature ) || !strcmpW( argument, szAll ))
4387  {
4388  if (feature->ActionRequest != INSTALLSTATE_LOCAL)
4389  msi_set_property( dialog->package->db, szPreselected, szOne, -1 );
4390  MSI_SetFeatureStateW( dialog->package, feature->Feature, INSTALLSTATE_LOCAL );
4391  }
4392  }
4393  return ERROR_SUCCESS;
4394 }
static const WCHAR szPreselected[]
Definition: msipriv.h:1116
INTERNETFEATURELIST feature
Definition: misc.c:1689
static const WCHAR szAll[]
Definition: msipriv.h:1107
#define ERROR_SUCCESS
Definition: deptool.c:10
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
UINT MSI_SetFeatureStateW(MSIPACKAGE *package, LPCWSTR szFeature, INSTALLSTATE iState)
Definition: install.c:940
uint32_t entry
Definition: isohybrid.c:63
static const WCHAR szOne[]
Definition: msipriv.h:1108
UINT msi_set_property(MSIDATABASE *, const WCHAR *, const WCHAR *, int) DECLSPEC_HIDDEN
Definition: package.c:2149
static HWND dialog
Definition: gui.c:33
WINE_UNICODE_INLINE int strcmpW(const WCHAR *str1, const WCHAR *str2)
Definition: unicode.h:229

◆ event_add_source()

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

Definition at line 4412 of file dialog.c.

4413 {
4415 
4416  LIST_FOR_EACH_ENTRY( feature, &dialog->package->features, MSIFEATURE, entry )
4417  {
4418  if (!strcmpW( argument, feature->Feature ) || !strcmpW( argument, szAll ))
4419  {
4420  if (feature->ActionRequest != INSTALLSTATE_SOURCE)
4421  msi_set_property( dialog->package->db, szPreselected, szOne, -1 );
4422  MSI_SetFeatureStateW( dialog->package, feature->Feature, INSTALLSTATE_SOURCE );
4423  }
4424  }
4425  return ERROR_SUCCESS;
4426 }
static const WCHAR szPreselected[]
Definition: msipriv.h:1116
INTERNETFEATURELIST feature
Definition: misc.c:1689
static const WCHAR szAll[]
Definition: msipriv.h:1107
#define ERROR_SUCCESS
Definition: deptool.c:10
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
UINT MSI_SetFeatureStateW(MSIPACKAGE *package, LPCWSTR szFeature, INSTALLSTATE iState)
Definition: install.c:940
uint32_t entry
Definition: isohybrid.c:63
static const WCHAR szOne[]
Definition: msipriv.h:1108
UINT msi_set_property(MSIDATABASE *, const WCHAR *, const WCHAR *, int) DECLSPEC_HIDDEN
Definition: package.c:2149
static HWND dialog
Definition: gui.c:33
WINE_UNICODE_INLINE int strcmpW(const WCHAR *str1, const WCHAR *str2)
Definition: unicode.h:229

◆ event_cleanup_subscriptions()

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

Definition at line 4033 of file dialog.c.

4034 {
4035  struct list *item, *next;
4036 
4037  LIST_FOR_EACH_SAFE( item, next, &package->subscriptions )
4038  {
4039  struct subscriber *sub = LIST_ENTRY( item, struct subscriber, entry );
4040 
4041  if (strcmpW( sub->dialog->name, dialog )) continue;
4042  list_remove( &sub->entry );
4043  free_subscriber( sub );
4044  }
4045 }
#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
struct list subscriptions
Definition: msipriv.h:439
static unsigned __int64 next
Definition: rand_nt.c:6
static ATOM item
Definition: dde.c:856
static HWND dialog
Definition: gui.c:33
WINE_UNICODE_INLINE int strcmpW(const WCHAR *str1, const WCHAR *str2)
Definition: unicode.h:229
#define LIST_ENTRY(type)
Definition: queue.h:175
static void free_subscriber(struct subscriber *sub)
Definition: dialog.c:4025
WCHAR name[1]
Definition: dialog.c:107

Referenced by event_end_dialog(), and msi_dialog_destroy().

◆ event_directory_list_up()

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

Definition at line 4526 of file dialog.c.

4527 {
4529 }
static UINT msi_dialog_directorylist_up(msi_dialog *dialog)
Definition: dialog.c:3018
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 4374 of file dialog.c.

4375 {
4376  ACTION_PerformAction( dialog->package, argument, SCRIPT_NONE );
4377  return ERROR_SUCCESS;
4378 }
#define ERROR_SUCCESS
Definition: deptool.c:10
UINT ACTION_PerformAction(MSIPACKAGE *package, const WCHAR *action, UINT script)
Definition: action.c:7913
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 4256 of file dialog.c.

4257 {
4258  msi_dialog *dialog;
4259  UINT r;
4260  INT retval;
4261 
4262  /* create a new dialog */
4264  if (dialog)
4265  {
4266  /* kill the current modeless dialog */
4267  if (destroy_modeless && package->dialog)
4268  {
4269  msi_dialog_destroy( package->dialog );
4270  package->dialog = NULL;
4271  }
4272 
4273  /* modeless dialogs return an error message */
4275  if (r == ERROR_SUCCESS)
4276  {
4277  retval = dialog->retval;
4279  return retval;
4280  }
4281  else
4282  {
4283  package->dialog = dialog;
4284  return IDOK;
4285  }
4286  }
4287  else return 0;
4288 }
#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:3926
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
msi_dialog * dialog
Definition: msipriv.h:431
void msi_dialog_destroy(msi_dialog *dialog)
Definition: dialog.c:4047
int32_t INT
Definition: typedefs.h:56
smooth NULL
Definition: ftsmooth.c:416
r parent
Definition: btrfs.c:2708
static UINT dialog_event_handler(msi_dialog *, const WCHAR *, const WCHAR *)
Definition: dialog.c:4584
unsigned int UINT
Definition: ndis.h:50
static UINT dialog_run_message_loop(msi_dialog *dialog)
Definition: dialog.c:3834
static HWND dialog
Definition: gui.c:33
Definition: name.c:36

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 4291 of file dialog.c.

4292 {
4293  static const WCHAR exitW[] = {'E','x','i','t',0};
4294  static const WCHAR retryW[] = {'R','e','t','r','y',0};
4295  static const WCHAR ignoreW[] = {'I','g','n','o','r','e',0};
4296  static const WCHAR returnW[] = {'R','e','t','u','r','n',0};
4297 
4298  if (!strcmpW( argument, exitW ))
4299  dialog->retval = IDCANCEL;
4300  else if (!strcmpW( argument, retryW ))
4301  dialog->retval = IDRETRY;
4302  else if (!strcmpW( argument, ignoreW ))
4303  dialog->retval = IDOK;
4304  else if (!strcmpW( argument, returnW ))
4305  dialog->retval = 0;
4306  else
4307  {
4308  ERR("Unknown argument string %s\n", debugstr_w(argument));
4309  dialog->retval = IDABORT;
4310  }
4311  event_cleanup_subscriptions( dialog->package, dialog->name );
4313  return ERROR_SUCCESS;
4314 }
#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:4033
#define debugstr_w
Definition: kernel32.h:32
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define IDRETRY
Definition: winuser.h:827
static const WCHAR exitW[]
Definition: lex.c:50
#define ERR(fmt,...)
Definition: debug.h:109
static HWND dialog
Definition: gui.c:33
static const WCHAR returnW[]
Definition: lex.c:61
WINE_UNICODE_INLINE int strcmpW(const WCHAR *str1, const WCHAR *str2)
Definition: unicode.h:229
static void msi_dialog_end_dialog(msi_dialog *dialog)
Definition: dialog.c:3972
#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 4325 of file dialog.c.

4326 {
4327  /* store the name of the next dialog, and signal this one to end */
4328  dialog->package->next_dialog = strdupW( argument );
4331  return ERROR_SUCCESS;
4332 }
#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:4100
static HWND dialog
Definition: gui.c:33
static void msi_dialog_end_dialog(msi_dialog *dialog)
Definition: dialog.c:3972

Referenced by pending_event_new_dialog().

◆ event_reinstall()

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

Definition at line 4536 of file dialog.c.

4537 {
4538  return msi_set_property( dialog->package->db, szReinstall, argument, -1 );
4539 }
static const WCHAR szReinstall[]
Definition: msipriv.h:1123
UINT msi_set_property(MSIDATABASE *, const WCHAR *, const WCHAR *, int) DECLSPEC_HIDDEN
Definition: package.c:2149
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 4531 of file dialog.c.

4532 {
4533  return msi_set_property( dialog->package->db, szReinstallMode, argument, -1 );
4534 }
static const WCHAR szReinstallMode[]
Definition: msipriv.h:1124
UINT msi_set_property(MSIDATABASE *, const WCHAR *, const WCHAR *, int) DECLSPEC_HIDDEN
Definition: package.c:2149
static HWND dialog
Definition: gui.c:33

◆ event_remove()

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

Definition at line 4396 of file dialog.c.

4397 {
4399 
4400  LIST_FOR_EACH_ENTRY( feature, &dialog->package->features, MSIFEATURE, entry )
4401  {
4402  if (!strcmpW( argument, feature->Feature ) || !strcmpW( argument, szAll ))
4403  {
4404  if (feature->ActionRequest != INSTALLSTATE_ABSENT)
4405  msi_set_property( dialog->package->db, szPreselected, szOne, -1 );
4406  MSI_SetFeatureStateW( dialog->package, feature->Feature, INSTALLSTATE_ABSENT );
4407  }
4408  }
4409  return ERROR_SUCCESS;
4410 }
static const WCHAR szPreselected[]
Definition: msipriv.h:1116
INTERNETFEATURELIST feature
Definition: misc.c:1689
static const WCHAR szAll[]
Definition: msipriv.h:1107
#define ERROR_SUCCESS
Definition: deptool.c:10
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
UINT MSI_SetFeatureStateW(MSIPACKAGE *package, LPCWSTR szFeature, INSTALLSTATE iState)
Definition: install.c:940
uint32_t entry
Definition: isohybrid.c:63
static const WCHAR szOne[]
Definition: msipriv.h:1108
UINT msi_set_property(MSIDATABASE *, const WCHAR *, const WCHAR *, int) DECLSPEC_HIDDEN
Definition: package.c:2149
static HWND dialog
Definition: gui.c:33
WINE_UNICODE_INLINE int strcmpW(const WCHAR *str1, const WCHAR *str2)
Definition: unicode.h:229

◆ event_reset()

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

Definition at line 4459 of file dialog.c.

4460 {
4462  return ERROR_SUCCESS;
4463 }
#define ERROR_SUCCESS
Definition: deptool.c:10
static UINT msi_dialog_reset(msi_dialog *dialog)
Definition: dialog.c:3521
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 4518 of file dialog.c.

4519 {
4520  int level = atolW( argument );
4521 
4522  TRACE("setting install level to %d\n", level);
4523  return MSI_SetInstallLevel( dialog->package, level );
4524 }
GLint level
Definition: gl.h:1546
UINT MSI_SetInstallLevel(MSIPACKAGE *package, int iInstallLevel)
Definition: install.c:1644
WINE_UNICODE_INLINE long int atolW(const WCHAR *str)
Definition: unicode.h:310
#define TRACE(s)
Definition: solgame.cpp:4
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 4441 of file dialog.c.

4442 {
4443  WCHAR *path = msi_dup_property( dialog->package->db, argument );
4444  MSIRECORD *rec = MSI_CreateRecord( 1 );
4445  UINT r = ERROR_SUCCESS;
4446 
4447  MSI_RecordSetStringW( rec, 1, path );
4448  msi_event_fire( dialog->package, szSelectionPath, rec );
4449  if (path)
4450  {
4451  /* failure to set the path halts the executing of control events */
4452  r = MSI_SetTargetPathW( dialog->package, argument, path );
4453  msi_free( path );
4454  }
4455  msi_free( &rec->hdr );
4456  return r;
4457 }
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
Definition: record.c:649
#define ERROR_SUCCESS
Definition: deptool.c:10
MSIOBJECTHDR hdr
Definition: msipriv.h:141
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
void msi_event_fire(MSIPACKAGE *package, const WCHAR *event, MSIRECORD *rec)
Definition: dialog.c:4428
UINT MSI_SetTargetPathW(MSIPACKAGE *package, LPCWSTR szFolder, LPCWSTR szFolderPath)
Definition: install.c:567
__wchar_t WCHAR
Definition: xmlstorage.h:180
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
Definition: record.c:79
static const WCHAR szSelectionPath[]
Definition: dialog.c:161
Definition: services.c:325
unsigned int UINT
Definition: ndis.h:50
static HWND dialog
Definition: gui.c:33
static BOOL msi_free(void *mem)
Definition: msipriv.h:1227
LPWSTR msi_dup_property(MSIDATABASE *db, LPCWSTR prop) DECLSPEC_HIDDEN
Definition: package.c:2370

◆ event_spawn_dialog()

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

Definition at line 4343 of file dialog.c.

4344 {
4345  INT r;
4346  /* don't destroy a modeless dialogs that might be our parent */
4347  r = event_do_dialog( dialog->package, argument, dialog, FALSE );
4348  if (r != 0)
4349  {
4350  dialog->retval = r;
4352  }
4353  else
4355 
4356  return ERROR_SUCCESS;
4357 }
#define ERROR_SUCCESS
Definition: deptool.c:10
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
int32_t INT
Definition: typedefs.h:56
static void msi_dialog_update_all_controls(msi_dialog *dialog)
Definition: dialog.c:565
static INT event_do_dialog(MSIPACKAGE *package, const WCHAR *name, msi_dialog *parent, BOOL destroy_modeless)
Definition: dialog.c:4256
static HWND dialog
Definition: gui.c:33
static void msi_dialog_end_dialog(msi_dialog *dialog)
Definition: dialog.c:3972

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 4368 of file dialog.c.

4369 {
4370  FIXME("doing nothing\n");
4371  return ERROR_SUCCESS;
4372 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define FIXME(fmt,...)
Definition: debug.h:110

◆ event_subscribe()

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

Definition at line 709 of file dialog.c.

710 {
711  struct subscriber *sub;
712 
713  TRACE("dialog %s event %s control %s attribute %s\n", debugstr_w(dialog->name), debugstr_w(event),
715 
716  LIST_FOR_EACH_ENTRY( sub, &dialog->package->subscriptions, struct subscriber, entry )
717  {
718  if (sub->dialog == dialog &&
719  !strcmpiW( sub->event, event ) &&
720  !strcmpiW( sub->control, control ) &&
721  !strcmpiW( sub->attribute, attribute ))
722  {
723  TRACE("already subscribed\n");
724  return;
725  };
726  }
727  if (!(sub = msi_alloc( sizeof(*sub) ))) return;
728  sub->dialog = dialog;
729  sub->event = strdupW( event );
730  sub->control = strdupW( control );
731  sub->attribute = strdupW( attribute );
732  list_add_tail( &dialog->package->subscriptions, &sub->entry );
733 }
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
uint32_t entry
Definition: isohybrid.c:63
struct _cl_event * event
Definition: glext.h:7739
#define strcmpiW(s1, s2)
Definition: unicode.h:39
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:1204

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 4541 of file dialog.c.

4542 {
4543  return msi_validate_product_id( dialog->package );
4544 }
UINT msi_validate_product_id(MSIPACKAGE *package)
Definition: action.c:7435
static HWND dialog
Definition: gui.c:33

◆ free_subscriber()

static void free_subscriber ( struct subscriber sub)
static

Definition at line 4025 of file dialog.c.

4026 {
4027  msi_free( sub->event );
4028  msi_free( sub->control );
4029  msi_free( sub->attribute );
4030  msi_free( sub );
4031 }
WCHAR * attribute
Definition: dialog.c:116
WCHAR * event
Definition: dialog.c:114
WCHAR * control
Definition: dialog.c:115
static BOOL msi_free(void *mem)
Definition: msipriv.h:1227

Referenced by event_cleanup_subscriptions(), and msi_event_cleanup_all_subscriptions().

◆ map_event()

static UINT map_event ( MSIRECORD row,
void param 
)
static

Definition at line 741 of file dialog.c.

742 {
743  struct dialog_control *dc = param;
744  const WCHAR *event = MSI_RecordGetString( row, 3 );
745  const WCHAR *attribute = MSI_RecordGetString( row, 4 );
746 
747  event_subscribe( dc->dialog, event, dc->control, attribute );
748  return ERROR_SUCCESS;
749 }
#define ERROR_SUCCESS
Definition: deptool.c:10
HDC dc
Definition: cylfrac.c:34
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:482
__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:709
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 4112 of file dialog.c.

4113 {
4115  msiobj_release( &preview->package->hdr );
4116 }
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:242
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 1504 of file dialog.c.

1505 {
1506  struct msi_combobox_info *info = param;
1507  LPCWSTR value, text;
1508  int pos;
1509 
1510  value = MSI_RecordGetString( rec, 3 );
1511  text = MSI_RecordGetString( rec, 4 );
1512 
1513  info->items[info->addpos_items] = strdupW( value );
1514 
1515  pos = SendMessageW( info->hwnd, CB_ADDSTRING, 0, (LPARAM)text );
1516  SendMessageW( info->hwnd, CB_SETITEMDATA, pos, (LPARAM)info->items[info->addpos_items] );
1517  info->addpos_items++;
1518 
1519  return ERROR_SUCCESS;
1520 }
#define CB_SETITEMDATA
Definition: winuser.h:1927
#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:1827
#define CB_ADDSTRING
Definition: winuser.h:1897
LONG_PTR LPARAM
Definition: windef.h:208
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:482
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 1522 of file dialog.c.

1523 {
1524  static const WCHAR query[] = {
1525  'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
1526  '`','C','o','m','b','o','B','o','x','`',' ','W','H','E','R','E',' ',
1527  '`','P','r','o','p','e','r','t','y','`',' ','=',' ','\'','%','s','\'',' ',
1528  'O','R','D','E','R',' ','B','Y',' ','`','O','r','d','e','r','`',0};
1529  MSIQUERY *view;
1530  DWORD count;
1531  UINT r;
1532 
1533  r = MSI_OpenQuery( info->dialog->package->db, &view, query, property );
1534  if (r != ERROR_SUCCESS)
1535  return r;
1536 
1537  /* just get the number of records */
1538  count = 0;
1540  if (r != ERROR_SUCCESS)
1541  {
1542  msiobj_release( &view->hdr );
1543  return r;
1544  }
1545  info->num_items = count;
1546  info->items = msi_alloc( sizeof(*info->items) * count );
1547 
1549  msiobj_release( &view->hdr );
1550  return r;
1551 }
#define ERROR_SUCCESS
Definition: deptool.c:10
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLuint GLuint GLsizei count
Definition: gl.h:1545
UINT MSI_OpenQuery(MSIDATABASE *, MSIQUERY **, LPCWSTR,...) DECLSPEC_HIDDEN
Definition: msiquery.c:143
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long DWORD
Definition: ntddk_ex.h:95
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:242
unsigned int UINT
Definition: ndis.h:50
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1204
static IOleDocumentView * view
Definition: activex.c:1749
static UINT msi_combobox_add_item(MSIRECORD *rec, LPVOID param)
Definition: dialog.c:1504
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:168

Referenced by msi_dialog_combo_control().

◆ msi_destroy_control()

static void msi_destroy_control ( msi_control t)
static

Definition at line 395 of file dialog.c.

396 {
397  list_remove( &t->entry );
398  /* leave dialog->hwnd - destroying parent destroys child windows */
399  msi_free( t->property );
400  msi_free( t->value );
401  if( t->hBitmap )
402  DeleteObject( t->hBitmap );
403  if( t->hIcon )
404  DestroyIcon( t->hIcon );
405  msi_free( t->tabnext );
406  msi_free( t->type );
407  if (t->hDll)
408  FreeLibrary( t->hDll );
409  msi_free( t );
410 }
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2022
GLdouble GLdouble t
Definition: gl.h:2047
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
#define FreeLibrary(x)
Definition: compat.h:405
static BOOL msi_free(void *mem)
Definition: msipriv.h:1227

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 773 of file dialog.c.

775 {
776  DWORD attributes;
777  const WCHAR *text = NULL, *name, *control_type;
778  DWORD exstyle = 0;
779 
780  name = MSI_RecordGetString( rec, 2 );
781  control_type = MSI_RecordGetString( rec, 3 );
782  attributes = MSI_RecordGetInteger( rec, 8 );
784 
785  TRACE("%s, %s, %08x, %s, %08x\n", debugstr_w(szCls), debugstr_w(name),
786  attributes, debugstr_w(text), style);
787 
788  if( attributes & msidbControlAttributesVisible )
789  style |= WS_VISIBLE;
790  if( ~attributes & msidbControlAttributesEnabled )
791  style |= WS_DISABLED;
792  if( attributes & msidbControlAttributesSunken )
793  exstyle |= WS_EX_CLIENTEDGE;
794 
796 
797  return dialog_create_window( dialog, rec, exstyle, szCls, name, text, style, dialog->hwnd );
798 }
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:412
#define WS_DISABLED
Definition: pedump.c:621
static const WCHAR szScrollableText[]
Definition: dialog.c:144
const WCHAR * text
Definition: package.c:1827
static const char * control_type(DWORD dwControlType)
Definition: mixer.c:110
#define debugstr_w
Definition: kernel32.h:32
smooth NULL
Definition: ftsmooth.c:416
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:482
#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:245
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
static HWND dialog
Definition: gui.c:33
Definition: name.c:36
WINE_UNICODE_INLINE int strcmpW(const WCHAR *str1, const WCHAR *str2)
Definition: unicode.h:229
static void dialog_map_events(msi_dialog *dialog, const WCHAR *control)
Definition: dialog.c:751
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_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 307 of file dialog.c.

308 {
310  msi_font *font;
311  LPCWSTR face, name;
312  LOGFONTW lf;
313  INT style;
314  HDC hdc;
315 
316  /* create a font and add it to the list */
317  name = MSI_RecordGetString( rec, 1 );
319  strcpyW( font->name, name );
320  list_add_head( &dialog->fonts, &font->entry );
321 
322  font->color = MSI_RecordGetInteger( rec, 4 );
323 
324  memset( &lf, 0, sizeof lf );
325  face = MSI_RecordGetString( rec, 2 );
326  lf.lfHeight = MSI_RecordGetInteger( rec, 3 );
327  style = MSI_RecordGetInteger( rec, 5 );
329  lf.lfWeight = FW_BOLD;
331  lf.lfItalic = TRUE;
333  lf.lfUnderline = TRUE;
335  lf.lfStrikeOut = TRUE;
337 
338  /* adjust the height */
339  hdc = GetDC( dialog->hwnd );
340  if (hdc)
341  {
343  ReleaseDC( dialog->hwnd, hdc );
344  }
345 
346  font->hfont = CreateFontIndirectW( &lf );
347 
348  TRACE("Adding font style %s\n", debugstr_w(font->name) );
349 
350  return ERROR_SUCCESS;
351 }
#define TRUE
Definition: types.h:120
#define LF_FACESIZE
Definition: dimm.idl:39
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
#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
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
WORD face[3]
Definition: mesh.c:4747
int32_t INT
Definition: typedefs.h:56
#define lstrcpynW
Definition: compat.h:397
#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:482
#define TRACE(s)
Definition: solgame.cpp:4
GLfloat param
Definition: glext.h:5796
HDC hdc
Definition: main.c:9
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
int MSI_RecordGetInteger(MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:245
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
#define FW_BOLD
Definition: wingdi.h:377
BYTE lfStrikeOut
Definition: dimm.idl:66
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
BYTE lfItalic
Definition: dimm.idl:64
static HWND dialog
Definition: gui.c:33
Definition: name.c:36
WCHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:72
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1204
#define LOGPIXELSY
Definition: wingdi.h:718
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
#define MulDiv(x, y, z)
Definition: gdifloat.h:86
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 3580 of file dialog.c.

3581 {
3582  static const WCHAR szScreenX[] = {'S','c','r','e','e','n','X',0};
3583  static const WCHAR szScreenY[] = {'S','c','r','e','e','n','Y',0};
3584 
3585  UINT xres, yres;
3586  POINT center;
3587  SIZE sz;
3588  LONG style;
3589 
3590  center.x = MSI_RecordGetInteger( rec, 2 );
3591  center.y = MSI_RecordGetInteger( rec, 3 );
3592 
3593  sz.cx = MSI_RecordGetInteger( rec, 4 );
3594  sz.cy = MSI_RecordGetInteger( rec, 5 );
3595 
3596  sz.cx = msi_dialog_scale_unit( dialog, sz.cx );
3597  sz.cy = msi_dialog_scale_unit( dialog, sz.cy );
3598 
3599  xres = msi_get_property_int( dialog->package->db, szScreenX, 0 );
3600  yres = msi_get_property_int( dialog->package->db, szScreenY, 0 );
3601 
3602  center.x = MulDiv( center.x, xres, 100 );
3603  center.y = MulDiv( center.y, yres, 100 );
3604 
3605  /* turn the client pos into the window rectangle */
3606  if (dialog->package->center_x && dialog->package->center_y)
3607  {
3608  pos->left = dialog->package->center_x - sz.cx / 2.0;
3609  pos->right = pos->left + sz.cx;
3610  pos->top = dialog->package->center_y - sz.cy / 2.0;
3611  pos->bottom = pos->top + sz.cy;
3612  }
3613  else
3614  {
3615  pos->left = center.x - sz.cx/2;
3616  pos->right = pos->left + sz.cx;
3617  pos->top = center.y - sz.cy/2;
3618  pos->bottom = pos->top + sz.cy;
3619 
3620  /* save the center */
3621  dialog->package->center_x = center.x;
3622  dialog->package->center_y = center.y;
3623  }
3624 
3625  dialog->size.cx = sz.cx;
3626  dialog->size.cy = sz.cy;
3627 
3628  TRACE("%s\n", wine_dbgstr_rect(pos));
3629 
3632 }
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:2392
static INT msi_dialog_scale_unit(msi_dialog *dialog, INT val)
Definition: dialog.c:193
#define GetWindowLongPtrW
Definition: winuser.h:4698
BOOL WINAPI AdjustWindowRect(_Inout_ LPRECT, _In_ DWORD, _In_ BOOL)
long LONG
Definition: pedump.c:60
LONG cx
Definition: windef.h:319
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
const char * wine_dbgstr_rect(const RECT *rect)
int MSI_RecordGetInteger(MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:245
#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:320
#define MulDiv(x, y, z)
Definition: gdifloat.h:86

Referenced by msi_dialog_oncreate().

◆ msi_dialog_bitmap_control()

static UINT msi_dialog_bitmap_control ( msi_dialog dialog,
MSIRECORD rec 
)
static

Definition at line 1407 of file dialog.c.

1408 {
1409  UINT cx, cy, flags, style, attributes;
1410  msi_control *control;
1411  LPWSTR name;
1412 
1415 
1416  attributes = MSI_RecordGetInteger( rec, 8 );
1417  if( attributes & msidbControlAttributesFixedSize )
1418  {
1419  flags |= LR_DEFAULTSIZE;
1420  style |= SS_CENTERIMAGE;
1421  }
1422 
1423  control = msi_dialog_add_control( dialog, rec, szStatic, style );
1424  cx = MSI_RecordGetInteger( rec, 6 );
1425  cy = MSI_RecordGetInteger( rec, 7 );
1428 
1429  name = msi_get_binary_name( dialog->package, rec );
1430  control->hBitmap = msi_load_picture( dialog->package->db, name, cx, cy, flags );
1431  if( control->hBitmap )
1432  SendMessageW( control->hwnd, STM_SETIMAGE,
1433  IMAGE_BITMAP, (LPARAM) control->hBitmap );
1434  else
1435  ERR("Failed to load bitmap %s\n", debugstr_w(name));
1436 
1437  msi_free( name );
1438 
1439  return ERROR_SUCCESS;
1440 }
#define WS_GROUP
Definition: pedump.c:633
#define ERROR_SUCCESS
Definition: deptool.c:10
#define LR_LOADFROMFILE
Definition: winuser.h:1082
static INT msi_dialog_scale_unit(msi_dialog *dialog, INT val)
Definition: dialog.c:193
#define SS_BITMAP
Definition: pedump.c:704
#define debugstr_w
Definition: kernel32.h:32
#define SS_LEFT
Definition: pedump.c:692
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
LONG_PTR LPARAM
Definition: windef.h:208
static HBITMAP msi_load_picture(MSIDATABASE *db, LPCWSTR name, INT cx, INT cy, DWORD flags)
Definition: dialog.c:1340
#define LR_DEFAULTSIZE
Definition: winuser.h:1084
GLbitfield flags
Definition: glext.h:7161
#define SS_CENTERIMAGE
Definition: winuser.h:339
int MSI_RecordGetInteger(MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:245
#define ERR(fmt,...)
Definition: debug.h:109
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:2054
static HWND dialog
Definition: gui.c:33
_Out_opt_ int * cx
Definition: commctrl.h:570
static BOOL msi_free(void *mem)
Definition: msipriv.h:1227
Definition: name.c:36
static msi_control * msi_dialog_add_control(msi_dialog *dialog, MSIRECORD *rec, LPCWSTR szCls, DWORD style)
Definition: dialog.c:773
static WCHAR * msi_get_binary_name(MSIPACKAGE *package, MSIRECORD *rec)
Definition: dialog.c:897
WCHAR * LPWSTR
Definition: xmlstorage.h:184
Arabic default style
Definition: afstyles.h:93
static const WCHAR szStatic[]
Definition: dialog.c:135
HBITMAP hBitmap
Definition: dialog.c:68
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 376 of file dialog.c.

377 {
378  static const WCHAR query[] = {
379  'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
380  '`','T','e','x','t','S','t','y','l','e','`',0};
381  MSIQUERY *view;
382  UINT r;
383 
384  TRACE("dialog %p\n", dialog );
385 
386  r = MSI_OpenQuery( dialog->package->db, &view, query );
387  if( r != ERROR_SUCCESS )
388  return r;
389 
391  msiobj_release( &view->hdr );
392  return r;
393 }
#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:307
UINT MSI_OpenQuery(MSIDATABASE *, MSIQUERY **, LPCWSTR,...) DECLSPEC_HIDDEN
Definition: msiquery.c:143
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:242
unsigned int UINT
Definition: ndis.h:50
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:168

Referenced by msi_dialog_oncreate().

◆ msi_dialog_button_control()

static UINT msi_dialog_button_control ( msi_dialog dialog,
MSIRECORD rec 
)
static

Definition at line 1013 of file dialog.c.

1014 {
1015  msi_control *control;
1016  UINT attributes, style;
1017 
1018  TRACE("%p %p\n", dialog, rec);
1019 
1020  style = WS_TABSTOP;
1021  attributes = MSI_RecordGetInteger( rec, 8 );
1022  if( attributes & msidbControlAttributesIcon )
1023  style |= BS_ICON;
1024 
1025  control = msi_dialog_add_control( dialog, rec, szButton, style );
1026  if( !control )
1027  return ERROR_FUNCTION_FAILED;
1028 
1030 
1031  if (attributes & msidbControlAttributesIcon)
1032  {
1033  /* set the icon */
1034  LPWSTR name = msi_get_binary_name( dialog->package, rec );
1035  control->hIcon = msi_load_icon( dialog->package->db, name, attributes );
1036  if (control->hIcon)
1037  {
1038  SendMessageW( control->hwnd, BM_SETIMAGE, IMAGE_ICON, (LPARAM) control->hIcon );
1039  }
1040  else
1041  ERR("Failed to load icon %s\n", debugstr_w(name));
1042  msi_free( name );
1043  }
1044 
1045  return ERROR_SUCCESS;
1046 }
#define IMAGE_ICON
Definition: winuser.h:212
#define ERROR_SUCCESS
Definition: deptool.c:10
HICON hIcon
Definition: dialog.c:69
msi_handler handler
Definition: dialog.c:64
static HICON msi_load_icon(MSIDATABASE *db, LPCWSTR text, UINT attributes)
Definition: dialog.c:531
#define BM_SETIMAGE
Definition: winuser.h:1883
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
#define debugstr_w
Definition: kernel32.h:32
LONG_PTR LPARAM
Definition: windef.h:208
#define TRACE(s)
Definition: solgame.cpp:4
static UINT msi_dialog_button_handler(msi_dialog *dialog, msi_control *control, WPARAM param)
Definition: dialog.c:978
#define BS_ICON
Definition: winuser.h:264
#define WS_TABSTOP
Definition: pedump.c:634
static const WCHAR szButton[]
Definition: dialog.c:136
int MSI_RecordGetInteger(MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:245
#define ERR(fmt,...)
Definition: debug.h:109
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
static BOOL msi_free(void *mem)
Definition: msipriv.h:1227
Definition: name.c:36
static msi_control * msi_dialog_add_control(msi_dialog *dialog, MSIRECORD *rec, LPCWSTR szCls, DWORD style)
Definition: dialog.c:773
static WCHAR * msi_get_binary_name(MSIPACKAGE *package, MSIRECORD *rec)
Definition: dialog.c:897
WCHAR * LPWSTR
Definition: xmlstorage.h:184
Arabic default style
Definition: afstyles.h:93

◆ msi_dialog_button_handler()

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

Definition at line 978 of file dialog.c.

979 {
980  static const WCHAR query[] = {
981  'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
982  'C','o','n','t','r','o','l','E','v','e','n','t',' ','W','H','E','R','E',' ',
983  '`','D','i','a','l','o','g','_','`',' ','=',' ','\'','%','s','\'',' ','A','N','D',' ',
984  '`','C','o','n','t','r','o','l','_','`',' ','=',' ','\'','%','s','\'',' ',
985  'O','R','D','E','R',' ','B','Y',' ','`','O','r','d','e','r','i','n','g','`',0};
986  MSIQUERY *view;
987  UINT r;
988 
989  if (HIWORD(param) != BN_CLICKED)
990  return ERROR_SUCCESS;
991 
992  r = MSI_OpenQuery( dialog->package->db, &view, query, dialog->name, control->name );
993  if (r != ERROR_SUCCESS)
994  {
995  ERR("query failed\n");
996  return ERROR_SUCCESS;
997  }
999  msiobj_release( &view->hdr );
1000 
1001  /* dialog control events must be processed last regardless of ordering */
1002  if (dialog->pending_event)
1003  {
1004  r = dialog->pending_event( dialog, dialog->pending_argument );
1005 
1006  msi_free( dialog->pending_argument );
1007  dialog->pending_event = NULL;
1008  dialog->pending_argument = NULL;
1009  }
1010  return r;
1011 }
#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:958
UINT MSI_OpenQuery(MSIDATABASE *, MSIQUERY **, LPCWSTR,...) DECLSPEC_HIDDEN
Definition: msiquery.c:143
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
GLfloat param
Definition: glext.h:5796
#define BN_CLICKED
Definition: winuser.h:1886
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:242
#define ERR(fmt,...)
Definition: debug.h:109
unsigned int UINT
Definition: ndis.h:50
static HWND dialog
Definition: gui.c:33
static BOOL msi_free(void *mem)
Definition: msipriv.h:1227
#define HIWORD(l)
Definition: typedefs.h:246
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:168

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 3979 of file dialog.c.

3980 {
3981  DWORD r;
3982 
3983  /* in threads other than the UI thread, block */
3984  if( uiThreadId != GetCurrentThreadId() )
3985  {
3986  if (!handle) return;
3988  {
3989  MSG msg;
3990  while (PeekMessageW( &msg, NULL, 0, 0, PM_REMOVE ))
3991  {
3992  TranslateMessage( &msg );
3993  DispatchMessageW( &msg );
3994  }
3995  }
3996  return;
3997  }
3998 
3999  /* there are two choices for the UI thread */
4000  while (1)
4001  {
4003 
4004  if( !handle )
4005  break;
4006 
4007  /*
4008  * block here until somebody creates a new dialog or
4009  * the handle we're waiting on becomes ready
4010  */
4012  if( r == WAIT_OBJECT_0 )
4013  break;
4014  }
4015 }
BOOL WINAPI TranslateMessage(_In_ const MSG *)
static DWORD uiThreadId
Definition: dialog.c:171
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 *)
smooth NULL
Definition: ftsmooth.c:416
DWORD WINAPI GetCurrentThreadId(VOID)
Definition: thread.c:420
#define WAIT_OBJECT_0
Definition: winbase.h:387
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:3822
#define QS_ALLINPUT
Definition: winuser.h:874
#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:1182
#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 1138 of file dialog.c.

1139 {
1140  msi_control *control;
1141  LPCWSTR prop;
1142 
1143  TRACE("%p %p\n", dialog, rec);
1144 
1148  prop = MSI_RecordGetString( rec, 9 );
1149  if (prop)
1150  {
1151  control->property = strdupW( prop );
1152  control->value = msi_get_checkbox_value( dialog, prop );
1153  TRACE("control %s value %s\n", debugstr_w(control->property), debugstr_w(control->value));
1154  }
1156  return ERROR_SUCCESS;
1157 }
static UINT msi_dialog_checkbox_handler(msi_dialog *dialog, msi_control *control, WPARAM param)
Definition: dialog.c:1121
#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:1115
static WCHAR * strdupW(const WCHAR *src)
Definition: main.c:92
msi_handler handler
Definition: dialog.c:64
msi_update update
Definition: dialog.c:65
#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:482
LPWSTR property
Definition: dialog.c:66
#define TRACE(s)
Definition: solgame.cpp:4
#define BS_MULTILINE
Definition: winuser.h:267
LPWSTR value
Definition: dialog.c:67
#define WS_TABSTOP
Definition: pedump.c:634
static const WCHAR szButton[]
Definition: dialog.c:136
static LPWSTR msi_get_checkbox_value(msi_dialog *dialog, LPCWSTR prop)
Definition: dialog.c:1048
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:773

◆ msi_dialog_checkbox_handler()

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

Definition at line 1121 of file dialog.c.

1122 {
1123  UINT state;
1124 
1125  if (HIWORD(param) != BN_CLICKED)
1126  return ERROR_SUCCESS;
1127 
1128  TRACE("clicked checkbox %s, set %s\n", debugstr_w(control->name), debugstr_w(control->property));
1129 
1131  state = state ? 0 : 1;
1134 
1135  return msi_dialog_button_handler( dialog, control, param );
1136 }
#define ERROR_SUCCESS
Definition: deptool.c:10
static void msi_dialog_checkbox_sync_state(msi_dialog *dialog, msi_control *control)
Definition: dialog.c:1115
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:1094
static UINT msi_dialog_get_checkbox_state(msi_dialog *dialog, msi_control *control)
Definition: dialog.c:1085
#define debugstr_w
Definition: kernel32.h:32
LPWSTR property
Definition: dialog.c:66
#define TRACE(s)
Definition: solgame.cpp:4
static UINT msi_dialog_button_handler(msi_dialog *dialog, msi_control *control, WPARAM param)
Definition: dialog.c:978
GLfloat param
Definition: glext.h:5796
#define BN_CLICKED
Definition: winuser.h:1886
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:246

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 1115 of file dialog.c.

1116 {
1119 }
static UINT msi_dialog_get_checkbox_state(msi_dialog *dialog, msi_control *control)
Definition: dialog.c:1085
#define BM_SETCHECK
Definition: winuser.h:1882
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 1673 of file dialog.c.

1674 {
1675  struct msi_combobox_info *info;
1676  msi_control *control;
1677  DWORD attributes, style;
1678  LPCWSTR prop;
1679 
1680  info = msi_alloc( sizeof *info );
1681  if (!info)
1682  return ERROR_FUNCTION_FAILED;
1683 
1685  attributes = MSI_RecordGetInteger( rec, 8 );
1686  if ( ~attributes & msidbControlAttributesSorted)
1687  style |= CBS_SORT;
1688  if ( attributes & msidbControlAttributesComboList)
1690  else
1691  style |= CBS_DROPDOWN;
1692 
1693  control = msi_dialog_add_control( dialog, rec, WC_COMBOBOXW, style );
1694  if (!control)
1695  {
1696  msi_free( info );
1697  return ERROR_FUNCTION_FAILED;
1698  }
1699 
1702 
1703  prop = MSI_RecordGetString( rec, 9 );
1704  control->property = msi_dialog_dup_property( dialog, prop, FALSE );
1705 
1706  /* subclass */
1707  info->dialog = dialog;
1708  info->hwnd = control->hwnd;
1709  info->items = NULL;
1710  info->addpos_items = 0;
1711  info->oldproc = (WNDPROC)SetWindowLongPtrW( control->hwnd, GWLP_WNDPROC,
1713  SetPropW( control->hwnd, szButtonData, info );
1714 
1715  if (control->property)
1716  msi_combobox_add_items( info, control->property );
1717 
1718  msi_dialog_combobox_update( dialog, control );
1719 
1720  return ERROR_SUCCESS;
1721 }
#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:1522
#define ERROR_SUCCESS
Definition: deptool.c:10
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
msi_handler handler
Definition: dialog.c:64
#define CBS_AUTOHSCROLL
Definition: winuser.h:281
#define WS_CHILD
Definition: pedump.c:617
msi_update update
Definition: dialog.c:65
struct _test_info info[]
Definition: SetCursorPos.c:19
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
smooth NULL
Definition: ftsmooth.c:416
#define CBS_DROPDOWNLIST
Definition: winuser.h:284
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:482
LPWSTR property
Definition: dialog.c:66
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:1638
static UINT msi_dialog_combobox_handler(msi_dialog *dialog, msi_control *control, WPARAM param)
Definition: dialog.c:1613
static LRESULT WINAPI MSIComboBox_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: dialog.c:1476
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:245
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2859
static LPWSTR msi_dialog_dup_property(msi_dialog *dialog, LPCWSTR property, BOOL indirect)
Definition: dialog.c:248
#define CBS_DROPDOWN
Definition: winuser.h:283
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
static HWND dialog
Definition: gui.c:33
static BOOL msi_free(void *mem)
Definition: msipriv.h:1227
static msi_control * msi_dialog_add_control(msi_dialog *dialog, MSIRECORD *rec, LPCWSTR szCls, DWORD style)
Definition: dialog.c:773
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1204
static const WCHAR szButtonData[]
Definition: dialog.c:137
#define SetWindowLongPtrW
Definition: winuser.h:5215
Arabic default style
Definition: afstyles.h:93
#define WC_COMBOBOXW
Definition: commctrl.h:4688

◆ msi_dialog_combobox_handler()

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

Definition at line 1613 of file dialog.c.

1614 {
1615  struct msi_combobox_info *info;
1616  int index;
1617  LPWSTR value;
1618 
1620  return ERROR_SUCCESS;
1621 
1622  info = GetPropW( control->hwnd, szButtonData );
1623  index = SendMessageW( control->hwnd, CB_GETCURSEL, 0, 0 );
1624  if (index == CB_ERR)
1625  value = msi_get_window_text( control->hwnd );
1626  else
1627  value = (LPWSTR) SendMessageW( control->hwnd, CB_GETITEMDATA, index, 0 );
1628 
1629  msi_dialog_set_property( info->dialog->package, control->property, value );
1631 
1632  if (index == CB_ERR)
1633  msi_free( value );
1634 
1635  return ERROR_SUCCESS;
1636 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define CB_GETITEMDATA
Definition: winuser.h:1911
#define CB_GETCURSEL
Definition: winuser.h:1904
struct _test_info info[]
Definition: SetCursorPos.c:19
GLuint index
Definition: glext.h:6031
#define CB_ERR
Definition: winuser.h:2389
LPWSTR property
Definition: dialog.c:66
#define CBN_EDITCHANGE
Definition: winuser.h:1936
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:1940
static BOOL msi_free(void *mem)
Definition: msipriv.h:1227
static LPWSTR msi_get_window_text(HWND hwnd)
Definition: dialog.c:174
#define HIWORD(l)
Definition: typedefs.h:246
static const WCHAR szButtonData[]
Definition: dialog.c:137
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static UINT msi_dialog_evaluate_control_conditions(msi_dialog *dialog)
Definition: dialog.c:1591
static void msi_dialog_set_property(MSIPACKAGE *package, LPCWSTR property, LPCWSTR value)
Definition: dialog.c:576

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 1638 of file dialog.c.

1639 {
1640  struct msi_combobox_info *info;
1641  LPWSTR value, tmp;
1642  DWORD j;
1643 
1644  info = GetPropW( control->hwnd, szButtonData );
1645 
1646  value = msi_dup_property( dialog->package->db, control->property );
1647  if (!value)
1648  {
1649  SendMessageW( control->hwnd, CB_SETCURSEL, -1, 0 );
1650  return;
1651  }
1652 
1653  for (j = 0; j < info->num_items; j++)
1654  {
1655  tmp = (LPWSTR) SendMessageW( control->hwnd, CB_GETITEMDATA, j, 0 );
1656  if (!strcmpW( value, tmp ))
1657  break;
1658  }
1659 
1660  if (j < info->num_items)
1661  {
1662  SendMessageW( control->hwnd, CB_SETCURSEL, j, 0 );
1663  }
1664  else
1665  {
1666  SendMessageW( control->hwnd, CB_SETCURSEL, -1, 0 );
1667  SetWindowTextW( control->hwnd, value );
1668  }
1669 
1670  msi_free(value);
1671 }
#define CB_GETITEMDATA
Definition: winuser.h:1911
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
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:66
unsigned long DWORD
Definition: ntddk_ex.h:95
#define CB_SETCURSEL
Definition: winuser.h:1922
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)
static HWND dialog
Definition: gui.c:33
static BOOL msi_free(void *mem)
Definition: msipriv.h:1227
WINE_UNICODE_INLINE int strcmpW(const WCHAR *str1, const WCHAR *str2)
Definition: unicode.h:229
static const WCHAR szButtonData[]
Definition: dialog.c:137
WCHAR * LPWSTR
Definition: xmlstorage.h:184
LPWSTR msi_dup_property(MSIDATABASE *db, LPCWSTR prop) DECLSPEC_HIDDEN
Definition: package.c:2370

Referenced by msi_dialog_combo_control().

◆ msi_dialog_control_event()

static UINT msi_dialog_control_event ( MSIRECORD rec,
LPVOID  param 
)
static

Definition at line 958 of file dialog.c.

959 {
962  UINT r;
963 
964  condition = MSI_RecordGetString( rec, 5 );
965  r = MSI_EvaluateConditionW( dialog->package, condition );
966  if (r == MSICONDITION_TRUE || r == MSICONDITION_NONE)
967  {
968  event = MSI_RecordGetString( rec, 3 );
969  arg = MSI_RecordGetString( rec, 4 );
970  if (event[0] == '[')
972  else
974  }
975  return ERROR_SUCCESS;
976 }
#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:941
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
void * arg
Definition: msvc.h:12
GLenum condition
Definition: glext.h:9255
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:482
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
MSICONDITION MSI_EvaluateConditionW(MSIPACKAGE *package, LPCWSTR szCondition)
Definition: cond.tab.c:2461
static UINT msi_dialog_set_property_event(msi_dialog *dialog, LPCWSTR event, LPCWSTR arg)
Definition: dialog.c:917

Referenced by msi_dialog_button_handler().

◆ msi_dialog_create_controls()

static UINT msi_dialog_create_controls ( MSIRECORD rec,
LPVOID  param 
)
static

Definition at line 3477 of file dialog.c.

3478 {
3479  msi_dialog *dialog = param;
3481  UINT i;
3482 
3483  /* find and call the function that can create this type of control */
3484  control_type = MSI_RecordGetString( rec, 3 );
3485  for( i=0; i<NUM_CONTROL_TYPES; i++ )
3487  break;
3488  if( i != NUM_CONTROL_TYPES )
3489  msi_dialog_handler[i].func( dialog, rec );
3490  else
3491  ERR("no handler for element type %s\n", debugstr_w(control_type));
3492 
3493  return ERROR_SUCCESS;
3494 }
#define ERROR_SUCCESS
Definition: deptool.c:10
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define NUM_CONTROL_TYPES
Definition: dialog.c:3475
static const char * control_type(DWORD dwControlType)
Definition: mixer.c:110
static const struct control_handler msi_dialog_handler[]
Definition: dialog.c:3450
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 debugstr_w
Definition: kernel32.h:32
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:482
GLfloat param
Definition: glext.h:5796
#define strcmpiW(s1, s2)
Definition: unicode.h:39
#define ERR(fmt,...)
Definition: debug.h:109
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 2287 of file dialog.c.

2288 {
2290  msi_dialog *dialog = group->dialog;
2291  msi_control *control;
2292  LPCWSTR prop, text, name;
2294 
2295  name = MSI_RecordGetString( rec, 3 );
2296  text = MSI_RecordGetString( rec, 8 );
2297 
2298  control = dialog_create_window( dialog, rec, 0, szButton, name, text, style,
2299  group->parent->hwnd );
2300  if (!control)
2301  return ERROR_FUNCTION_FAILED;
2303 
2304  if (group->propval && !strcmpW( control->name, group->propval ))
2305  SendMessageW(control->hwnd, BM_SETCHECK, BST_CHECKED, 0);
2306 
2307  prop = MSI_RecordGetString( rec, 1 );
2308  if( prop )
2309  control->property = strdupW( prop );
2310 
2311  return ERROR_SUCCESS;
2312 }
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:412
#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:1827
msi_handler handler
Definition: dialog.c:64
WCHAR name[1]
Definition: dialog.c:77
#define WS_CHILD
Definition: pedump.c:617
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:482
LPWSTR property
Definition: dialog.c:66
GLboolean GLuint group
Definition: glext.h:11120
#define BM_SETCHECK
Definition: winuser.h:1882
#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
static const WCHAR szButton[]
Definition: dialog.c:136
static UINT msi_dialog_radiogroup_handler(msi_dialog *dialog, msi_control *control, WPARAM param)
Definition: dialog.c:2274
#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:36
WINE_UNICODE_INLINE int strcmpW(const WCHAR *str1, const WCHAR *str2)
Definition: unicode.h:229
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 4047 of file dialog.c.

4048 {
4049  msi_font *font, *next;
4050 
4051  if( uiThreadId != GetCurrentThreadId() )
4052  {
4054  return;
4055  }
4056 
4057  if( dialog->hwnd )
4058  ShowWindow( dialog->hwnd, SW_HIDE );
4059 
4060  if( dialog->hwnd )
4061  DestroyWindow( dialog->hwnd );
4062 
4063  /* unsubscribe events */
4064  event_cleanup_subscriptions( dialog->package, dialog->name );
4065 
4066  /* destroy the list of controls */
4067  while( !list_empty( &dialog->controls ) )
4068  {
4069  msi_control *t;
4070 
4071  t = LIST_ENTRY( list_head( &dialog->controls ),
4072  msi_control, entry );
4074  }
4075 
4076  /* destroy the list of fonts */
4078  {
4079  list_remove( &font->entry );
4080  DeleteObject( font->hfont );
4081  msi_free( font );
4082  }
4083  msi_free( dialog->default_font );
4084 
4085  msi_free( dialog->control_default );
4086  msi_free( dialog->control_cancel );
4087  dialog->package = NULL;
4088  msi_free( dialog );
4089 }
#define WM_MSI_DIALOG_DESTROY
Definition: dialog.c:167
Definition: mk_font.cpp:20
static DWORD uiThreadId
Definition: dialog.c:171
#define SW_HIDE
Definition: winuser.h:762
GLdouble GLdouble t
Definition: gl.h:2047
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
static void event_cleanup_subscriptions(MSIPACKAGE *package, const WCHAR *dialog)
Definition: dialog.c:4033
BOOL WINAPI DestroyWindow(_In_ HWND)
__WINE_SERVER_LIST_INLINE struct list * list_head(const struct list *list)
Definition: list.h:131
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
DWORD WINAPI GetCurrentThreadId(VOID)
Definition: thread.c:420
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
static HWND hMsiHiddenWindow
Definition: dialog.c:172
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)
static HWND dialog
Definition: gui.c:33
static void msi_destroy_control(msi_control *t)
Definition: dialog.c:395
static BOOL msi_free(void *mem)
Definition: msipriv.h:1227
#define LIST_ENTRY(type)
Definition: queue.h:175

Referenced by 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 2944 of file dialog.c.

2945 {
2946  msi_control *control;
2947  LPCWSTR prop;
2948  DWORD style;
2949 
2950  /* FIXME: use CBS_OWNERDRAWFIXED and add owner draw code */
2953  control = msi_dialog_add_control( dialog, rec, WC_COMBOBOXW, style );
2954  if (!control)
2955  return ERROR_FUNCTION_FAILED;
2956 
2957  control->attributes = MSI_RecordGetInteger( rec, 8 );
2958  prop = MSI_RecordGetString( rec, 9 );
2959  control->property = msi_dialog_dup_property( dialog, prop, FALSE );
2960 
2962 
2963  return ERROR_SUCCESS;
2964 }
#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 CBS_DROPDOWNLIST
Definition: winuser.h:284
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:482
#define CBS_HASSTRINGS
Definition: winuser.h:285
LPWSTR property
Definition: dialog.c:66
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:245
static LPWSTR msi_dialog_dup_property(msi_dialog *dialog, LPCWSTR property, BOOL indirect)
Definition: dialog.c:248
#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:773
Arabic default style
Definition: afstyles.h:93
static void msi_dialog_update_directory_combo(msi_dialog *dialog, msi_control *control)
Definition: dialog.c:2922
#define WC_COMBOBOXW
Definition: commctrl.h:4688

◆ msi_dialog_directory_list()

static UINT msi_dialog_directory_list ( msi_dialog dialog,
MSIRECORD rec 
)
static

Definition at line 3091 of file dialog.c.

3092 {
3093  msi_control *control;
3094  LPCWSTR prop;
3095  DWORD style;
3096 
3100  control = msi_dialog_add_control( dialog, rec, WC_LISTVIEWW, style );
3101  if (!control)
3102  return ERROR_FUNCTION_FAILED;
3103 
3104  control->attributes = MSI_RecordGetInteger( rec, 8 );
3106  prop = MSI_RecordGetString( rec, 9 );
3107  control->property = msi_dialog_dup_property( dialog, prop, FALSE );
3108 
3109  /* double click to activate an item in the list */
3112 
3114 
3115  return ERROR_SUCCESS;
3116 }
#define WS_GROUP
Definition: pedump.c:633
#define ERROR_SUCCESS
Definition: deptool.c:10
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
DWORD attributes
Defin