ReactOS  0.4.15-dev-2979-gfd8baca
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 3482 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 4501 of file dialog.c.

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

Referenced by internal_ui_handler().

◆ ACTION_ShowDialog()

INT ACTION_ShowDialog ( MSIPACKAGE package,
const WCHAR dialog 
)

Definition at line 4472 of file dialog.c.

4473 {
4474  static const WCHAR szDialog[] = {'D','i','a','l','o','g',0};
4475  MSIRECORD *row;
4476  INT rc;
4477 
4478  if (!TABLE_Exists(package->db, szDialog)) return 0;
4479 
4480  row = MSI_CreateRecord(0);
4481  if (!row) return -1;
4484  msiobj_release(&row->hdr);
4485 
4486  if (rc == -2) rc = 0;
4487 
4488  if (!rc)
4489  {
4491  if (!row) return -1;
4492  MSI_RecordSetInteger(row, 1, 2726);
4495 
4496  msiobj_release(&row->hdr);
4497  }
4498  return rc;
4499 }
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
Definition: record.c:649
int32_t INT
Definition: typedefs.h:58
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 3933 of file dialog.c.

3935 {
3936  static const WCHAR szDialogCreated[] =
3937  {'D','i','a','l','o','g',' ','c','r','e','a','t','e','d',0};
3938  MSIRECORD *rec = NULL;
3939  msi_dialog *dialog;
3940 
3941  TRACE("%s\n", debugstr_w(name));
3942 
3944 
3945  /* allocate the structure for the dialog to use */
3947  if( !dialog )
3948  return NULL;
3949  strcpyW( dialog->name, name );
3950  dialog->parent = parent;
3951  dialog->package = package;
3952  dialog->event_handler = event_handler;
3953  dialog->finished = 0;
3954  list_init( &dialog->controls );
3955  list_init( &dialog->fonts );
3956 
3957  /* verify that the dialog exists */
3958  rec = msi_get_dialog_record( dialog );
3959  if( !rec )
3960  {
3961  msi_free( dialog );
3962  return NULL;
3963  }
3964  dialog->attributes = MSI_RecordGetInteger( rec, 6 );
3965  dialog->control_default = strdupW( MSI_RecordGetString( rec, 9 ) );
3966  dialog->control_cancel = strdupW( MSI_RecordGetString( rec, 10 ) );
3967  msiobj_release( &rec->hdr );
3968 
3969  rec = MSI_CreateRecord(2);
3970  if (!rec) return NULL;
3971  MSI_RecordSetStringW(rec, 1, name);
3972  MSI_RecordSetStringW(rec, 2, szDialogCreated);
3974  msiobj_release(&rec->hdr);
3975 
3976  return dialog;
3977 }
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:3568
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:3901
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
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:2944
__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:255
#define NULL
Definition: types.h:112
static HWND dialog
Definition: gui.c:33
static BOOL msi_free(void *mem)
Definition: msipriv.h:1227
Definition: name.c:38
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149

Referenced by event_do_dialog(), and MSI_PreviewDialogW().

◆ dialog_create_window()

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

Definition at line 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 FALSE
Definition: types.h:117
#define debugstr_w
Definition: kernel32.h:32
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:2944
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:255
#define NULL
Definition: types.h:112
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
static HWND dialog
Definition: gui.c:33
static BOOL msi_free(void *mem)
Definition: msipriv.h:1227
Definition: name.c:38
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 4024 of file dialog.c.

4025 {
4026  TRACE("\n");
4027  dialog->attributes |= msidbDialogAttributesVisible;
4028  dialog->attributes &= ~msidbDialogAttributesModal;
4030 }
#define TRACE(s)
Definition: solgame.cpp:4
static UINT dialog_run_message_loop(msi_dialog *dialog)
Definition: dialog.c:3841
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 4591 of file dialog.c.

