ReactOS  0.4.15-dev-3326-ga91f5e8
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 1787 of file dialog.c.

◆ MAX_NUM_DIGITS

#define MAX_NUM_DIGITS   11

Definition at line 1744 of file dialog.c.

◆ NONAMELESSUNION

#define NONAMELESSUNION

Definition at line 23 of file dialog.c.

◆ NUM_CONTROL_TYPES

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

4520 {
4521  INT r;
4522 
4523  if (package->next_dialog) ERR("Already got next dialog... ignoring it\n");
4524  package->next_dialog = NULL;
4525 
4526  /* Dialogs are chained through NewDialog, which sets the next_dialog member.
4527  * We fall out of the loop if we reach a modeless dialog, which immediately
4528  * returns IDOK, or an EndDialog event, which returns the value corresponding
4529  * to its argument.
4530  */
4531  r = event_do_dialog( package, dialog, NULL, TRUE );
4532  while (package->next_dialog)
4533  {
4534  WCHAR *name = package->next_dialog;
4535 
4536  package->next_dialog = NULL;
4537  r = event_do_dialog( package, name, NULL, TRUE );
4538  msi_free( name );
4539  }
4540  return r;
4541 }
#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:4281
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 4490 of file dialog.c.

4491 {
4492  static const WCHAR szDialog[] = {'D','i','a','l','o','g',0};
4493  MSIRECORD *row;
4494  INT rc;
4495 
4496  if (!TABLE_Exists(package->db, szDialog)) return 0;
4497 
4498  row = MSI_CreateRecord(0);
4499  if (!row) return -1;
4502  msiobj_release(&row->hdr);
4503 
4504  if (rc == -2) rc = 0;
4505 
4506  if (!rc)
4507  {
4509  if (!row) return -1;
4510  MSI_RecordSetInteger(row, 1, 2726);
4513 
4514  msiobj_release(&row->hdr);
4515  }
4516  return rc;
4517 }
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 3951 of file dialog.c.

3953 {
3954  static const WCHAR szDialogCreated[] =
3955  {'D','i','a','l','o','g',' ','c','r','e','a','t','e','d',0};
3956  MSIRECORD *rec = NULL;
3957  msi_dialog *dialog;
3958 
3959  TRACE("%s\n", debugstr_w(name));
3960 
3962 
3963  /* allocate the structure for the dialog to use */
3965  if( !dialog )
3966  return NULL;
3967  strcpyW( dialog->name, name );
3968  dialog->parent = parent;
3969  dialog->package = package;
3970  dialog->event_handler = event_handler;
3971  dialog->finished = 0;
3972  list_init( &dialog->controls );
3973  list_init( &dialog->fonts );
3974 
3975  /* verify that the dialog exists */
3976  rec = msi_get_dialog_record( dialog );
3977  if( !rec )
3978  {
3979  msi_free( dialog );
3980  return NULL;
3981  }
3982  dialog->attributes = MSI_RecordGetInteger( rec, 6 );
3983  dialog->control_default = strdupW( MSI_RecordGetString( rec, 9 ) );
3984  dialog->control_cancel = strdupW( MSI_RecordGetString( rec, 10 ) );
3985  msiobj_release( &rec->hdr );
3986 
3987  rec = MSI_CreateRecord(2);
3988  if (!rec) return NULL;
3989  MSI_RecordSetStringW(rec, 1, name);
3990  MSI_RecordSetStringW(rec, 2, szDialogCreated);
3992  msiobj_release(&rec->hdr);
3993 
3994  return dialog;
3995 }
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:3572
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:3919
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 416 of file dialog.c.

419 {
420  DWORD x, y, width, height;
421  LPWSTR font = NULL, title_font = NULL;
422  LPCWSTR title = NULL;
423  msi_control *control;
424 
425  style |= WS_CHILD;
426 
427  control = msi_alloc( FIELD_OFFSET( msi_control, name[strlenW( name ) + 1] ));
428  if (!control)
429  return NULL;
430 
431  strcpyW( control->name, name );
432  list_add_tail( &dialog->controls, &control->entry );
433  control->handler = NULL;
434  control->update = NULL;
435  control->property = NULL;
436  control->value = NULL;
437  control->hBitmap = NULL;
438  control->hIcon = NULL;
439  control->hDll = NULL;
440  control->tabnext = strdupW( MSI_RecordGetString( rec, 11) );
441  control->type = strdupW( MSI_RecordGetString( rec, 3 ) );
442  control->progress_current = 0;
443  control->progress_max = 100;
444  control->progress_backwards = FALSE;
445 
446  x = MSI_RecordGetInteger( rec, 4 );
447  y = MSI_RecordGetInteger( rec, 5 );
448  width = MSI_RecordGetInteger( rec, 6 );
449  height = MSI_RecordGetInteger( rec, 7 );
450 
455 
456  if( text )
457  {
458  deformat_string( dialog->package, text, &title_font );
459  font = msi_dialog_get_style( title_font, &title );
460  }
461 
462  control->hwnd = CreateWindowExW( exstyle, szCls, title, style,
463  x, y, width, height, parent, NULL, NULL, NULL );
464 
465  TRACE("Dialog %s control %s hwnd %p\n",
466  debugstr_w(dialog->name), debugstr_w(text), control->hwnd );
467 
468  msi_dialog_set_font( dialog, control->hwnd,
469  font ? font : dialog->default_font );
470 
471  msi_free( title_font );
472  msi_free( font );
473 
474  return control;
475 }
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:197
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:274
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:368
#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 4042 of file dialog.c.

4043 {
4044  TRACE("\n");
4045  dialog->attributes |= msidbDialogAttributesVisible;
4046  dialog->attributes &= ~msidbDialogAttributesModal;
4048 }
#define TRACE(s)
Definition: solgame.cpp:4
static UINT dialog_run_message_loop(msi_dialog *dialog)
Definition: dialog.c:3848
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 4609 of file dialog.c.

4610 {
4611  unsigned int i;
4612 
4613  TRACE("handling event %s\n", debugstr_w(event));
4614 
4615  if (!event) return ERROR_SUCCESS;
4616 
4617  for (i = 0; control_events[i].event; i++)
4618  {
4619  if (!strcmpW( control_events[i].event, event ))
4620  return control_events[i].handler( dialog, argument );
4621  }
4622  FIXME("unhandled event %s arg(%s)\n", debugstr_w(event), debugstr_w(argument));
4623  return ERROR_SUCCESS;
4624 }
#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:4588
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 613 of file dialog.c.

615 {
616  msi_control* ctrl;
617 
618  ctrl = msi_dialog_find_control( dialog, control );
619  if (!ctrl)
620  return;
621  if( !strcmpW( attribute, szText ) )
622  {
623  const WCHAR *font_text, *text = NULL;
624  WCHAR *font, *text_fmt = NULL;
625 
626  font_text = MSI_RecordGetString( rec , 1 );
627  font = msi_dialog_get_style( font_text, &text );
628  deformat_string( dialog->package, text, &text_fmt );
629  if (text_fmt) text = text_fmt;
630  else text = szEmpty;
631 
632  SetWindowTextW( ctrl->hwnd, text );
633 
634  msi_free( font );
635  msi_free( text_fmt );
637  }
638  else if( !strcmpW( attribute, szProgress ) )
639  {
640  DWORD func, val1, val2, units;
641 
642  func = MSI_RecordGetInteger( rec, 1 );
643  val1 = MSI_RecordGetInteger( rec, 2 );
644  val2 = MSI_RecordGetInteger( rec, 3 );
645 
646  TRACE("progress: func %u val1 %u val2 %u\n", func, val1, val2);
647 
648  units = val1 / 512;
649  switch (func)
650  {
651  case 0: /* init */
652  SendMessageW( ctrl->hwnd, PBM_SETRANGE, 0, MAKELPARAM(0,100) );
653  if (val2)
654  {
655  ctrl->progress_max = units ? units : 100;
656  ctrl->progress_current = units;
657  ctrl->progress_backwards = TRUE;
658  SendMessageW( ctrl->hwnd, PBM_SETPOS, 100, 0 );
659  }
660  else
661  {
662  ctrl->progress_max = units ? units : 100;
663  ctrl->progress_current = 0;
664  ctrl->progress_backwards = FALSE;
665  SendMessageW( ctrl->hwnd, PBM_SETPOS, 0, 0 );
666  }
667  break;
668  case 1: /* action data increment */
669  if (val2) dialog->package->action_progress_increment = val1;
670  else dialog->package->action_progress_increment = 0;
671  break;
672  case 2: /* move */
673  if (ctrl->progress_backwards)
674  {
675  if (units >= ctrl->progress_current) ctrl->progress_current -= units;
676  else ctrl->progress_current = 0;
677  }
678  else
679  {
680  if (ctrl->progress_current + units < ctrl->progress_max) ctrl->progress_current += units;
681  else ctrl->progress_current = ctrl->progress_max;
682  }
683  SendMessageW( ctrl->hwnd, PBM_SETPOS, MulDiv(100, ctrl->progress_current, ctrl->progress_max), 0 );
684  break;
685  case 3: /* add */
686  ctrl->progress_max += units;
687  break;
688  default:
689  FIXME("Unknown progress message %u\n", func);
690  break;
691  }
692  }
693  else if ( !strcmpW( attribute, szProperty ) )
694  {
696  if (feature) msi_dialog_set_property( dialog->package, ctrl->property, feature->Directory );
697  }
698  else if ( !strcmpW( attribute, szSelectionPath ) )
699  {
702  if (!path) return;
703  SetWindowTextW( ctrl->hwnd, path );
704  msi_free(path);
705  }
706  else
707  {
708  FIXME("Attribute %s not being set\n", debugstr_w(attribute));
709  return;
710  }
711 }
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:3984
#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:274
#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:202
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:607
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:252
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:580
void msi_dialog_check_messages(HANDLE handle)
Definition: dialog.c:4004

Referenced by msi_event_fire().

◆ dialog_map_events()

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

Definition at line 755 of file dialog.c.

756 {
757  static const WCHAR queryW[] =
758  {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
759  '`','E','v','e','n','t','M','a','p','p','i','n','g','`',' ',
760  'W','H','E','R','E',' ','`','D','i','a','l','o','g','_','`',' ','=',' ','\'','%','s','\'',' ',
761  'A','N','D',' ','`','C','o','n','t','r','o','l','_','`',' ','=',' ','\'','%','s','\'',0};
762  MSIQUERY *view;
764  {
765  dialog,
766  control
767  };
768 
769  if (!MSI_OpenQuery( dialog->package->db, &view, queryW, dialog->name, control ))
770  {
772  msiobj_release( &view->hdr );
773  }
774 }
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:742
static UINT map_event(MSIRECORD *row, void *param)
Definition: dialog.c:745
#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 3919 of file dialog.c.

3920 {
3921  WNDCLASSW cls;
3922 
3923  ZeroMemory( &cls, sizeof cls );
3925  cls.hInstance = NULL;
3927  cls.hCursor = LoadCursorW(0, (LPWSTR)IDC_ARROW);
3928  cls.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1);
3929  cls.lpszMenuName = NULL;
3931 
3932  if( !RegisterClassW( &cls ) )
3933  return FALSE;
3934 
3937 
3938  if( !RegisterClassW( &cls ) )
3939  return FALSE;
3940 
3942 
3944  0, 0, 100, 100, NULL, NULL, NULL, NULL );
3945  if( !hMsiHiddenWindow )
3946  return FALSE;
3947 
3948  return TRUE;
3949 }
LPCWSTR lpszMenuName
Definition: winuser.h:3160
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:4292
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:3153
LPCWSTR lpszClassName
Definition: winuser.h:3161
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:3901
HICON hIcon
Definition: winuser.h:3157
static HWND hMsiHiddenWindow
Definition: dialog.c:172
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2074
HCURSOR hCursor
Definition: winuser.h:3158
static const WCHAR szMsiDialogClass[]
Definition: dialog.c:133
HBRUSH hbrBackground
Definition: winuser.h:3159
#define NULL
Definition: types.h:112
HINSTANCE hInstance
Definition: winuser.h:3156
#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:3785