4592 {
4593  unsigned int i;
4594 
4595  TRACE("handling event %s\n", debugstr_w(event));
4596 
4597  if (!event) return ERROR_SUCCESS;
4598 
4599  for (i = 0; control_events[i].event; i++)
4600  {
4601  if (!strcmpW( control_events[i].event, event ))
4602  return control_events[i].handler( dialog, argument );
4603  }
4604  FIXME("unhandled event %s arg(%s)\n", debugstr_w(event), debugstr_w(argument));
4605  return ERROR_SUCCESS;
4606 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
#define TRACE(s)
Definition: solgame.cpp:4
struct _cl_event * event
Definition: glext.h:7739
static const struct control_event control_events[]
Definition: dialog.c:4570
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static HWND dialog
Definition: gui.c:33
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:1719
Definition: mk_font.cpp:20
#define TRUE
Definition: types.h:120
const WCHAR * text
Definition: package.c:1827
#define MAKELPARAM(l, h)
Definition: winuser.h:3983
#define PBM_SETPOS
Definition: commctrl.h:2184
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
Definition: muldiv.c:25
static LPWSTR msi_dialog_get_style(LPCWSTR p, LPCWSTR *rest)
Definition: dialog.c:270
#define PBM_SETRANGE
Definition: commctrl.h:2183
#define FALSE
Definition: types.h:117
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:111
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:1757
static const WCHAR szEmpty[]
Definition: provider.c:50
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
#define NULL
Definition: types.h:112
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
void msi_dialog_check_messages(HANDLE handle)
Definition: dialog.c:3986

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
__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
#define NULL
Definition: types.h:112
static HWND dialog
Definition: gui.c:33
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c: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 3901 of file dialog.c.

3902 {
3903  WNDCLASSW cls;
3904 
3905  ZeroMemory( &cls, sizeof cls );
3907  cls.hInstance = NULL;
3909  cls.hCursor = LoadCursorW(0, (LPWSTR)IDC_ARROW);
3910  cls.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1);
3911  cls.lpszMenuName = NULL;
3913 
3914  if( !RegisterClassW( &cls ) )
3915  return FALSE;
3916 
3919 
3920  if( !RegisterClassW( &cls ) )
3921  return FALSE;
3922 
3924 
3926  0, 0, 100, 100, NULL, NULL, NULL, NULL );
3927  if( !hMsiHiddenWindow )
3928  return FALSE;
3929 
3930  return TRUE;
3931 }
LPCWSTR lpszMenuName
Definition: winuser.h:3159
static DWORD uiThreadId
Definition: dialog.c:171
#define TRUE
Definition: types.h:120
#define ZeroMemory
Definition: winbase.h:1664
#define IDI_APPLICATION
Definition: winuser.h:699
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4291
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
#define COLOR_3DFACE
Definition: winuser.h:919
static const WCHAR szMsiHiddenWindow[]
Definition: dialog.c:134
#define FALSE
Definition: types.h:117
WNDPROC lpfnWndProc
Definition: winuser.h:3152
LPCWSTR lpszClassName
Definition: winuser.h:3160
DWORD WINAPI GetCurrentThreadId(VOID)
Definition: thread.c:458
#define WS_OVERLAPPED
Definition: pedump.c:615
static LRESULT WINAPI MSIHiddenWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: dialog.c:3883
HICON hIcon
Definition: winuser.h:3156
static HWND hMsiHiddenWindow
Definition: dialog.c:172
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2074
HCURSOR hCursor
Definition: winuser.h:3157
static const WCHAR szMsiDialogClass[]
Definition: dialog.c:133
HBRUSH hbrBackground
Definition: winuser.h:3158
#define NULL
Definition: types.h:112
HINSTANCE hInstance
Definition: winuser.h:3155
#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:3781

Referenced by dialog_create().

◆ dialog_run_message_loop()

static UINT dialog_run_message_loop ( msi_dialog dialog)
static

Definition at line 3841 of file dialog.c.