Referenced by dialog_create().

◆ dialog_run_message_loop()

static UINT dialog_run_message_loop ( msi_dialog dialog)
static

Definition at line 3848 of file dialog.c.

3849 {
3850  DWORD style;
3851  HWND hwnd;
3852 
3853  if( uiThreadId != GetCurrentThreadId() )
3855 
3856  /* create the dialog window, don't show it yet */
3858  if( dialog->attributes & msidbDialogAttributesVisible )
3859  style |= WS_VISIBLE;
3860 
3861  if (dialog->parent == NULL && (dialog->attributes & msidbDialogAttributesMinimize))
3862  style |= WS_MINIMIZEBOX;
3863 
3864 #ifdef __REACTOS__
3867  hPrevious, NULL, NULL, dialog );
3868 #else
3871  NULL, NULL, NULL, dialog );
3872 #endif
3873 
3874  if( !hwnd )
3875  {
3876  ERR("Failed to create dialog %s\n", debugstr_w( dialog->name ));
3877  return ERROR_FUNCTION_FAILED;
3878  }
3879 
3880 #ifdef __REACTOS__
3881  hPrevious = hwnd;
3882 #endif
3883 
3884  ShowWindow( hwnd, SW_SHOW );
3885  /* UpdateWindow( hwnd ); - and causes the transparent static controls not to paint */
3886 
3887  if( dialog->attributes & msidbDialogAttributesModal )
3888  {
3889  while( !dialog->finished )
3890  {
3893  }
3894  }
3895  else
3896  return ERROR_IO_PENDING;
3897 
3898  return ERROR_SUCCESS;
3899 }
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:4292
#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:3836
#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 3775 of file dialog.c.

3776 {
3777  HWND hwnd = dialog->hWndFocus;
3778 
3779  hwnd = GetNextDlgTabItem( dialog->hwnd, hwnd, TRUE);
3780  hwnd = GetNextDlgTabItem( dialog->hwnd, hwnd, FALSE);
3781  SetFocus( hwnd );
3782  dialog->hWndFocus = hwnd;
3783 }
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 4405 of file dialog.c.

4406 {
4408 
4409  LIST_FOR_EACH_ENTRY( feature, &dialog->package->features, MSIFEATURE, entry )
4410  {
4411  if (!strcmpW( argument, feature->Feature ) || !strcmpW( argument, szAll ))
4412  {
4413  if (feature->ActionRequest != INSTALLSTATE_LOCAL)
4414  msi_set_property( dialog->package->db, szPreselected, szOne, -1 );
4415  MSI_SetFeatureStateW( dialog->package, feature->Feature, INSTALLSTATE_LOCAL );
4416  }
4417  }
4418  return ERROR_SUCCESS;
4419 }
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 4437 of file dialog.c.

4438 {
4440 
4441  LIST_FOR_EACH_ENTRY( feature, &dialog->package->features, MSIFEATURE, entry )
4442  {
4443  if (!strcmpW( argument, feature->Feature ) || !strcmpW( argument, szAll ))
4444  {
4445  if (feature->ActionRequest != INSTALLSTATE_SOURCE)
4446  msi_set_property( dialog->package->db, szPreselected, szOne, -1 );
4447  MSI_SetFeatureStateW( dialog->package, feature->Feature, INSTALLSTATE_SOURCE );
4448  }
4449  }
4450  return ERROR_SUCCESS;
4451 }
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 4058 of file dialog.c.

4059 {
4060  struct list *item, *next;
4061 
4062  LIST_FOR_EACH_SAFE( item, next, &package->subscriptions )
4063  {
4064  struct subscriber *sub = LIST_ENTRY( item, struct subscriber, entry );
4065 
4066  if (strcmpW( sub->dialog->name, dialog )) continue;
4067  list_remove( &sub->entry );
4068  free_subscriber( sub );
4069  }
4070 }
#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:4050
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 4551 of file dialog.c.

4552 {
4554 }
static UINT msi_dialog_directorylist_up(msi_dialog *dialog)
Definition: dialog.c:3022
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 4399 of file dialog.c.

4400 {
4401  ACTION_PerformAction( dialog->package, argument, SCRIPT_NONE );
4402  return ERROR_SUCCESS;
4403 }
#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 4281 of file dialog.c.

4282 {
4283  msi_dialog *dialog;
4284  UINT r;
4285  INT retval;
4286 
4287  /* create a new dialog */
4289  if (dialog)
4290  {
4291  /* kill the current modeless dialog */
4292  if (destroy_modeless && package->dialog)
4293  {
4294  msi_dialog_destroy( package->dialog );
4295  package->dialog = NULL;
4296  }
4297 
4298  /* modeless dialogs return an error message */
4300  if (r == ERROR_SUCCESS)
4301  {
4302  retval = dialog->retval;
4304  return retval;
4305  }
4306  else
4307  {
4308  package->dialog = dialog;
4309  return IDOK;
4310  }
4311  }
4312  else return 0;
4313 }
#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:3951
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:4072
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:4609
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:3848
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 4316 of file dialog.c.

4317 {
4318  static const WCHAR exitW[] = {'E','x','i','t',0};
4319  static const WCHAR retryW[] = {'R','e','t','r','y',0};
4320  static const WCHAR ignoreW[] = {'I','g','n','o','r','e',0};
4321  static const WCHAR returnW[] = {'R','e','t','u','r','n',0};
4322 
4323  if (!strcmpW( argument, exitW ))
4324  dialog->retval = IDCANCEL;
4325  else if (!strcmpW( argument, retryW ))
4326  dialog->retval = IDRETRY;
4327  else if (!strcmpW( argument, ignoreW ))
4328  dialog->retval = IDOK;
4329  else if (!strcmpW( argument, returnW ))
4330  dialog->retval = 0;
4331  else
4332  {
4333  ERR("Unknown argument string %s\n", debugstr_w(argument));
4334  dialog->retval = IDABORT;
4335  }
4336  event_cleanup_subscriptions( dialog->package, dialog->name );
4338  return ERROR_SUCCESS;
4339 }
#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:4058
#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:3997
#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 4350 of file dialog.c.