3842 {
3843  DWORD style;
3844  HWND hwnd;
3845 
3846  if( uiThreadId != GetCurrentThreadId() )
3848 
3849  /* create the dialog window, don't show it yet */
3851  if( dialog->attributes & msidbDialogAttributesVisible )
3852  style |= WS_VISIBLE;
3853 
3854  if (dialog->parent == NULL && (dialog->attributes & msidbDialogAttributesMinimize))
3855  style |= WS_MINIMIZEBOX;
3856 
3859  NULL, NULL, NULL, dialog );
3860  if( !hwnd )
3861  {
3862  ERR("Failed to create dialog %s\n", debugstr_w( dialog->name ));
3863  return ERROR_FUNCTION_FAILED;
3864  }
3865 
3866  ShowWindow( hwnd, SW_SHOW );
3867  /* UpdateWindow( hwnd ); - and causes the transparent static controls not to paint */
3868 
3869  if( dialog->attributes & msidbDialogAttributesModal )
3870  {
3871  while( !dialog->finished )
3872  {
3875  }
3876  }
3877  else
3878  return ERROR_IO_PENDING;
3879 
3880  return ERROR_SUCCESS;
3881 }
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:4291
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
#define debugstr_w
Definition: kernel32.h:32
#define CW_USEDEFAULT
Definition: winuser.h:225
LONG_PTR LPARAM
Definition: windef.h:208
#define SW_SHOW
Definition: winuser.h:769
DWORD WINAPI GetCurrentThreadId(VOID)
Definition: thread.c:458
#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:110
static HWND hwnd[MAXHWNDS]
Definition: dialog.c:44
static void process_pending_messages(HWND hdlg)
Definition: dialog.c:3829
#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)
#define NULL
Definition: types.h:112
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 3771 of file dialog.c.

3772 {
3773  HWND hwnd = dialog->hWndFocus;
3774 
3775  hwnd = GetNextDlgTabItem( dialog->hwnd, hwnd, TRUE);
3776  hwnd = GetNextDlgTabItem( dialog->hwnd, hwnd, FALSE);
3777  SetFocus( hwnd );
3778  dialog->hWndFocus = hwnd;
3779 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
HWND WINAPI GetNextDlgTabItem(HWND hDlg, HWND hCtl, BOOL bPrevious)
Definition: dialog.c:2398
#define TRUE
Definition: types.h:120
HWND WINAPI SetFocus(_In_opt_ HWND)
#define FALSE
Definition: types.h:117
static HWND hwnd[MAXHWNDS]
Definition: dialog.c:44
static HWND dialog
Definition: gui.c:33

Referenced by MSIDialog_WndProc().

◆ event_add_local()

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

Definition at line 4387 of file dialog.c.

4388 {
4390 
4391  LIST_FOR_EACH_ENTRY( feature, &dialog->package->features, MSIFEATURE, entry )
4392  {
4393  if (!strcmpW( argument, feature->Feature ) || !strcmpW( argument, szAll ))
4394  {
4395  if (feature->ActionRequest != INSTALLSTATE_LOCAL)
4396  msi_set_property( dialog->package->db, szPreselected, szOne, -1 );
4397  MSI_SetFeatureStateW( dialog->package, feature->Feature, INSTALLSTATE_LOCAL );
4398  }
4399  }
4400  return ERROR_SUCCESS;
4401 }
static const WCHAR szPreselected[]
Definition: msipriv.h:1116
INTERNETFEATURELIST feature
Definition: misc.c:1719
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 4419 of file dialog.c.

4420 {
4422 
4423  LIST_FOR_EACH_ENTRY( feature, &dialog->package->features, MSIFEATURE, entry )
4424  {
4425  if (!strcmpW( argument, feature->Feature ) || !strcmpW( argument, szAll ))
4426  {
4427  if (feature->ActionRequest != INSTALLSTATE_SOURCE)
4428  msi_set_property( dialog->package->db, szPreselected, szOne, -1 );
4429  MSI_SetFeatureStateW( dialog->package, feature->Feature, INSTALLSTATE_SOURCE );
4430  }
4431  }
4432  return ERROR_SUCCESS;
4433 }
static const WCHAR szPreselected[]
Definition: msipriv.h:1116
INTERNETFEATURELIST feature
Definition: misc.c:1719
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 4040 of file dialog.c.

4041 {
4042  struct list *item, *next;
4043 
4044  LIST_FOR_EACH_SAFE( item, next, &package->subscriptions )
4045  {
4046  struct subscriber *sub = LIST_ENTRY( item, struct subscriber, entry );
4047 
4048  if (strcmpW( sub->dialog->name, dialog )) continue;
4049  list_remove( &sub->entry );
4050  free_subscriber( sub );
4051  }
4052 }
#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:4032
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 4533 of file dialog.c.

4534 {
4536 }
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 4381 of file dialog.c.

4382 {
4383  ACTION_PerformAction( dialog->package, argument, SCRIPT_NONE );
4384  return ERROR_SUCCESS;
4385 }
#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 4263 of file dialog.c.

4264 {
4265  msi_dialog *dialog;
4266  UINT r;
4267  INT retval;
4268 
4269  /* create a new dialog */
4271  if (dialog)
4272  {
4273  /* kill the current modeless dialog */
4274  if (destroy_modeless && package->dialog)
4275  {
4276  msi_dialog_destroy( package->dialog );
4277  package->dialog = NULL;
4278  }
4279 
4280  /* modeless dialogs return an error message */
4282  if (r == ERROR_SUCCESS)
4283  {
4284  retval = dialog->retval;
4286  return retval;
4287  }
4288  else
4289  {
4290  package->dialog = dialog;
4291  return IDOK;
4292  }
4293  }
4294  else return 0;
4295 }
#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:3933
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:4054
int32_t INT
Definition: typedefs.h:58
r parent
Definition: btrfs.c:2944
static UINT dialog_event_handler(msi_dialog *, const WCHAR *, const WCHAR *)
Definition: dialog.c:4591
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static UINT dialog_run_message_loop(msi_dialog *dialog)
Definition: dialog.c:3841
static HWND dialog
Definition: gui.c:33
Definition: name.c:38

Referenced by ACTION_DialogBox(), and event_spawn_dialog().

◆ event_end_dialog()

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

Definition at line 4298 of file dialog.c.

4299 {
4300  static const WCHAR exitW[] = {'E','x','i','t',0};
4301  static const WCHAR retryW[] = {'R','e','t','r','y',0};
4302  static const WCHAR ignoreW[] = {'I','g','n','o','r','e',0};
4303  static const WCHAR returnW[] = {'R','e','t','u','r','n',0};
4304 
4305  if (!strcmpW( argument, exitW ))
4306  dialog->retval = IDCANCEL;
4307  else if (!strcmpW( argument, retryW ))
4308  dialog->retval = IDRETRY;
4309  else if (!strcmpW( argument, ignoreW ))
4310  dialog->retval = IDOK;
4311  else if (!strcmpW( argument, returnW ))
4312  dialog->retval = 0;
4313  else
4314  {
4315  ERR("Unknown argument string %s\n", debugstr_w(argument));
4316  dialog->retval = IDABORT;
4317  }
4318  event_cleanup_subscriptions( dialog->package, dialog->name );
4320  return ERROR_SUCCESS;
4321 }
#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:4040
#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:52
#define ERR(fmt,...)
Definition: debug.h:110
static HWND dialog
Definition: gui.c:33
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:3979
#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 4332 of file dialog.c.

4333 {
4334  /* store the name of the next dialog, and signal this one to end */
4335  dialog->package->next_dialog = strdupW( argument );
4338  return ERROR_SUCCESS;
4339 }
#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:4107
static HWND dialog
Definition: gui.c:33
static void msi_dialog_end_dialog(msi_dialog *dialog)
Definition: dialog.c:3979

Referenced by pending_event_new_dialog().

◆ event_reinstall()

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

Definition at line 4543 of file dialog.c.

4544 {
4545  return msi_set_property( dialog->package->db, szReinstall, argument, -1 );
4546 }
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 4538 of file dialog.c.

4539 {
4540  return msi_set_property( dialog->package->db, szReinstallMode, argument, -1 );
4541 }
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 4403 of file dialog.c.

4404 {
4406 
4407  LIST_FOR_EACH_ENTRY( feature, &dialog->package->features, MSIFEATURE, entry )
4408  {
4409  if (!strcmpW( argument, feature->Feature ) || !strcmpW( argument, szAll ))
4410  {
4411  if (feature->ActionRequest != INSTALLSTATE_ABSENT)
4412  msi_set_property( dialog->package->db, szPreselected, szOne, -1 );
4413  MSI_SetFeatureStateW( dialog->package, feature->Feature, INSTALLSTATE_ABSENT );
4414  }
4415  }
4416  return ERROR_SUCCESS;
4417 }
static const WCHAR szPreselected[]
Definition: msipriv.h:1116
INTERNETFEATURELIST feature
Definition: misc.c:1719
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 4466 of file dialog.c.

4467 {
4469  return ERROR_SUCCESS;
4470 }
#define ERROR_SUCCESS
Definition: deptool.c:10
static UINT msi_dialog_reset(msi_dialog *dialog)
Definition: dialog.c:3528
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 4525 of file dialog.c.

4526 {
4527  int level = atolW( argument );
4528 
4529  TRACE("setting install level to %d\n", level);
4530  return MSI_SetInstallLevel( dialog->package, level );
4531 }
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 4448 of file dialog.c.

4449 {
4450  WCHAR *path = msi_dup_property( dialog->package->db, argument );
4451  MSIRECORD *rec = MSI_CreateRecord( 1 );
4452  UINT r = ERROR_SUCCESS;
4453 
4454  MSI_RecordSetStringW( rec, 1, path );
4455  msi_event_fire( dialog->package, szSelectionPath, rec );
4456  if (path)
4457  {
4458  /* failure to set the path halts the executing of control events */
4459  r = MSI_SetTargetPathW( dialog->package, argument, path );
4460  msi_free( path );
4461  }
4462  msi_free( &rec->hdr );
4463  return r;
4464 }
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:4435
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
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 4350 of file dialog.c.

4351 {
4352  INT r;
4353  /* don't destroy a modeless dialogs that might be our parent */
4354  r = event_do_dialog( dialog->package, argument, dialog, FALSE );
4355  if (r != 0)
4356  {
4357  dialog->retval = r;
4359  }
4360  else
4362 
4363  return ERROR_SUCCESS;
4364 }
#define ERROR_SUCCESS
Definition: deptool.c:10
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
int32_t INT
Definition: typedefs.h:58
#define FALSE
Definition: types.h:117
static void msi_dialog_update_all_controls(msi_dialog *dialog)
Definition: dialog.c:565
static INT event_do_dialog(MSIPACKAGE *package, const WCHAR *name, msi_dialog *parent, BOOL destroy_modeless)
Definition: dialog.c:4263
static HWND dialog
Definition: gui.c:33
static void msi_dialog_end_dialog(msi_dialog *dialog)
Definition: dialog.c:3979

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

4376 {
4377  FIXME("doing nothing\n");
4378  return ERROR_SUCCESS;
4379 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define FIXME(fmt,...)
Definition: debug.h:111

◆ event_subscribe()

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

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

4549 {
4550  return msi_validate_product_id( dialog->package );
4551 }
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 4032 of file dialog.c.

4033 {
4034  msi_free( sub->event );
4035  msi_free( sub->control );
4036  msi_free( sub->attribute );
4037  msi_free( sub );
4038 }
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
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
static const WCHAR dc[]
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78

Referenced by dialog_map_events().

◆ MSI_ClosePreview()

static void MSI_ClosePreview ( MSIOBJECTHDR arg)
static

Definition at line 4119 of file dialog.c.

4120 {
4122  msiobj_release( &preview->package->hdr );
4123 }
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:1948
Definition: pdh_main.c:93
#define ERROR_SUCCESS
Definition: deptool.c:10
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
static WCHAR * strdupW(const WCHAR *src)
Definition: main.c:92
const WCHAR * text
Definition: package.c:1827
#define CB_ADDSTRING
Definition: winuser.h:1918
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
__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
#define NULL
Definition: types.h:112
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:607
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
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
#define NULL
Definition: types.h:112
static HWND dialog
Definition: gui.c:33
Definition: name.c:38
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 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
#define TRUE
Definition: types.h:120
LONG lfHeight
Definition: dimm.idl:59
static HDC
Definition: imagelist.c:92
__WINE_SERVER_LIST_INLINE void list_add_head(struct list *list, struct list *elem)
Definition: list.h:96
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
Definition: muldiv.c:25
int32_t INT
Definition: typedefs.h:58
#define lstrcpynW
Definition: compat.h:597
#define debugstr_w
Definition: kernel32.h:32
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:482
#define TRACE(s)
Definition: solgame.cpp:4
GLfloat param
Definition: glext.h:5796
WORD face[3]
Definition: mesh.c:4747
HDC hdc
Definition: main.c:9
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
int MSI_RecordGetInteger(MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c: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:255
BYTE lfItalic
Definition: dimm.idl:64
static HWND dialog
Definition: gui.c:33
Definition: name.c:38
WCHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:72
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h: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
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 3587 of file dialog.c.

3588 {
3589  static const WCHAR szScreenX[] = {'S','c','r','e','e','n','X',0};
3590  static const WCHAR szScreenY[] = {'S','c','r','e','e','n','Y',0};
3591 
3592  UINT xres, yres;
3593  POINT center;
3594  SIZE sz;
3595  LONG style;
3596 
3597  center.x = MSI_RecordGetInteger( rec, 2 );
3598  center.y = MSI_RecordGetInteger( rec, 3 );
3599 
3600  sz.cx = MSI_RecordGetInteger( rec, 4 );
3601  sz.cy = MSI_RecordGetInteger( rec, 5 );
3602 
3603  sz.cx = msi_dialog_scale_unit( dialog, sz.cx );
3604  sz.cy = msi_dialog_scale_unit( dialog, sz.cy );
3605 
3606  xres = msi_get_property_int( dialog->package->db, szScreenX, 0 );
3607  yres = msi_get_property_int( dialog->package->db, szScreenY, 0 );
3608 
3609  center.x = MulDiv( center.x, xres, 100 );
3610  center.y = MulDiv( center.y, yres, 100 );
3611 
3612  /* turn the client pos into the window rectangle */
3613  if (dialog->package->center_x && dialog->package->center_y)
3614  {
3615  pos->left = dialog->package->center_x - sz.cx / 2.0;
3616  pos->right = pos->left + sz.cx;
3617  pos->top = dialog->package->center_y - sz.cy / 2.0;
3618  pos->bottom = pos->top + sz.cy;
3619  }
3620  else
3621  {
3622  pos->left = center.x - sz.cx/2;
3623  pos->right = pos->left + sz.cx;
3624  pos->top = center.y - sz.cy/2;
3625  pos->bottom = pos->top + sz.cy;
3626 
3627  /* save the center */
3628  dialog->package->center_x = center.x;
3629  dialog->package->center_y = center.y;
3630  }
3631 
3632  dialog->size.cx = sz.cx;
3633  dialog->size.cy = sz.cy;
3634 
3635  TRACE("%s\n", wine_dbgstr_rect(pos));
3636 
3639 }
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:4804
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
Definition: muldiv.c:25
BOOL WINAPI AdjustWindowRect(_Inout_ LPRECT, _In_ DWORD, _In_ BOOL)
#define FALSE
Definition: types.h:117
long LONG
Definition: pedump.c:60
LONG cx
Definition: windef.h:334
#define TRACE(s)
Definition: solgame.cpp:4
__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:335

Referenced by msi_dialog_oncreate().

◆ msi_dialog_bitmap_control()

static UINT msi_dialog_bitmap_control ( msi_dialog dialog,
MSIRECORD rec 
)
static

Definition at line 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:585
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:110
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
unsigned int UINT
Definition: ndis.h:50
#define IMAGE_BITMAP
Definition: winuser.h:211
#define STM_SETIMAGE
Definition: winuser.h:2075
static HWND dialog
Definition: gui.c:33
_Out_opt_ int * cx
Definition: commctrl.h:585
static BOOL msi_free(void *mem)
Definition: msipriv.h:1227
Definition: name.c:38
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
#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
#define NULL
Definition: types.h:112
static HWND dialog
Definition: gui.c:33
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c: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:1904
#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:110
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:38
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
__wchar_t WCHAR
Definition: xmlstorage.h:180
GLfloat param
Definition: glext.h:5796
#define BN_CLICKED
Definition: winuser.h:1907
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:242
#define ERR(fmt,...)
Definition: debug.h:110
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static HWND dialog
Definition: gui.c:33
static BOOL msi_free(void *mem)
Definition: msipriv.h:1227
#define HIWORD(l)
Definition: typedefs.h:247
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c: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 3986 of file dialog.c.

3987 {
3988  DWORD r;
3989 
3990  /* in threads other than the UI thread, block */
3991  if( uiThreadId != GetCurrentThreadId() )
3992  {
3993  if (!handle) return;
3995  {
3996  MSG msg;
3997  while (PeekMessageW( &msg, NULL, 0, 0, PM_REMOVE ))
3998  {
3999  TranslateMessage( &msg );
4000  DispatchMessageW( &msg );
4001  }
4002  }
4003  return;
4004  }
4005 
4006  /* there are two choices for the UI thread */
4007  while (1)
4008  {
4010 
4011  if( !handle )
4012  break;
4013 
4014  /*
4015  * block here until somebody creates a new dialog or
4016  * the handle we're waiting on becomes ready
4017  */
4019  if( r == WAIT_OBJECT_0 )
4020  break;
4021  }
4022 }
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 *)
DWORD WINAPI GetCurrentThreadId(VOID)
Definition: thread.c:458
#define WAIT_OBJECT_0
Definition: winbase.h:403
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD WINAPI MsgWaitForMultipleObjects(_In_ DWORD nCount, _In_reads_opt_(nCount) CONST HANDLE *pHandles, _In_ BOOL fWaitAll, _In_ DWORD dwMilliseconds, _In_ DWORD dwWakeMask)
static void process_pending_messages(HWND hdlg)
Definition: dialog.c:3829
#define QS_ALLINPUT
Definition: winuser.h:874
#define NULL
Definition: types.h:112
#define msg(x)
Definition: auth_time.c:54
BOOL WINAPI PeekMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
#define PM_REMOVE
Definition: winuser.h: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:1907
static int state
Definition: maze.c:121
unsigned int UINT
Definition: ndis.h:50
static HWND dialog
Definition: gui.c:33
#define HIWORD(l)
Definition: typedefs.h:247

Referenced by msi_dialog_checkbox_control().

◆ msi_dialog_checkbox_sync_state()

static void msi_dialog_checkbox_sync_state ( msi_dialog dialog,
msi_control control 
)
static

Definition at line 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:1903
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
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
#define FALSE
Definition: types.h:117
#define CBS_DROPDOWNLIST
Definition: winuser.h:284
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c: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
struct _test_info info[]
Definition: SetCursorPos.c:19
#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:2881
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
#define NULL
Definition: types.h:112
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:5321
Arabic default style
Definition: afstyles.h:93
#define WC_COMBOBOXW
Definition: commctrl.h:4717

◆ msi_dialog_combobox_handler()

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

Definition at line 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 }
Definition: pdh_main.c:93
#define ERROR_SUCCESS
Definition: deptool.c:10
#define CB_GETITEMDATA
Definition: winuser.h:1932
#define CB_GETCURSEL
Definition: winuser.h:1925
GLuint index
Definition: glext.h:6031
#define CB_ERR
Definition: winuser.h:2410
LPWSTR property
Definition: dialog.c:66
#define CBN_EDITCHANGE
Definition: winuser.h:1957
GLfloat param
Definition: glext.h:5796
struct _test_info info[]
Definition: SetCursorPos.c:19
#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:1961
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:247
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 }
Definition: pdh_main.c:93
#define CB_GETITEMDATA
Definition: winuser.h:1932
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
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
struct _test_info info[]
Definition: SetCursorPos.c:19
GLsizei const GLfloat * value
Definition: glext.h:6069
#define CB_SETCURSEL
Definition: winuser.h:1943
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:10
MSICONDITION MSI_EvaluateConditionW(MSIPACKAGE *, LPCWSTR) DECLSPEC_HIDDEN
GLenum condition
Definition: glext.h:9255
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c: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
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 3484 of file dialog.c.