4351 {
4352  /* store the name of the next dialog, and signal this one to end */
4353  dialog->package->next_dialog = strdupW( argument );
4356  return ERROR_SUCCESS;
4357 }
#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:4125
static HWND dialog
Definition: gui.c:33
static void msi_dialog_end_dialog(msi_dialog *dialog)
Definition: dialog.c:3997

Referenced by pending_event_new_dialog().

◆ event_reinstall()

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

Definition at line 4561 of file dialog.c.

4562 {
4563  return msi_set_property( dialog->package->db, szReinstall, argument, -1 );
4564 }
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 4556 of file dialog.c.

4557 {
4558  return msi_set_property( dialog->package->db, szReinstallMode, argument, -1 );
4559 }
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 4421 of file dialog.c.

4422 {
4424 
4425  LIST_FOR_EACH_ENTRY( feature, &dialog->package->features, MSIFEATURE, entry )
4426  {
4427  if (!strcmpW( argument, feature->Feature ) || !strcmpW( argument, szAll ))
4428  {
4429  if (feature->ActionRequest != INSTALLSTATE_ABSENT)
4430  msi_set_property( dialog->package->db, szPreselected, szOne, -1 );
4431  MSI_SetFeatureStateW( dialog->package, feature->Feature, INSTALLSTATE_ABSENT );
4432  }
4433  }
4434  return ERROR_SUCCESS;
4435 }
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 4484 of file dialog.c.

4485 {
4487  return ERROR_SUCCESS;
4488 }
#define ERROR_SUCCESS
Definition: deptool.c:10
static UINT msi_dialog_reset(msi_dialog *dialog)
Definition: dialog.c:3532
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 4543 of file dialog.c.

4544 {
4545  int level = atolW( argument );
4546 
4547  TRACE("setting install level to %d\n", level);
4548  return MSI_SetInstallLevel( dialog->package, level );
4549 }
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 4466 of file dialog.c.

4467 {
4468  WCHAR *path = msi_dup_property( dialog->package->db, argument );
4469  MSIRECORD *rec = MSI_CreateRecord( 1 );
4470  UINT r = ERROR_SUCCESS;
4471 
4472  MSI_RecordSetStringW( rec, 1, path );
4473  msi_event_fire( dialog->package, szSelectionPath, rec );
4474  if (path)
4475  {
4476  /* failure to set the path halts the executing of control events */
4477  r = MSI_SetTargetPathW( dialog->package, argument, path );
4478  msi_free( path );
4479  }
4480  msi_free( &rec->hdr );
4481  return r;
4482 }
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:4453
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 4368 of file dialog.c.

4369 {
4370  INT r;
4371  /* don't destroy a modeless dialogs that might be our parent */
4372  r = event_do_dialog( dialog->package, argument, dialog, FALSE );
4373  if (r != 0)
4374  {
4375  dialog->retval = r;
4377  }
4378  else
4380 
4381  return ERROR_SUCCESS;
4382 }
#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:569
static INT event_do_dialog(MSIPACKAGE *package, const WCHAR *name, msi_dialog *parent, BOOL destroy_modeless)
Definition: dialog.c:4281
static HWND dialog
Definition: gui.c:33
static void msi_dialog_end_dialog(msi_dialog *dialog)
Definition: dialog.c:3997

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

4394 {
4395  FIXME("doing nothing\n");
4396  return ERROR_SUCCESS;
4397 }
#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 713 of file dialog.c.