3485 {
3486  msi_dialog *dialog = param;
3488  UINT i;
3489 
3490  /* find and call the function that can create this type of control */
3491  control_type = MSI_RecordGetString( rec, 3 );
3492  for( i=0; i<NUM_CONTROL_TYPES; i++ )
3494  break;
3495  if( i != NUM_CONTROL_TYPES )
3496  msi_dialog_handler[i].func( dialog, rec );
3497  else
3498  ERR("no handler for element type %s\n", debugstr_w(control_type));
3499 
3500  return ERROR_SUCCESS;
3501 }
#define ERROR_SUCCESS
Definition: deptool.c:10
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define NUM_CONTROL_TYPES
Definition: dialog.c:3482
static const char * control_type(DWORD dwControlType)
Definition: mixer.c:110
static const struct control_handler msi_dialog_handler[]
Definition: dialog.c:3457
#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:110
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
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:1903
#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:38
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 4054 of file dialog.c.

4055 {
4056  msi_font *font, *next;
4057 
4058  if( uiThreadId != GetCurrentThreadId() )
4059  {
4061  return;
4062  }
4063 
4064  if( dialog->hwnd )
4065  ShowWindow( dialog->hwnd, SW_HIDE );
4066 
4067  if( dialog->hwnd )
4068  DestroyWindow( dialog->hwnd );
4069 
4070  /* unsubscribe events */
4071  event_cleanup_subscriptions( dialog->package, dialog->name );
4072 
4073  /* destroy the list of controls */
4074  while( !list_empty( &dialog->controls ) )
4075  {
4076  msi_control *t;
4077 
4078  t = LIST_ENTRY( list_head( &dialog->controls ),
4079  msi_control, entry );
4081  }
4082 
4083  /* destroy the list of fonts */
4085  {
4086  list_remove( &font->entry );
4087  DeleteObject( font->hfont );
4088  msi_free( font );
4089  }
4090  msi_free( dialog->default_font );
4091 
4092  msi_free( dialog->control_default );
4093  msi_free( dialog->control_cancel );
4094  dialog->package = NULL;
4095  msi_free( dialog );
4096 }
#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:4040
BOOL WINAPI DestroyWindow(_In_ HWND)
__WINE_SERVER_LIST_INLINE struct list * list_head(const struct list *list)
Definition: list.h:131
LONG_PTR LPARAM
Definition: windef.h:208
DWORD WINAPI GetCurrentThreadId(VOID)
Definition: thread.c:458
__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)
#define NULL
Definition: types.h:112
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 FALSE
Definition: types.h:117
#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:4717

◆ 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 */