714 {
715  struct subscriber *sub;
716 
717  TRACE("dialog %s event %s control %s attribute %s\n", debugstr_w(dialog->name), debugstr_w(event),
719 
720  LIST_FOR_EACH_ENTRY( sub, &dialog->package->subscriptions, struct subscriber, entry )
721  {
722  if (sub->dialog == dialog &&
723  !strcmpiW( sub->event, event ) &&
724  !strcmpiW( sub->control, control ) &&
725  !strcmpiW( sub->attribute, attribute ))
726  {
727  TRACE("already subscribed\n");
728  return;
729  };
730  }
731  if (!(sub = msi_alloc( sizeof(*sub) ))) return;
732  sub->dialog = dialog;
733  sub->event = strdupW( event );
734  sub->control = strdupW( control );
735  sub->attribute = strdupW( attribute );
736  list_add_tail( &dialog->package->subscriptions, &sub->entry );
737 }
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 4566 of file dialog.c.

4567 {
4568  return msi_validate_product_id( dialog->package );
4569 }
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 4050 of file dialog.c.

4051 {
4052  msi_free( sub->event );
4053  msi_free( sub->control );
4054  msi_free( sub->attribute );
4055  msi_free( sub );
4056 }
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 745 of file dialog.c.

746 {
747  struct dialog_control *dc = param;
748  const WCHAR *event = MSI_RecordGetString( row, 3 );
749  const WCHAR *attribute = MSI_RecordGetString( row, 4 );
750 
751  event_subscribe( dc->dialog, event, dc->control, attribute );
752  return ERROR_SUCCESS;
753 }
#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:713
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 4137 of file dialog.c.

4138 {
4140  msiobj_release( &preview->package->hdr );
4141 }
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 1508 of file dialog.c.

1509 {
1510  struct msi_combobox_info *info = param;
1511  LPCWSTR value, text;
1512  int pos;
1513 
1514  value = MSI_RecordGetString( rec, 3 );
1515  text = MSI_RecordGetString( rec, 4 );
1516 
1517  info->items[info->addpos_items] = strdupW( value );
1518 
1519  pos = SendMessageW( info->hwnd, CB_ADDSTRING, 0, (LPARAM)text );
1520  SendMessageW( info->hwnd, CB_SETITEMDATA, pos, (LPARAM)info->items[info->addpos_items] );
1521  info->addpos_items++;
1522 
1523  return ERROR_SUCCESS;
1524 }
#define CB_SETITEMDATA
Definition: winuser.h:1949
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:1919
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 1526 of file dialog.c.

1527 {
1528  static const WCHAR query[] = {
1529  'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
1530  '`','C','o','m','b','o','B','o','x','`',' ','W','H','E','R','E',' ',
1531  '`','P','r','o','p','e','r','t','y','`',' ','=',' ','\'','%','s','\'',' ',
1532  'O','R','D','E','R',' ','B','Y',' ','`','O','r','d','e','r','`',0};
1533  MSIQUERY *view;
1534  DWORD count;
1535  UINT r;
1536 
1537  r = MSI_OpenQuery( info->dialog->package->db, &view, query, property );
1538  if (r != ERROR_SUCCESS)
1539  return r;
1540 
1541  /* just get the number of records */
1542  count = 0;
1544  if (r != ERROR_SUCCESS)
1545  {
1546  msiobj_release( &view->hdr );
1547  return r;
1548  }
1549  info->num_items = count;
1550  info->items = msi_alloc( sizeof(*info->items) * count );
1551 
1553  msiobj_release( &view->hdr );
1554  return r;
1555 }
#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:1508
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 399 of file dialog.c.

400 {
401  list_remove( &t->entry );
402  /* leave dialog->hwnd - destroying parent destroys child windows */
403  msi_free( t->property );
404  msi_free( t->value );
405  if( t->hBitmap )
406  DeleteObject( t->hBitmap );
407  if( t->hIcon )
408  DestroyIcon( t->hIcon );
409  msi_free( t->tabnext );
410  msi_free( t->type );
411  if (t->hDll)
412  FreeLibrary( t->hDll );
413  msi_free( t );
414 }
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 777 of file dialog.c.

779 {
780  DWORD attributes;
781  const WCHAR *text = NULL, *name, *control_type;
782  DWORD exstyle = 0;
783 
784  name = MSI_RecordGetString( rec, 2 );
785  control_type = MSI_RecordGetString( rec, 3 );
786  attributes = MSI_RecordGetInteger( rec, 8 );
788 
789  TRACE("%s, %s, %08x, %s, %08x\n", debugstr_w(szCls), debugstr_w(name),
790  attributes, debugstr_w(text), style);
791 
792  if( attributes & msidbControlAttributesVisible )
793  style |= WS_VISIBLE;
794  if( ~attributes & msidbControlAttributesEnabled )
795  style |= WS_DISABLED;
796  if( attributes & msidbControlAttributesSunken )
797  exstyle |= WS_EX_CLIENTEDGE;
798 
800 
801  return dialog_create_window( dialog, rec, exstyle, szCls, name, text, style, dialog->hwnd );
802 }
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:416
#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:755
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 311 of file dialog.c.

312 {
314  msi_font *font;
315  LPCWSTR face, name;
316  LOGFONTW lf;
317  INT style;
318  HDC hdc;
319 
320  /* create a font and add it to the list */
321  name = MSI_RecordGetString( rec, 1 );
323  strcpyW( font->name, name );
324  list_add_head( &dialog->fonts, &font->entry );
325 
326  font->color = MSI_RecordGetInteger( rec, 4 );
327 
328  memset( &lf, 0, sizeof lf );
329  face = MSI_RecordGetString( rec, 2 );
330  lf.lfHeight = MSI_RecordGetInteger( rec, 3 );
331  style = MSI_RecordGetInteger( rec, 5 );
333  lf.lfWeight = FW_BOLD;
335  lf.lfItalic = TRUE;
337  lf.lfUnderline = TRUE;
339  lf.lfStrikeOut = TRUE;
341 
342  /* adjust the height */
343  hdc = GetDC( dialog->hwnd );
344  if (hdc)
345  {
347  ReleaseDC( dialog->hwnd, hdc );
348  }
349 
350  font->hfont = CreateFontIndirectW( &lf );
351 
352  TRACE("Adding font style %s\n", debugstr_w(font->name) );
353 
354  return ERROR_SUCCESS;
355 }
#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:378
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:719
LONG lfWeight
Definition: dimm.idl:63
Arabic default style
Definition: afstyles.h:93
BYTE lfUnderline
Definition: dimm.idl:65
#define memset(x, y, z)
Definition: compat.h:39
GLenum GLuint GLint GLenum face
Definition: glext.h:7025
GLuint const GLchar * name
Definition: glext.h:6031

Referenced by msi_dialog_build_font_list().

◆ msi_dialog_adjust_dialog_pos()

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

Definition at line 3591 of file dialog.c.

3592 {
3593  static const WCHAR szScreenX[] = {'S','c','r','e','e','n','X',0};
3594  static const WCHAR szScreenY[] = {'S','c','r','e','e','n','Y',0};
3595 
3596  UINT xres, yres;
3597  POINT center;
3598  SIZE sz;
3599  LONG style;
3600 
3601  center.x = MSI_RecordGetInteger( rec, 2 );
3602  center.y = MSI_RecordGetInteger( rec, 3 );
3603 
3604  sz.cx = MSI_RecordGetInteger( rec, 4 );
3605  sz.cy = MSI_RecordGetInteger( rec, 5 );
3606 
3607  sz.cx = msi_dialog_scale_unit( dialog, sz.cx );
3608  sz.cy = msi_dialog_scale_unit( dialog, sz.cy );
3609 
3610  xres = msi_get_property_int( dialog->package->db, szScreenX, 0 );
3611  yres = msi_get_property_int( dialog->package->db, szScreenY, 0 );
3612 
3613  center.x = MulDiv( center.x, xres, 100 );
3614  center.y = MulDiv( center.y, yres, 100 );
3615 
3616  /* turn the client pos into the window rectangle */
3617  if (dialog->package->center_x && dialog->package->center_y)
3618  {
3619  pos->left = dialog->package->center_x - sz.cx / 2.0;
3620  pos->right = pos->left + sz.cx;
3621  pos->top = dialog->package->center_y - sz.cy / 2.0;
3622  pos->bottom = pos->top + sz.cy;
3623  }
3624  else
3625  {
3626  pos->left = center.x - sz.cx/2;
3627  pos->right = pos->left + sz.cx;
3628  pos->top = center.y - sz.cy/2;
3629  pos->bottom = pos->top + sz.cy;
3630 
3631  /* save the center */
3632  dialog->package->center_x = center.x;
3633  dialog->package->center_y = center.y;
3634  }
3635 
3636  dialog->size.cx = sz.cx;
3637  dialog->size.cy = sz.cy;
3638 
3639  TRACE("%s\n", wine_dbgstr_rect(pos));
3640 
3643 }
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:197
#define GetWindowLongPtrW
Definition: winuser.h:4805
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 1411 of file dialog.c.

1412 {
1413  UINT cx, cy, flags, style, attributes;
1414  msi_control *control;
1415  LPWSTR name;
1416 
1419 
1420  attributes = MSI_RecordGetInteger( rec, 8 );
1421  if( attributes & msidbControlAttributesFixedSize )
1422  {
1423  flags |= LR_DEFAULTSIZE;
1424  style |= SS_CENTERIMAGE;
1425  }
1426 
1427  control = msi_dialog_add_control( dialog, rec, szStatic, style );
1428  cx = MSI_RecordGetInteger( rec, 6 );
1429  cy = MSI_RecordGetInteger( rec, 7 );
1432 
1433  name = msi_get_binary_name( dialog->package, rec );
1434  control->hBitmap = msi_load_picture( dialog->package->db, name, cx, cy, flags );
1435  if( control->hBitmap )
1436  SendMessageW( control->hwnd, STM_SETIMAGE,
1437  IMAGE_BITMAP, (LPARAM) control->hBitmap );
1438  else
1439  ERR("Failed to load bitmap %s\n", debugstr_w(name));
1440 
1441  msi_free( name );
1442 
1443  return ERROR_SUCCESS;
1444 }
#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:197
#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:1344
#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:2076
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:777
static WCHAR * msi_get_binary_name(MSIPACKAGE *package, MSIRECORD *rec)
Definition: dialog.c:901
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 380 of file dialog.c.

381 {
382  static const WCHAR query[] = {
383  'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
384  '`','T','e','x','t','S','t','y','l','e','`',0};
385  MSIQUERY *view;
386  UINT r;
387 
388  TRACE("dialog %p\n", dialog );
389 
390  r = MSI_OpenQuery( dialog->package->db, &view, query );
391  if( r != ERROR_SUCCESS )
392  return r;
393 
395  msiobj_release( &view->hdr );
396  return r;
397 }
#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:311
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 1017 of file dialog.c.

1018 {
1019  msi_control *control;
1020  UINT attributes, style;
1021 
1022  TRACE("%p %p\n", dialog, rec);
1023 
1024  style = WS_TABSTOP;
1025  attributes = MSI_RecordGetInteger( rec, 8 );
1026  if( attributes & msidbControlAttributesIcon )
1027  style |= BS_ICON;
1028 
1029  control = msi_dialog_add_control( dialog, rec, szButton, style );
1030  if( !control )
1031  return ERROR_FUNCTION_FAILED;
1032 
1034 
1035  if (attributes & msidbControlAttributesIcon)
1036  {
1037  /* set the icon */
1038  LPWSTR name = msi_get_binary_name( dialog->package, rec );
1039  control->hIcon = msi_load_icon( dialog->package->db, name, attributes );
1040  if (control->hIcon)
1041  {
1042  SendMessageW( control->hwnd, BM_SETIMAGE, IMAGE_ICON, (LPARAM) control->hIcon );
1043  }
1044  else
1045  ERR("Failed to load icon %s\n", debugstr_w(name));
1046  msi_free( name );
1047  }
1048 
1049  return ERROR_SUCCESS;
1050 }
#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:535
#define BM_SETIMAGE
Definition: winuser.h:1905
#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:982
#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:777
static WCHAR * msi_get_binary_name(MSIPACKAGE *package, MSIRECORD *rec)
Definition: dialog.c:901
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 982 of file dialog.c.

983 {
984  static const WCHAR query[] = {
985  'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
986  'C','o','n','t','r','o','l','E','v','e','n','t',' ','W','H','E','R','E',' ',
987  '`','D','i','a','l','o','g','_','`',' ','=',' ','\'','%','s','\'',' ','A','N','D',' ',
988  '`','C','o','n','t','r','o','l','_','`',' ','=',' ','\'','%','s','\'',' ',
989  'O','R','D','E','R',' ','B','Y',' ','`','O','r','d','e','r','i','n','g','`',0};
990  MSIQUERY *view;
991  UINT r;
992 
993  if (HIWORD(param) != BN_CLICKED)
994  return ERROR_SUCCESS;
995 
996  r = MSI_OpenQuery( dialog->package->db, &view, query, dialog->name, control->name );
997  if (r != ERROR_SUCCESS)
998  {
999  ERR("query failed\n");
1000  return ERROR_SUCCESS;
1001  }
1003  msiobj_release( &view->hdr );
1004 
1005  /* dialog control events must be processed last regardless of ordering */
1006  if (dialog->pending_event)
1007  {
1008  r = dialog->pending_event( dialog, dialog->pending_argument );
1009 
1010  msi_free( dialog->pending_argument );
1011  dialog->pending_event = NULL;
1012  dialog->pending_argument = NULL;
1013  }
1014  return r;
1015 }
#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:962
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:1908
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 4004 of file dialog.c.

4005 {
4006  DWORD r;
4007 
4008  /* in threads other than the UI thread, block */
4009  if( uiThreadId != GetCurrentThreadId() )
4010  {
4011  if (!handle) return;
4013  {
4014  MSG msg;
4015  while (PeekMessageW( &msg, NULL, 0, 0, PM_REMOVE ))
4016  {
4017  TranslateMessage( &msg );
4018  DispatchMessageW( &msg );
4019  }
4020  }
4021  return;
4022  }
4023 
4024  /* there are two choices for the UI thread */
4025  while (1)
4026  {
4028 
4029  if( !handle )
4030  break;
4031 
4032  /*
4033  * block here until somebody creates a new dialog or
4034  * the handle we're waiting on becomes ready
4035  */
4037  if( r == WAIT_OBJECT_0 )
4038  break;
4039  }
4040 }
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:3836
#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 1142 of file dialog.c.

1143 {
1144  msi_control *control;
1145  LPCWSTR prop;
1146 
1147  TRACE("%p %p\n", dialog, rec);
1148 
1152  prop = MSI_RecordGetString( rec, 9 );
1153  if (prop)
1154  {
1155  control->property = strdupW( prop );
1156  control->value = msi_get_checkbox_value( dialog, prop );
1157  TRACE("control %s value %s\n", debugstr_w(control->property), debugstr_w(control->value));
1158  }
1160  return ERROR_SUCCESS;
1161 }
static UINT msi_dialog_checkbox_handler(msi_dialog *dialog, msi_control *control, WPARAM param)
Definition: dialog.c:1125
#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:1119
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:1052
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:777

◆ msi_dialog_checkbox_handler()

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

Definition at line 1125 of file dialog.c.

1126 {
1127  UINT state;
1128 
1129  if (HIWORD(param) != BN_CLICKED)
1130  return ERROR_SUCCESS;
1131 
1132  TRACE("clicked checkbox %s, set %s\n", debugstr_w(control->name), debugstr_w(control->property));
1133 
1135  state = state ? 0 : 1;
1138 
1139  return msi_dialog_button_handler( dialog, control, param );
1140 }
#define ERROR_SUCCESS
Definition: deptool.c:10
static void msi_dialog_checkbox_sync_state(msi_dialog *dialog, msi_control *control)
Definition: dialog.c:1119
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:1098
static UINT msi_dialog_get_checkbox_state(msi_dialog *dialog, msi_control *control)
Definition: dialog.c:1089
#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:982
GLfloat param
Definition: glext.h:5796
#define BN_CLICKED
Definition: winuser.h:1908
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 1119 of file dialog.c.

1120 {
1123 }
static UINT msi_dialog_get_checkbox_state(msi_dialog *dialog, msi_control *control)
Definition: dialog.c:1089
#define BM_SETCHECK
Definition: winuser.h:1904
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 1677 of file dialog.c.

1678 {
1679  struct msi_combobox_info *info;
1680  msi_control *control;
1681  DWORD attributes, style;
1682  LPCWSTR prop;
1683 
1684  info = msi_alloc( sizeof *info );
1685  if (!info)
1686  return ERROR_FUNCTION_FAILED;
1687 
1689  attributes = MSI_RecordGetInteger( rec, 8 );
1690  if ( ~attributes & msidbControlAttributesSorted)
1691  style |= CBS_SORT;
1692  if ( attributes & msidbControlAttributesComboList)
1694  else
1695  style |= CBS_DROPDOWN;
1696 
1697  control = msi_dialog_add_control( dialog, rec, WC_COMBOBOXW, style );
1698  if (!control)
1699  {
1700  msi_free( info );
1701  return ERROR_FUNCTION_FAILED;
1702  }
1703 
1706 
1707  prop = MSI_RecordGetString( rec, 9 );
1708  control->property = msi_dialog_dup_property( dialog, prop, FALSE );
1709 
1710  /* subclass */
1711  info->dialog = dialog;
1712  info->hwnd = control->hwnd;
1713  info->items = NULL;
1714  info->addpos_items = 0;
1715  info->oldproc = (WNDPROC)SetWindowLongPtrW( control->hwnd, GWLP_WNDPROC,
1717  SetPropW( control->hwnd, szButtonData, info );
1718 
1719  if (control->property)
1720  msi_combobox_add_items( info, control->property );
1721 
1722  msi_dialog_combobox_update( dialog, control );
1723 
1724  return ERROR_SUCCESS;
1725 }
#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:1526
#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:1642
static UINT msi_dialog_combobox_handler(msi_dialog *dialog, msi_control *control, WPARAM param)
Definition: dialog.c:1617
static LRESULT WINAPI MSIComboBox_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: dialog.c:1480
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:2882
static LPWSTR msi_dialog_dup_property(msi_dialog *dialog, LPCWSTR property, BOOL indirect)
Definition: dialog.c:252
#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:777
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:5322
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 1617 of file dialog.c.

1618 {
1619  struct msi_combobox_info *info;
1620  int index;
1621  LPWSTR value;
1622 
1624  return ERROR_SUCCESS;
1625 
1626  info = GetPropW( control->hwnd, szButtonData );
1627  index = SendMessageW( control->hwnd, CB_GETCURSEL, 0, 0 );
1628  if (index == CB_ERR)
1629  value = msi_get_window_text( control->hwnd );
1630  else
1631  value = (LPWSTR) SendMessageW( control->hwnd, CB_GETITEMDATA, index, 0 );
1632 
1633  msi_dialog_set_property( info->dialog->package, control->property, value );
1635 
1636  if (index == CB_ERR)
1637  msi_free( value );
1638 
1639  return ERROR_SUCCESS;
1640 }
Definition: pdh_main.c:93
#define ERROR_SUCCESS
Definition: deptool.c:10
#define CB_GETITEMDATA
Definition: winuser.h:1933
#define CB_GETCURSEL
Definition: winuser.h:1926
GLuint index
Definition: glext.h:6031
#define CB_ERR
Definition: winuser.h:2411
LPWSTR property
Definition: dialog.c:66
#define CBN_EDITCHANGE
Definition: winuser.h:1958
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:1962
static BOOL msi_free(void *mem)
Definition: msipriv.h:1227
static LPWSTR msi_get_window_text(HWND hwnd)
Definition: dialog.c:178
#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:1595
static void msi_dialog_set_property(MSIPACKAGE *package, LPCWSTR property, LPCWSTR value)
Definition: dialog.c:580

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

1643 {
1644  struct msi_combobox_info *info;
1645  LPWSTR value, tmp;
1646  DWORD j;
1647 
1648  info = GetPropW( control->hwnd, szButtonData );
1649 
1650  value = msi_dup_property( dialog->package->db, control->property );
1651  if (!value)
1652  {
1653  SendMessageW( control->hwnd, CB_SETCURSEL, -1, 0 );
1654  return;
1655  }
1656 
1657  for (j = 0; j < info->num_items; j++)
1658  {
1659  tmp = (LPWSTR) SendMessageW( control->hwnd, CB_GETITEMDATA, j, 0 );
1660  if (!strcmpW( value, tmp ))
1661  break;
1662  }
1663 
1664  if (j < info->num_items)
1665  {
1666  SendMessageW( control->hwnd, CB_SETCURSEL, j, 0 );
1667  }
1668  else
1669  {
1670  SendMessageW( control->hwnd, CB_SETCURSEL, -1, 0 );
1671  SetWindowTextW( control->hwnd, value );
1672  }
1673 
1674  msi_free(value);
1675 }
Definition: pdh_main.c:93
#define CB_GETITEMDATA
Definition: winuser.h:1933
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:1944
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 962 of file dialog.c.

963 {
966  UINT r;
967 
968  condition = MSI_RecordGetString( rec, 5 );
969  r = MSI_EvaluateConditionW( dialog->package, condition );
970  if (r == MSICONDITION_TRUE || r == MSICONDITION_NONE)
971  {
972  event = MSI_RecordGetString( rec, 3 );
973  arg = MSI_RecordGetString( rec, 4 );
974  if (event[0] == '[')
976  else
978  }
979  return ERROR_SUCCESS;
980 }
#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:945
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:921

Referenced by msi_dialog_button_handler().

◆ msi_dialog_create_controls()

static UINT msi_dialog_create_controls ( MSIRECORD rec,
LPVOID  param 
)
static

Definition at line 3488 of file dialog.c.

3489 {
3490  msi_dialog *dialog = param;
3492  UINT i;
3493 
3494  /* find and call the function that can create this type of control */
3495  control_type = MSI_RecordGetString( rec, 3 );
3496  for( i=0; i<NUM_CONTROL_TYPES; i++ )
3498  break;
3499  if( i != NUM_CONTROL_TYPES )
3500  msi_dialog_handler[i].func( dialog, rec );
3501  else
3502  ERR("no handler for element type %s\n", debugstr_w(control_type));
3503 
3504  return ERROR_SUCCESS;
3505 }
#define ERROR_SUCCESS
Definition: deptool.c:10
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define NUM_CONTROL_TYPES
Definition: dialog.c:3486
static const char * control_type(DWORD dwControlType)
Definition: mixer.c:110
static const struct control_handler msi_dialog_handler[]
Definition: dialog.c:3461
#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 2291 of file dialog.c.

2292 {
2294  msi_dialog *dialog = group->dialog;
2295  msi_control *control;
2296  LPCWSTR prop, text, name;
2298 
2299  name = MSI_RecordGetString( rec, 3 );
2300  text = MSI_RecordGetString( rec, 8 );
2301 
2302  control = dialog_create_window( dialog, rec, 0, szButton, name, text, style,
2303  group->parent->hwnd );
2304  if (!control)
2305  return ERROR_FUNCTION_FAILED;
2307 
2308  if (group->propval && !strcmpW( control->name, group->propval ))
2309  SendMessageW(control->hwnd, BM_SETCHECK, BST_CHECKED, 0);
2310 
2311  prop = MSI_RecordGetString( rec, 1 );
2312  if( prop )
2313  control->property = strdupW( prop );
2314 
2315  return ERROR_SUCCESS;
2316 }
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:416
#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:1904
#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:2278
#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 4072 of file dialog.c.

4073 {
4074  msi_font *font, *next;
4075 
4076  if( uiThreadId != GetCurrentThreadId() )
4077  {
4079  return;
4080  }
4081 
4082  if( dialog->hwnd )
4083  ShowWindow( dialog->hwnd, SW_HIDE );
4084 
4085  if( dialog->hwnd )
4086  DestroyWindow( dialog->hwnd );
4087 
4088  /* unsubscribe events */
4089  event_cleanup_subscriptions( dialog->package, dialog->name );
4090 
4091  /* destroy the list of controls */
4092  while( !list_empty( &dialog->controls ) )
4093  {
4094  msi_control *t;
4095 
4096  t = LIST_ENTRY( list_head( &dialog->controls ),
4097  msi_control, entry );
4099  }
4100 
4101  /* destroy the list of fonts */
4103  {
4104  list_remove( &font->entry );
4105  DeleteObject( font->hfont );
4106  msi_free( font );
4107  }
4108  msi_free( dialog->default_font );
4109 
4110  msi_free( dialog->control_default );
4111  msi_free( dialog->control_cancel );
4112  dialog->package = NULL;
4113  msi_free( dialog );
4114 }
#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:4058
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:399
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 2948 of file dialog.c.

2949 {
2950  msi_control *control;
2951  LPCWSTR prop;
2952  DWORD style;
2953 
2954  /* FIXME: use CBS_OWNERDRAWFIXED and add owner draw code */
2957  control = msi_dialog_add_control( dialog, rec, WC_COMBOBOXW, style );
2958  if (!control)
2959  return ERROR_FUNCTION_FAILED;
2960 
2961  control->attributes = MSI_RecordGetInteger( rec, 8 );
2962  prop = MSI_RecordGetString( rec, 9 );
2963  control->property = msi_dialog_dup_property( dialog, prop, FALSE );
2964 
2966 
2967  return ERROR_SUCCESS;
2968 }
#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:252
#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:777
Arabic default style
Definition: afstyles.h:93
static void msi_dialog_update_directory_combo(msi_dialog *dialog, msi_control *control)
Definition: dialog.c:2926
#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 3095 of file dialog.c.

3096 {
3097  msi_control *control;
3098  LPCWSTR prop;
3099  DWORD style;
3100 
3103