ReactOS  0.4.13-dev-100-gc8611ae
iexplore.c File Reference
#include <stdarg.h>
#include "ieframe.h"
#include "resource.h"
#include "winuser.h"
#include "wingdi.h"
#include "winnls.h"
#include "ole2.h"
#include "exdisp.h"
#include "oleidl.h"
#include "mshtmcid.h"
#include "shellapi.h"
#include "winreg.h"
#include "shlwapi.h"
#include "intshcut.h"
#include "ddeml.h"
#include "ieautomation.h"
#include "wine/debug.h"
Include dependency graph for iexplore.c:

Go to the source code of this file.

Classes

class  InternetExplorerManager
 

Macros

#define COBJMACROS
 
#define IDI_APPICON   1
 
#define WM_UPDATEADDRBAR   (WM_APP+1)
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (ieframe)
 
HRESULT update_ie_statustext (InternetExplorer *This, LPCWSTR text)
 
static void adjust_ie_docobj_rect (HWND frame, RECT *rc)
 
static HMENU get_tb_menu (HMENU menu)
 
static HMENU get_fav_menu (HMENU menu)
 
static LPWSTR get_fav_url_from_id (HMENU menu, UINT id)
 
static void free_fav_menu_data (HMENU menu)
 
static int get_menu_item_count (HMENU menu)
 
static void add_fav_to_menu (HMENU favmenu, HMENU menu, LPWSTR title, LPCWSTR url)
 
static void add_favs_to_menu (HMENU favmenu, HMENU menu, LPCWSTR dir)
 
static void add_tbs_to_menu (HMENU menu)
 
static HMENU create_ie_menu (void)
 
static void ie_navigate (InternetExplorer *This, LPCWSTR url)
 
static INT_PTR CALLBACK ie_dialog_open_proc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
 
static void ie_dialog_about (HWND hwnd)
 
static void add_tb_separator (InternetExplorer *ie)
 
static void add_tb_button (InternetExplorer *ie, int bmp, int cmd, int strId)
 
static void enable_toolbar_button (InternetExplorer *ie, int command, BOOL enable)
 
static void create_rebar (InternetExplorer *ie)
 
static LRESULT iewnd_OnCreate (HWND hwnd, LPCREATESTRUCTW lpcs)
 
static LRESULT iewnd_OnSize (InternetExplorer *This, INT width, INT height)
 
static LRESULT iewnd_OnNotify (InternetExplorer *This, WPARAM wparam, LPARAM lparam)
 
static LRESULT iewnd_OnDestroy (InternetExplorer *This)
 
static LRESULT iewnd_OnCommand (InternetExplorer *This, HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
 
static LRESULT update_addrbar (InternetExplorer *This, LPARAM lparam)
 
static LRESULT WINAPI ie_window_proc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
 
void register_iewindow_class (void)
 
void unregister_iewindow_class (void)
 
static void create_frame_hwnd (InternetExplorer *This)
 
static InternetExplorerimpl_from_DocHost (DocHost *iface)
 
static ULONG IEDocHost_addref (DocHost *iface)
 
static ULONG IEDocHost_release (DocHost *iface)
 
static void DocHostContainer_get_docobj_rect (DocHost *This, RECT *rc)
 
static HRESULT DocHostContainer_set_status_text (DocHost *iface, const WCHAR *text)
 
static void DocHostContainer_on_command_state_change (DocHost *iface, LONG command, BOOL enable)
 
static void DocHostContainer_set_url (DocHost *iface, const WCHAR *url)
 
static HRESULT create_ie (InternetExplorer **ret_obj)
 
HRESULT WINAPI InternetExplorer_Create (IClassFactory *iface, IUnknown *pOuter, REFIID riid, void **ppv)
 
static InternetExplorerManagerimpl_from_IInternetExplorerManager (IInternetExplorerManager *iface)
 
static HRESULT WINAPI InternetExplorerManager_QueryInterface (IInternetExplorerManager *iface, REFIID riid, void **out)
 
static ULONG WINAPI InternetExplorerManager_AddRef (IInternetExplorerManager *iface)
 
static ULONG WINAPI InternetExplorerManager_Release (IInternetExplorerManager *iface)
 
static HRESULT WINAPI InternetExplorerManager_CreateObject (IInternetExplorerManager *iface, DWORD config, LPCWSTR url, REFIID riid, void **ppv)
 
HRESULT WINAPI InternetExplorerManager_Create (IClassFactory *iface, IUnknown *pOuter, REFIID riid, void **ppv)
 
void released_obj (void)
 
static BOOL create_ie_window (BOOL nohome, const WCHAR *cmdline)
 
static HDDEDATA open_dde_url (WCHAR *dde_url)
 
static HDDEDATA WINAPI dde_proc (UINT type, UINT uFmt, HCONV hConv, HSZ hsz1, HSZ hsz2, HDDEDATA data, ULONG_PTR dwData1, ULONG_PTR dwData2)
 
static void init_dde (void)
 
static void release_dde (void)
 
DWORD WINAPI IEWinMain (const WCHAR *cmdline, int nShowWindow)
 

Variables

static const WCHAR szIEWinFrame [] = { 'I','E','F','r','a','m','e',0 }
 
static const WCHAR wszWineInternetExplorer []
 
static LONG obj_cnt
 
static DWORD dde_inst
 
static HSZ ddestr_iexplore
 
static HSZ ddestr_openurl
 
static struct list ie_list = LIST_INIT(ie_list)
 
static const IDocHostContainerVtbl DocHostContainerVtbl
 
struct InternetExplorerManager helpstring
 
static const IInternetExplorerManagerVtbl InternetExplorerManager_vtbl
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 22 of file iexplore.c.

◆ IDI_APPICON

#define IDI_APPICON   1

Definition at line 48 of file iexplore.c.

◆ WM_UPDATEADDRBAR

#define WM_UPDATEADDRBAR   (WM_APP+1)

Definition at line 50 of file iexplore.c.

Function Documentation

◆ add_fav_to_menu()

static void add_fav_to_menu ( HMENU  favmenu,
HMENU  menu,
LPWSTR  title,
LPCWSTR  url 
)
static

Definition at line 142 of file iexplore.c.

143 {
145  /* Subtract the number of standard elements in the Favorites menu */
146  int favcount = get_menu_item_count(favmenu) - 2;
147  LPWSTR urlbuf;
148 
150  {
151  FIXME("Add support for more than %d Favorites\n", favcount);
152  return;
153  }
154 
155  urlbuf = heap_alloc((lstrlenW(url) + 1) * sizeof(WCHAR));
156 
157  if(!urlbuf)
158  return;
159 
160  lstrcpyW(urlbuf, url);
161 
162  item.cbSize = sizeof(item);
164  item.fType = MFT_STRING;
165  item.dwTypeData = title;
166  item.wID = ID_BROWSE_GOTOFAV_FIRST + favcount;
167  item.dwItemData = (ULONG_PTR)urlbuf;
168  InsertMenuItemW(menu, -1, TRUE, &item);
169 }
#define MFT_STRING
Definition: winuser.h:741
#define MIIM_FTYPE
Definition: winuser.h:724
#define TRUE
Definition: types.h:120
static int get_menu_item_count(HMENU menu)
Definition: iexplore.c:122
#define lstrlenW
Definition: compat.h:407
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define ID_BROWSE_GOTOFAV_MAX
Definition: resource.h:56
#define FIXME(fmt,...)
Definition: debug.h:110
#define MIIM_ID
Definition: winuser.h:717
__wchar_t WCHAR
Definition: xmlstorage.h:180
static const WCHAR url[]
Definition: encode.c:1432
#define MIIM_STRING
Definition: winuser.h:722
static ATOM item
Definition: dde.c:856
#define lstrcpyW
Definition: compat.h:406
BOOL WINAPI InsertMenuItemW(_In_ HMENU, _In_ UINT, _In_ BOOL, _In_ LPCMENUITEMINFOW)
#define ID_BROWSE_GOTOFAV_FIRST
Definition: resource.h:55
#define ULONG_PTR
Definition: config.h:101
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define MIIM_DATA
Definition: winuser.h:721
static char title[]
Definition: ps.c:92

Referenced by add_favs_to_menu().

◆ add_favs_to_menu()

static void add_favs_to_menu ( HMENU  favmenu,
HMENU  menu,
LPCWSTR  dir 
)
static

Definition at line 171 of file iexplore.c.

172 {
173  static const WCHAR search[] = {'*',0};
174  WCHAR path[MAX_PATH*2];
175  WCHAR* filename;
176  HANDLE findhandle;
177  WIN32_FIND_DATAW finddata;
178  IUniformResourceLocatorW* urlobj;
179  IPersistFile* urlfile = NULL;
180  HRESULT res;
181 
182  lstrcpyW(path, dir);
184 
185  findhandle = FindFirstFileW(path, &finddata);
186 
187  if(findhandle == INVALID_HANDLE_VALUE)
188  return;
189 
190  res = CoCreateInstance(&CLSID_InternetShortcut, NULL, CLSCTX_INPROC_SERVER, &IID_IUniformResourceLocatorW, (PVOID*)&urlobj);
191 
192  if(SUCCEEDED(res))
193  res = IUnknown_QueryInterface((IUnknown*)urlobj, &IID_IPersistFile, (PVOID*)&urlfile);
194 
195  if(SUCCEEDED(res))
196  {
198 
199  do
200  {
201  lstrcpyW(filename, finddata.cFileName);
202 
203  if(finddata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
204  {
205  static const WCHAR ignore1[] = {'.','.',0};
206  static const WCHAR ignore2[] = {'.',0};
208 
209  if(!lstrcmpW(filename, ignore1) || !lstrcmpW(filename, ignore2))
210  continue;
211 
212  item.cbSize = sizeof(item);
213  item.fMask = MIIM_STRING | MIIM_SUBMENU;
214  item.dwTypeData = filename;
215  item.hSubMenu = CreatePopupMenu();
216  InsertMenuItemW(menu, -1, TRUE, &item);
217  add_favs_to_menu(favmenu, item.hSubMenu, path);
218  } else
219  {
220  static const WCHAR urlext[] = {'.','u','r','l',0};
221  WCHAR* fileext;
222  WCHAR* url = NULL;
223 
225  continue;
226 
227  if(FAILED(IPersistFile_Load(urlfile, path, 0)))
228  continue;
229 
230  urlobj->lpVtbl->GetURL(urlobj, &url);
231 
232  if(!url)
233  continue;
234 
235  fileext = filename + lstrlenW(filename) - lstrlenW(urlext);
236  *fileext = 0;
237  add_fav_to_menu(favmenu, menu, filename, url);
238  }
239  } while(FindNextFileW(findhandle, &finddata));
240  }
241 
242  if(urlfile)
243  IPersistFile_Release(urlfile);
244 
245  if(urlobj)
246  IUnknown_Release((IUnknown*)urlobj);
247 
248  FindClose(findhandle);
249 }
static short search(int val, const short *table, int size)
Definition: msg711.c:255
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:382
#define TRUE
Definition: types.h:120
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:170
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
const char * filename
Definition: ioapi.h:135
#define lstrlenW
Definition: compat.h:407
BOOL WINAPI PathAppendW(LPWSTR lpszPath, LPCWSTR lpszAppend)
Definition: path.c:121
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
#define MIIM_SUBMENU
Definition: winuser.h:718
static void add_favs_to_menu(HMENU favmenu, HMENU menu, LPCWSTR dir)
Definition: iexplore.c:171
smooth NULL
Definition: ftsmooth.c:416
static void add_fav_to_menu(HMENU favmenu, HMENU menu, LPWSTR title, LPCWSTR url)
Definition: iexplore.c:142
unsigned int dir
Definition: maze.c:112
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
Definition: path.c:442
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
static const WCHAR url[]
Definition: encode.c:1432
#define MAX_PATH
Definition: compat.h:26
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3234
#define MIIM_STRING
Definition: winuser.h:722
static ATOM item
Definition: dde.c:856
#define lstrcpyW
Definition: compat.h:406
Definition: services.c:325
BOOL WINAPI InsertMenuItemW(_In_ HMENU, _In_ UINT, _In_ BOOL, _In_ LPCMENUITEMINFOW)
HMENU WINAPI CreatePopupMenu(void)
Definition: menu.c:846
const GUID IID_IPersistFile
GLuint res
Definition: glext.h:9613
#define SUCCEEDED(hr)
Definition: intsafe.h:57
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:320
BOOL WINAPI FindClose(HANDLE hFindFile)
Definition: find.c:502

Referenced by create_ie_menu().

◆ add_tb_button()

static void add_tb_button ( InternetExplorer ie,
int  bmp,
int  cmd,
int  strId 
)
static

Definition at line 423 of file iexplore.c.

424 {
425  TBBUTTON btn;
426  WCHAR buf[30];
427 
429 
430  btn.iBitmap = bmp;
431  btn.idCommand = cmd;
432  btn.fsState = TBSTATE_ENABLED;
433  btn.fsStyle = BTNS_SHOWTEXT;
434  btn.dwData = 0;
435  btn.iString = (INT_PTR)buf;
436 
438 }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
HINSTANCE ieframe_instance
Definition: ieframe_main.c:32
char * cmd
Definition: vfdcmd.c:85
int32_t INT_PTR
Definition: typedefs.h:62
BYTE fsStyle
Definition: commctrl.h:924
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
HWND toolbar_hwnd
Definition: ieframe.h:242
LONG_PTR LPARAM
Definition: windef.h:208
#define BTNS_SHOWTEXT
Definition: commctrl.h:978
INT_PTR iString
Definition: commctrl.h:931
DWORD_PTR dwData
Definition: commctrl.h:930
int iBitmap
Definition: commctrl.h:921
__wchar_t WCHAR
Definition: xmlstorage.h:180
BITMAP bmp
Definition: alphablend.c:62
int idCommand
Definition: commctrl.h:922
#define TB_ADDBUTTONSW
Definition: commctrl.h:1238
#define ARRAY_SIZE(a)
Definition: main.h:24
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define TBSTATE_ENABLED
Definition: commctrl.h:946
BYTE fsState
Definition: commctrl.h:923

Referenced by create_rebar().

◆ add_tb_separator()

static void add_tb_separator ( InternetExplorer ie)
static

Definition at line 412 of file iexplore.c.

413 {
414  TBBUTTON btn;
415 
416  ZeroMemory(&btn, sizeof(btn));
417 
418  btn.iBitmap = 3;
419  btn.fsStyle = BTNS_SEP;
421 }
#define ZeroMemory
Definition: winbase.h:1635
BYTE fsStyle
Definition: commctrl.h:924
HWND toolbar_hwnd
Definition: ieframe.h:242
LONG_PTR LPARAM
Definition: windef.h:208
int iBitmap
Definition: commctrl.h:921
#define BTNS_SEP
Definition: commctrl.h:971
#define TB_ADDBUTTONSW
Definition: commctrl.h:1238
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

Referenced by create_rebar().

◆ add_tbs_to_menu()

static void add_tbs_to_menu ( HMENU  menu)
static

Definition at line 251 of file iexplore.c.

252 {
253  static const WCHAR toolbar_key[] = {'S','o','f','t','w','a','r','e','\\',
254  'M','i','c','r','o','s','o','f','t','\\',
255  'I','n','t','e','r','n','e','t',' ',
256  'E','x','p','l','o','r','e','r','\\',
257  'T','o','o','l','b','a','r',0};
258  HUSKEY toolbar_handle;
259 
260  if(SHRegOpenUSKeyW(toolbar_key, KEY_READ, NULL, &toolbar_handle, TRUE) == ERROR_SUCCESS)
261  {
262  static const WCHAR classes_key[] = {'S','o','f','t','w','a','r','e','\\',
263  'C','l','a','s','s','e','s','\\','C','L','S','I','D',0};
264  HUSKEY classes_handle;
265  WCHAR guid[39];
266  DWORD value_len = ARRAY_SIZE(guid);
267  int i;
268 
269  if(SHRegOpenUSKeyW(classes_key, KEY_READ, NULL, &classes_handle, TRUE) != ERROR_SUCCESS)
270  {
271  SHRegCloseUSKey(toolbar_handle);
272  ERR("Failed to open key %s\n", debugstr_w(classes_key));
273  return;
274  }
275 
276  for(i = 0; SHRegEnumUSValueW(toolbar_handle, i, guid, &value_len, NULL, NULL, NULL, SHREGENUM_HKLM) == ERROR_SUCCESS; i++)
277  {
278  WCHAR tb_name[100];
279  DWORD tb_name_len = ARRAY_SIZE(tb_name);
280  HUSKEY tb_class_handle;
282  LSTATUS ret;
283  value_len = ARRAY_SIZE(guid);
284 
285  if(lstrlenW(guid) != 38)
286  {
287  TRACE("Found invalid IE toolbar entry: %s\n", debugstr_w(guid));
288  continue;
289  }
290 
291  if(SHRegOpenUSKeyW(guid, KEY_READ, classes_handle, &tb_class_handle, TRUE) != ERROR_SUCCESS)
292  {
293  ERR("Failed to get class info for %s\n", debugstr_w(guid));
294  continue;
295  }
296 
297  ret = SHRegQueryUSValueW(tb_class_handle, NULL, NULL, tb_name, &tb_name_len, TRUE, NULL, 0);
298 
299  SHRegCloseUSKey(tb_class_handle);
300 
301  if(ret != ERROR_SUCCESS)
302  {
303  ERR("Failed to get toolbar name for %s\n", debugstr_w(guid));
304  continue;
305  }
306 
307  item.cbSize = sizeof(item);
308  item.fMask = MIIM_STRING;
309  item.dwTypeData = tb_name;
310  InsertMenuItemW(menu, GetMenuItemCount(menu), TRUE, &item);
311  }
312 
313  SHRegCloseUSKey(classes_handle);
314  SHRegCloseUSKey(toolbar_handle);
315  }
316 }
LONG WINAPI SHRegEnumUSValueW(HUSKEY hUSKey, DWORD dwIndex, LPWSTR pszValueName, LPDWORD pcchValueNameLen, LPDWORD pdwType, LPVOID pvData, LPDWORD pcbData, SHREGENUM_FLAGS enumRegFlags)
Definition: reg.c:418
#define TRUE
Definition: types.h:120
#define ERROR_SUCCESS
Definition: deptool.c:10
#define KEY_READ
Definition: nt_native.h:1023
LONG WINAPI SHRegOpenUSKeyW(LPCWSTR Path, REGSAM AccessType, HUSKEY hRelativeUSKey, PHUSKEY phNewUSKey, BOOL fIgnoreHKCU)
Definition: reg.c:123
#define lstrlenW
Definition: compat.h:407
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
const GUID * guid
#define debugstr_w
Definition: kernel32.h:32
int WINAPI GetMenuItemCount(_In_opt_ HMENU)
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long DWORD
Definition: ntddk_ex.h:95
static LSTATUS(WINAPI *pRegDeleteTreeW)(HKEY
int ret
LONG WINAPI SHRegQueryUSValueW(HUSKEY hUSKey, LPCWSTR pszValue, LPDWORD pdwType, LPVOID pvData, LPDWORD pcbData, BOOL fIgnoreHKCU, LPVOID pvDefaultData, DWORD dwDefaultDataSize)
Definition: reg.c:504
#define ERR(fmt,...)
Definition: debug.h:109
#define MIIM_STRING
Definition: winuser.h:722
static ATOM item
Definition: dde.c:856
#define ARRAY_SIZE(a)
Definition: main.h:24
LONG WINAPI SHRegCloseUSKey(HUSKEY hUSKey)
Definition: reg.c:190
BOOL WINAPI InsertMenuItemW(_In_ HMENU, _In_ UINT, _In_ BOOL, _In_ LPCMENUITEMINFOW)

Referenced by create_ie_menu().

◆ adjust_ie_docobj_rect()

static void adjust_ie_docobj_rect ( HWND  frame,
RECT rc 
)
static

Definition at line 71 of file iexplore.c.

72 {
73  HWND hwndRebar = GetDlgItem(frame, IDC_BROWSE_REBAR);
75  INT barHeight = SendMessageW(hwndRebar, RB_GETBARHEIGHT, 0, 0);
76 
77  InflateRect(rc, 0, -barHeight);
78 
80  {
81  RECT statusrc;
82 
83  GetClientRect(hwndStatus, &statusrc);
84  rc->bottom -= statusrc.bottom - statusrc.top;
85  }
86 }
BOOL WINAPI InflateRect(_Inout_ LPRECT, _In_ int, _In_ int)
#define IDC_BROWSE_REBAR
Definition: resource.h:29
#define RB_GETBARHEIGHT
Definition: commctrl.h:1580
LONG top
Definition: windef.h:292
int32_t INT
Definition: typedefs.h:56
HWND hwndStatus
Definition: solitaire.cpp:13
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI IsWindowVisible(_In_ HWND)
LONG bottom
Definition: windef.h:294
#define IDC_BROWSE_STATUSBAR
Definition: resource.h:31

Referenced by DocHostContainer_get_docobj_rect(), iewnd_OnNotify(), and iewnd_OnSize().

◆ create_frame_hwnd()

static void create_frame_hwnd ( InternetExplorer This)
static

Definition at line 740 of file iexplore.c.

741 {
748  NULL, NULL /* FIXME */, ieframe_instance, This);
749 
750  create_doc_view_hwnd(&This->doc_host);
751 }
#define WS_THICKFRAME
Definition: pedump.c:630
#define WS_EX_WINDOWEDGE
Definition: winuser.h:407
HINSTANCE ieframe_instance
Definition: ieframe_main.c:32
#define WS_CLIPCHILDREN
Definition: pedump.c:619
#define CW_USEDEFAULT
Definition: winuser.h:225
smooth NULL
Definition: ftsmooth.c:416
#define WS_MAXIMIZEBOX
Definition: pedump.c:632
#define WS_CAPTION
Definition: pedump.c:624
static const WCHAR szIEWinFrame[]
Definition: iexplore.c:52
void create_doc_view_hwnd(DocHost *This)
Definition: dochost.c:480
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)
#define WS_MINIMIZEBOX
Definition: pedump.c:631
static const WCHAR wszWineInternetExplorer[]
Definition: iexplore.c:55
#define WS_SYSMENU
Definition: pedump.c:629

Referenced by create_ie().

◆ create_ie()

static HRESULT create_ie ( InternetExplorer **  ret_obj)
static

Definition at line 813 of file iexplore.c.

814 {
816 
817  ret = heap_alloc_zero(sizeof(InternetExplorer));
818  if(!ret)
819  return E_OUTOFMEMORY;
820 
821  ret->ref = 1;
822 
823  DocHost_Init(&ret->doc_host, &ret->IWebBrowser2_iface, &DocHostContainerVtbl);
824 
826 
827  HlinkFrame_Init(&ret->hlink_frame, (IUnknown*)&ret->IWebBrowser2_iface, &ret->doc_host);
828 
830 
832  list_add_tail(&ie_list, &ret->entry);
833  *ret_obj = ret;
834  return S_OK;
835 }
static LONG obj_cnt
Definition: iexplore.c:58
void HlinkFrame_Init(HlinkFrame *, IUnknown *, DocHost *) DECLSPEC_HIDDEN
Definition: navigate.c:1689
static struct list ie_list
Definition: iexplore.c:61
void DocHost_Init(DocHost *This, IWebBrowser2 *wb, const IDocHostContainerVtbl *container)
Definition: dochost.c:1105
__WINE_SERVER_LIST_INLINE void list_add_tail(struct list *list, struct list *elem)
Definition: list.h:102
static void create_frame_hwnd(InternetExplorer *This)
Definition: iexplore.c:740
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
int ret
static const IDocHostContainerVtbl DocHostContainerVtbl
Definition: iexplore.c:804
#define S_OK
Definition: intsafe.h:59
#define InterlockedIncrement
Definition: armddk.h:53
void InternetExplorer_WebBrowser_Init(InternetExplorer *This)
Definition: ie.c:839

Referenced by create_ie_window(), InternetExplorer_Create(), and open_dde_url().

◆ create_ie_menu()

static HMENU create_ie_menu ( void  )
static

Definition at line 318 of file iexplore.c.

319 {
321  HMENU favmenu = get_fav_menu(menu);
323 
325 
327  add_favs_to_menu(favmenu, favmenu, path);
328 
330  add_favs_to_menu(favmenu, favmenu, path);
331 
332  return menu;
333 }
static HMENU get_fav_menu(HMENU menu)
Definition: iexplore.c:95
#define CSIDL_COMMON_FAVORITES
Definition: shlobj.h:2033
HINSTANCE ieframe_instance
Definition: ieframe_main.c:32
static void add_favs_to_menu(HMENU favmenu, HMENU menu, LPCWSTR dir)
Definition: iexplore.c:171
#define CSIDL_FAVORITES
Definition: shlobj.h:2009
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define IDR_BROWSE_MAIN_MENU
Definition: resource.h:26
#define MAX_PATH
Definition: compat.h:26
static void add_tbs_to_menu(HMENU menu)
Definition: iexplore.c:251
#define S_OK
Definition: intsafe.h:59
Definition: services.c:325
HRESULT WINAPI SHGetFolderPathW(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwFlags, LPWSTR pszPath)
Definition: shellpath.c:2085
HMENU WINAPI LoadMenuW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
static HMENU get_tb_menu(HMENU menu)
Definition: iexplore.c:88
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60

Referenced by iewnd_OnCreate().

◆ create_ie_window()

static BOOL create_ie_window ( BOOL  nohome,
const WCHAR cmdline 
)
static

Definition at line 952 of file iexplore.c.

953 {
954  InternetExplorer *ie;
955  HRESULT hres;
956 
957  hres = create_ie(&ie);
958  if(FAILED(hres))
959  return FALSE;
960 
961  IWebBrowser2_put_Visible(&ie->IWebBrowser2_iface, VARIANT_TRUE);
962  IWebBrowser2_put_MenuBar(&ie->IWebBrowser2_iface, VARIANT_TRUE);
963 
964  if(!*cmdline) {
965  if (nohome)
966  ie->nohome = TRUE;
967  else
968  IWebBrowser2_GoHome(&ie->IWebBrowser2_iface);
969  }else {
970  VARIANT var_url;
971  int cmdlen;
972 
973  cmdlen = strlenW(cmdline);
974  if(cmdlen > 2 && cmdline[0] == '"' && cmdline[cmdlen-1] == '"') {
975  cmdline++;
976  cmdlen -= 2;
977  }
978 
979  V_VT(&var_url) = VT_BSTR;
980  V_BSTR(&var_url) = SysAllocStringLen(cmdline, cmdlen);
981 
982  /* navigate to the first page */
983  IWebBrowser2_Navigate2(&ie->IWebBrowser2_iface, &var_url, NULL, NULL, NULL, NULL);
984 
985  SysFreeString(V_BSTR(&var_url));
986  }
987 
988  IWebBrowser2_Release(&ie->IWebBrowser2_iface);
989  return TRUE;
990 }
#define TRUE
Definition: types.h:120
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:342
static HRESULT create_ie(InternetExplorer **ret_obj)
Definition: iexplore.c:813
TCHAR * cmdline
Definition: stretchblt.cpp:32
IWebBrowser2 IWebBrowser2_iface
Definition: ieframe.h:232
smooth NULL
Definition: ftsmooth.c:416
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:274

Referenced by IEWinMain().

◆ create_rebar()

static void create_rebar ( InternetExplorer ie)
static

Definition at line 445 of file iexplore.c.

446 {
447  HWND hwndRebar;
448  HWND hwndAddress;
449  REBARINFO rebarinf;
450  REBARBANDINFOW bandinf;
451  WCHAR addr[40];
452  HIMAGELIST imagelist;
453  SIZE toolbar_size;
454 
456 
460 
461  rebarinf.cbSize = sizeof(rebarinf);
462  rebarinf.fMask = 0;
463  rebarinf.himl = NULL;
464 
465  SendMessageW(hwndRebar, RB_SETBARINFO, 0, (LPARAM)&rebarinf);
466 
468  0, 0, 0, 0, hwndRebar, (HMENU)IDC_BROWSE_TOOLBAR, ieframe_instance, NULL);
469 
471 
472  SendMessageW(ie->toolbar_hwnd, TB_SETIMAGELIST, 0, (LPARAM)imagelist);
479  add_tb_separator(ie);
482  SendMessageW(ie->toolbar_hwnd, TB_GETMAXSIZE, 0, (LPARAM)&toolbar_size);
483 
484  bandinf.cbSize = sizeof(bandinf);
486  bandinf.fStyle = RBBS_CHILDEDGE;
487  bandinf.cxMinChild = toolbar_size.cx;
488  bandinf.cyMinChild = toolbar_size.cy+2;
489  bandinf.hwndChild = ie->toolbar_hwnd;
490 
491  SendMessageW(hwndRebar, RB_INSERTBANDW, -1, (LPARAM)&bandinf);
492 
494  0, 0, 100,20,hwndRebar, (HMENU)IDC_BROWSE_ADDRESSBAR, ieframe_instance, NULL);
495 
496  bandinf.fMask |= RBBIM_TEXT;
497  bandinf.fStyle = RBBS_CHILDEDGE | RBBS_BREAK;
498  bandinf.lpText = addr;
499  bandinf.cxMinChild = 100;
500  bandinf.cyMinChild = 20;
501  bandinf.hwndChild = hwndAddress;
502 
503  SendMessageW(hwndRebar, RB_INSERTBANDW, -1, (LPARAM)&bandinf);
504 }
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
static void add_tb_button(InternetExplorer *ie, int bmp, int cmd, int strId)
Definition: iexplore.c:423
#define TB_SETBUTTONSIZE
Definition: commctrl.h:1107
#define TB_BUTTONSTRUCTSIZE
Definition: commctrl.h:1106
#define RBBIM_CHILD
Definition: commctrl.h:1478
#define RBS_VARHEIGHT
Definition: commctrl.h:1443
#define IDC_BROWSE_REBAR
Definition: resource.h:29
#define ID_BROWSE_BACK
Definition: resource.h:47
#define MAKELPARAM(l, h)
Definition: winuser.h:3915
#define ID_BROWSE_REFRESH
Definition: resource.h:50
#define RBBS_BREAK
Definition: commctrl.h:1461
#define TOOLBARCLASSNAMEW
Definition: commctrl.h:915
#define IDS_TB_REFRESH
Definition: resource.h:61
HINSTANCE ieframe_instance
Definition: ieframe_main.c:32
#define RBBS_CHILDEDGE
Definition: commctrl.h:1463
#define WS_CHILD
Definition: pedump.c:617
#define TB_GETMAXSIZE
Definition: commctrl.h:1161
#define WS_CLIPCHILDREN
Definition: pedump.c:619
#define WS_EX_TOOLWINDOW
Definition: winuser.h:404
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define REBARCLASSNAMEW
Definition: commctrl.h:1435
#define RBBIM_STYLE
Definition: commctrl.h:1474
#define CCS_NODIVIDER
Definition: commctrl.h:2220
#define IDS_ADDRESS
Definition: resource.h:65
#define IDS_TB_HOME
Definition: resource.h:62
#define ID_BROWSE_HOME
Definition: resource.h:46
HWND toolbar_hwnd
Definition: ieframe.h:242
smooth NULL
Definition: ftsmooth.c:416
LONG cx
Definition: windef.h:319
LONG_PTR LPARAM
Definition: windef.h:208
#define CCS_TOP
Definition: commctrl.h:2214
#define RB_INSERTBANDW
Definition: commctrl.h:1555
#define ID_BROWSE_STOP
Definition: resource.h:49
#define CLR_NONE
Definition: commctrl.h:304
#define RB_SETBARINFO
Definition: commctrl.h:1550
#define TB_SETIMAGELIST
Definition: commctrl.h:1122
#define RBBIM_TEXT
Definition: commctrl.h:1476
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define IDB_IETOOLBAR
Definition: resource.h:67
static void add_tb_separator(InternetExplorer *ie)
Definition: iexplore.c:412
#define RBBIM_CHILDSIZE
Definition: commctrl.h:1479
#define CCS_NORESIZE
Definition: commctrl.h:2217
#define IDS_TB_BACK
Definition: resource.h:58
GLenum const GLvoid * addr
Definition: glext.h:9621
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)
HIMAGELIST himl
Definition: commctrl.h:1455
#define WS_BORDER
Definition: pedump.c:625
#define IDS_TB_FORWARD
Definition: resource.h:59
#define ID_BROWSE_FORWARD
Definition: resource.h:48
#define ARRAY_SIZE(a)
Definition: main.h:24
#define CBS_DROPDOWN
Definition: winuser.h:283
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define LR_CREATEDIBSECTION
Definition: winuser.h:1088
#define IDS_TB_STOP
Definition: resource.h:60
#define WC_COMBOBOXEXW
Definition: commctrl.h:3753
#define IMAGE_BITMAP
Definition: winuser.h:211
#define IDS_TB_PRINT
Definition: resource.h:63
HIMAGELIST WINAPI ImageList_LoadImageW(HINSTANCE hi, LPCWSTR lpbmp, INT cx, INT cGrow, COLORREF clrMask, UINT uType, UINT uFlags)
Definition: imagelist.c:2106
#define IDC_BROWSE_ADDRESSBAR
Definition: resource.h:30
#define TBSTYLE_EX_MIXEDBUTTONS
Definition: commctrl.h:984
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define WS_VISIBLE
Definition: pedump.c:620
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
LONG cy
Definition: windef.h:320
#define IDC_BROWSE_TOOLBAR
Definition: resource.h:32
#define TBSTYLE_FLAT
Definition: commctrl.h:964
#define ID_BROWSE_PRINT
Definition: resource.h:39

Referenced by iewnd_OnCreate().

◆ dde_proc()

static HDDEDATA WINAPI dde_proc ( UINT  type,
UINT  uFmt,
HCONV  hConv,
HSZ  hsz1,
HSZ  hsz2,
HDDEDATA  data,
ULONG_PTR  dwData1,
ULONG_PTR  dwData2 
)
static

Definition at line 1050 of file iexplore.c.

1052 {
1053  switch(type) {
1054  case XTYP_CONNECT:
1055  TRACE("XTYP_CONNECT %p\n", hsz1);
1057 
1058  case XTYP_EXECUTE: {
1059  WCHAR *url;
1060  DWORD size;
1061  HDDEDATA ret;
1062 
1063  TRACE("XTYP_EXECUTE %p\n", data);
1064 
1065  size = DdeGetData(data, NULL, 0, 0);
1066  if(!size) {
1067  WARN("size = 0\n");
1068  break;
1069  }
1070 
1071  url = heap_alloc(size);
1072  if(!url)
1073  break;
1074 
1075  if(DdeGetData(data, (BYTE*)url, size, 0) != size) {
1076  ERR("error during read\n");
1077  heap_free(url);
1078  break;
1079  }
1080 
1081  ret = open_dde_url(url);
1082 
1083  heap_free(url);
1084  return ret;
1085  }
1086 
1087  case XTYP_REQUEST:
1088  FIXME("XTYP_REQUEST\n");
1089  break;
1090 
1091  default:
1092  TRACE("type %d\n", type);
1093  }
1094 
1095  return NULL;
1096 }
#define XTYP_REQUEST
Definition: ddeml.h:191
#define ULongToHandle(h)
Definition: basetsd.h:81
#define XTYP_EXECUTE
Definition: ddeml.h:185
#define WARN(fmt,...)
Definition: debug.h:111
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define FIXME(fmt,...)
Definition: debug.h:110
static HDDEDATA open_dde_url(WCHAR *dde_url)
Definition: iexplore.c:992
smooth NULL
Definition: ftsmooth.c:416
static HSZ ddestr_openurl
Definition: iexplore.c:60
INT WINAPI DdeCmpStringHandles(HSZ, HSZ)
Definition: ddemisc.c:685
#define XTYP_CONNECT
Definition: ddeml.h:186
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
__wchar_t WCHAR
Definition: xmlstorage.h:180
static const WCHAR url[]
Definition: encode.c:1432
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
int ret
unsigned char BYTE
Definition: mem.h:68
#define ERR(fmt,...)
Definition: debug.h:109
DWORD WINAPI DdeGetData(HDDEDATA, LPBYTE, DWORD, DWORD)
Definition: ddemisc.c:1379
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by init_dde().

◆ DocHostContainer_get_docobj_rect()

static void DocHostContainer_get_docobj_rect ( DocHost This,
RECT rc 
)
static

Definition at line 770 of file iexplore.c.

771 {
772  GetClientRect(This->frame_hwnd, rc);
773  adjust_ie_docobj_rect(This->frame_hwnd, rc);
774 }
static void adjust_ie_docobj_rect(HWND frame, RECT *rc)
Definition: iexplore.c:71
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)

◆ DocHostContainer_on_command_state_change()

static void DocHostContainer_on_command_state_change ( DocHost iface,
LONG  command,
BOOL  enable 
)
static

Definition at line 782 of file iexplore.c.

783 {
785 
786  switch(command) {
787  case CSC_NAVIGATEBACK:
789  break;
790  case CSC_NAVIGATEFORWARD:
792  break;
793  }
794 }
#define ID_BROWSE_BACK
Definition: resource.h:47
static InternetExplorer * impl_from_DocHost(DocHost *iface)
Definition: iexplore.c:753
SHDocVw::uuid CSC_NAVIGATEBACK
GLboolean enable
Definition: glext.h:11120
#define ID_BROWSE_FORWARD
Definition: resource.h:48
static void enable_toolbar_button(InternetExplorer *ie, int command, BOOL enable)
Definition: iexplore.c:440
SHDocVw::uuid CSC_NAVIGATEFORWARD

◆ DocHostContainer_set_status_text()

static HRESULT DocHostContainer_set_status_text ( DocHost iface,
const WCHAR text 
)
static

Definition at line 776 of file iexplore.c.

777 {
779  return update_ie_statustext(This, text);
780 }
const WCHAR * text
Definition: package.c:1827
static InternetExplorer * impl_from_DocHost(DocHost *iface)
Definition: iexplore.c:753
HRESULT update_ie_statustext(InternetExplorer *This, LPCWSTR text)
Definition: iexplore.c:63

◆ DocHostContainer_set_url()

static void DocHostContainer_set_url ( DocHost iface,
const WCHAR url 
)
static

Definition at line 796 of file iexplore.c.

797 {
799 
800  This->nohome = FALSE;
801  SendMessageW(This->frame_hwnd, WM_UPDATEADDRBAR, 0, (LPARAM)url);
802 }
#define WM_UPDATEADDRBAR
Definition: iexplore.c:50
static InternetExplorer * impl_from_DocHost(DocHost *iface)
Definition: iexplore.c:753
LONG_PTR LPARAM
Definition: windef.h:208
static const WCHAR url[]
Definition: encode.c:1432
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

◆ enable_toolbar_button()

static void enable_toolbar_button ( InternetExplorer ie,
int  command,
BOOL  enable 
)
static

Definition at line 440 of file iexplore.c.

441 {
443 }
#define TB_ENABLEBUTTON
Definition: commctrl.h:1014
HWND toolbar_hwnd
Definition: ieframe.h:242
GLboolean enable
Definition: glext.h:11120
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

Referenced by DocHostContainer_on_command_state_change().

◆ free_fav_menu_data()

static void free_fav_menu_data ( HMENU  menu)
static

Definition at line 113 of file iexplore.c.

114 {
115  LPWSTR url;
116  int i;
117 
118  for(i = 0; (url = get_fav_url_from_id(menu, ID_BROWSE_GOTOFAV_FIRST + i)); i++)
119  heap_free( url );
120 }
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 LPWSTR get_fav_url_from_id(HMENU menu, UINT id)
Definition: iexplore.c:100
static const WCHAR url[]
Definition: encode.c:1432
#define ID_BROWSE_GOTOFAV_FIRST
Definition: resource.h:55
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by iewnd_OnDestroy().

◆ get_fav_menu()

static HMENU get_fav_menu ( HMENU  menu)
static

Definition at line 95 of file iexplore.c.

96 {
97  return GetSubMenu(menu, 2);
98 }
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)

Referenced by create_ie_menu(), iewnd_OnCommand(), and iewnd_OnDestroy().

◆ get_fav_url_from_id()

static LPWSTR get_fav_url_from_id ( HMENU  menu,
UINT  id 
)
static

Definition at line 100 of file iexplore.c.

101 {
103 
104  item.cbSize = sizeof(item);
105  item.fMask = MIIM_DATA;
106 
107  if(!GetMenuItemInfoW(menu, id, FALSE, &item))
108  return NULL;
109 
110  return (LPWSTR)item.dwItemData;
111 }
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI GetMenuItemInfoW(_In_ HMENU, _In_ UINT, _In_ BOOL, _Inout_ LPMENUITEMINFOW)
static ATOM item
Definition: dde.c:856
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define MIIM_DATA
Definition: winuser.h:721

Referenced by free_fav_menu_data(), and iewnd_OnCommand().

◆ get_menu_item_count()

static int get_menu_item_count ( HMENU  menu)
static

Definition at line 122 of file iexplore.c.

123 {
125  int count = 0;
126  int i;
127 
128  item.cbSize = sizeof(item);
129  item.fMask = MIIM_DATA | MIIM_SUBMENU;
130 
131  for(i = 0; GetMenuItemInfoW(menu, i, TRUE, &item); i++)
132  {
133  if(item.hSubMenu)
134  count += get_menu_item_count(item.hSubMenu);
135  else
136  count++;
137  }
138 
139  return count;
140 }
#define TRUE
Definition: types.h:120
static int get_menu_item_count(HMENU menu)
Definition: iexplore.c:122
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define MIIM_SUBMENU
Definition: winuser.h:718
BOOL WINAPI GetMenuItemInfoW(_In_ HMENU, _In_ UINT, _In_ BOOL, _Inout_ LPMENUITEMINFOW)
static ATOM item
Definition: dde.c:856
#define MIIM_DATA
Definition: winuser.h:721

Referenced by add_fav_to_menu().

◆ get_tb_menu()

static HMENU get_tb_menu ( HMENU  menu)
static

Definition at line 88 of file iexplore.c.

89 {
90  HMENU menu_view = GetSubMenu(menu, 1);
91 
92  return GetSubMenu(menu_view, 0);
93 }
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60

Referenced by create_ie_menu().

◆ ie_dialog_about()

static void ie_dialog_about ( HWND  hwnd)
static

Definition at line 396 of file iexplore.c.

397 {
399 
401 
402  DestroyIcon(icon);
403 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
static HICON
Definition: imagelist.c:84
#define LR_SHARED
Definition: winuser.h:1090
#define IMAGE_ICON
Definition: winuser.h:212
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2022
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_ UINT, _In_ int, _In_ int, _In_ UINT)
Definition: cursoricon.c:2172
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI ShellAboutW(HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, HICON hIcon)
#define IDI_APPICON
Definition: iexplore.c:48
static const WCHAR wszWineInternetExplorer[]
Definition: iexplore.c:55
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:845
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582

Referenced by iewnd_OnCommand().

◆ ie_dialog_open_proc()

static INT_PTR CALLBACK ie_dialog_open_proc ( HWND  hwnd,
UINT  msg,
WPARAM  wparam,
LPARAM  lparam 
)
static

Definition at line 347 of file iexplore.c.

348 {
349  static InternetExplorer* This;
350 
351  switch(msg)
352  {
353  case WM_INITDIALOG:
356  return TRUE;
357 
358  case WM_COMMAND:
359  switch(LOWORD(wparam))
360  {
361  case IDC_BROWSE_OPEN_URL:
362  {
364  int len = GetWindowTextLengthW(hwndurl);
365 
367  break;
368  }
369  case IDOK:
370  {
372  int len = GetWindowTextLengthW(hwndurl);
373 
374  if(len)
375  {
376  VARIANT url;
377 
378  V_VT(&url) = VT_BSTR;
380 
381  GetWindowTextW(hwndurl, V_BSTR(&url), len + 1);
382  IWebBrowser2_Navigate2(&This->IWebBrowser2_iface, &url, NULL, NULL, NULL, NULL);
383 
385  }
386  }
387  /* fall through */
388  case IDCANCEL:
390  return TRUE;
391  }
392  }
393  return FALSE;
394 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define TRUE
Definition: types.h:120
#define IDOK
Definition: winuser.h:824
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:342
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
smooth NULL
Definition: ftsmooth.c:416
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
static const WCHAR url[]
Definition: encode.c:1432
int WINAPI GetWindowTextLengthW(_In_ HWND)
#define V_VT(A)
Definition: oleauto.h:211
GLenum GLsizei len
Definition: glext.h:6722
#define WM_COMMAND
Definition: winuser.h:1716
#define V_BSTR(A)
Definition: oleauto.h:226
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
Definition: window.c:1378
#define IDC_BROWSE_OPEN_URL
Definition: resource.h:28
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:274
#define msg(x)
Definition: auth_time.c:54
#define IDCANCEL
Definition: winuser.h:825
#define WM_INITDIALOG
Definition: winuser.h:1715
#define LOWORD(l)
Definition: pedump.c:82
static UINT WPARAM wparam
Definition: combo.c:716

Referenced by iewnd_OnCommand().

◆ ie_navigate()

static void ie_navigate ( InternetExplorer This,
LPCWSTR  url 
)
static

Definition at line 335 of file iexplore.c.

336 {
337  VARIANT variant;
338 
339  V_VT(&variant) = VT_BSTR;
340  V_BSTR(&variant) = SysAllocString(url);
341 
342  IWebBrowser2_Navigate2(&This->IWebBrowser2_iface, &variant, NULL, NULL, NULL, NULL);
343 
344  SysFreeString(V_BSTR(&variant));
345 }
smooth NULL
Definition: ftsmooth.c:416
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:241
static const WCHAR url[]
Definition: encode.c:1432
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:274

Referenced by iewnd_OnCommand().

◆ ie_window_proc()

static LRESULT WINAPI ie_window_proc ( HWND  hwnd,
UINT  msg,
WPARAM  wparam,
LPARAM  lparam 
)
static

Definition at line 675 of file iexplore.c.

676 {
678 
679  switch (msg)
680  {
681  case WM_CREATE:
683  case WM_CLOSE:
684  TRACE("WM_CLOSE\n");
686  return 0;
687  case WM_SHOWWINDOW:
688  TRACE("WM_SHOWWINDOW %lx\n", wparam);
689  if(wparam) {
690  IWebBrowser2_AddRef(&This->IWebBrowser2_iface);
691  InterlockedIncrement(&This->extern_ref);
692  }else {
694  IWebBrowser2_Release(&This->IWebBrowser2_iface);
695  }
696  break;
697  case WM_DESTROY:
698  return iewnd_OnDestroy(This);
699  case WM_SIZE:
701  case WM_COMMAND:
703  case WM_NOTIFY:
704  return iewnd_OnNotify(This, wparam, lparam);
705  case WM_DOCHOSTTASK:
706  return process_dochost_tasks(&This->doc_host);
707  case WM_UPDATEADDRBAR:
708  return update_addrbar(This, lparam);
709  }
710  return DefWindowProcW(hwnd, msg, wparam, lparam);
711 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define TRUE
Definition: types.h:120
static LRESULT iewnd_OnCommand(InternetExplorer *This, HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
Definition: iexplore.c:594
static LRESULT update_addrbar(InternetExplorer *This, LPARAM lparam)
Definition: iexplore.c:663
#define SW_HIDE
Definition: winuser.h:762
static LRESULT iewnd_OnDestroy(InternetExplorer *This)
Definition: iexplore.c:581
LRESULT process_dochost_tasks(DocHost *This)
Definition: dochost.c:55
#define WM_SHOWWINDOW
Definition: winuser.h:1610
#define GetWindowLongPtrW
Definition: winuser.h:4698
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_UPDATEADDRBAR
Definition: iexplore.c:50
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
#define WM_DESTROY
Definition: winuser.h:1591
#define TRACE(s)
Definition: solgame.cpp:4
#define WM_SIZE
Definition: winuser.h:1593
#define WM_DOCHOSTTASK
Definition: ieframe.h:293
#define WM_CLOSE
Definition: winuser.h:1603
DWORD release_extern_ref(InternetExplorer *This, BOOL last_closes)
Definition: ie.c:723
#define WM_COMMAND
Definition: winuser.h:1716
#define InterlockedIncrement
Definition: armddk.h:53
#define msg(x)
Definition: auth_time.c:54
static LRESULT iewnd_OnNotify(InternetExplorer *This, WPARAM wparam, LPARAM lparam)
Definition: iexplore.c:543
#define WM_CREATE
Definition: winuser.h:1590
#define HIWORD(l)
Definition: typedefs.h:246
static LRESULT iewnd_OnSize(InternetExplorer *This, INT width, INT height)
Definition: iexplore.c:524
#define LOWORD(l)
Definition: pedump.c:82
#define WM_NOTIFY
Definition: richedit.h:61
static UINT WPARAM wparam
Definition: combo.c:716
static LRESULT iewnd_OnCreate(HWND hwnd, LPCREATESTRUCTW lpcs)
Definition: iexplore.c:506

Referenced by register_iewindow_class().

◆ IEDocHost_addref()

static ULONG IEDocHost_addref ( DocHost iface)
static

Definition at line 758 of file iexplore.c.

759 {
761  return IWebBrowser2_AddRef(&This->IWebBrowser2_iface);
762 }
static InternetExplorer * impl_from_DocHost(DocHost *iface)
Definition: iexplore.c:753

◆ IEDocHost_release()

static ULONG IEDocHost_release ( DocHost iface)
static

Definition at line 764 of file iexplore.c.

765 {
767  return IWebBrowser2_Release(&This->IWebBrowser2_iface);
768 }
static InternetExplorer * impl_from_DocHost(DocHost *iface)
Definition: iexplore.c:753

◆ IEWinMain()

DWORD WINAPI IEWinMain ( const WCHAR cmdline,
int  nShowWindow 
)

Definition at line 1139 of file iexplore.c.

1140 {
1141  MSG msg;
1142  HRESULT hres;
1143  BOOL embedding = FALSE, nohome = FALSE, manager = FALSE;
1144  DWORD reg_cookie;
1145 
1146  static const WCHAR embeddingW[] = {'-','e','m','b','e','d','d','i','n','g',0};
1147  static const WCHAR nohomeW[] = {'-','n','o','h','o','m','e',0};
1148  static const WCHAR startmanagerW[] = {'-','s','t','a','r','t','m','a','n','a','g','e','r',0};
1149 
1150  TRACE("%s %d\n", debugstr_w(cmdline), nShowWindow);
1151 
1152  CoInitialize(NULL);
1153 
1154  init_dde();
1155 
1156  while (*cmdline)
1157  {
1158  int length = 0;
1159 
1160  while (*cmdline == ' ' || *cmdline == '\t') cmdline++;
1161  if (!*cmdline) break;
1162 
1163  while (cmdline[length] && cmdline[length] != ' ' && cmdline[length] != '\t') length++;
1164 
1165  if (!strncmpiW(cmdline, embeddingW, length))
1166  embedding = TRUE;
1167  else if (!strncmpiW(cmdline, nohomeW, length))
1168  nohome = TRUE;
1169  else if (!strncmpiW(cmdline, startmanagerW, length))
1170  manager = TRUE;
1171  else
1172  break;
1173 
1174  cmdline += length;
1175  }
1176 
1177  if (manager)
1178  hres = CoRegisterClassObject(&CLSID_InternetExplorerManager,
1179  (IUnknown*)&InternetExplorerManagerFactory, CLSCTX_SERVER,
1180  REGCLS_SINGLEUSE, &reg_cookie);
1181  else
1182  hres = CoRegisterClassObject(&CLSID_InternetExplorer,
1183  (IUnknown*)&InternetExplorerFactory, CLSCTX_SERVER,
1184  REGCLS_MULTIPLEUSE, &reg_cookie);
1185 
1186  if (FAILED(hres))
1187  {
1188  ERR("failed to register CLSID_InternetExplorer%s: %08x\n", manager ? "Manager" : "", hres);
1189  CoUninitialize();
1190  ExitProcess(1);
1191  }
1192 
1193  if (!embedding)
1194  {
1195  if(!create_ie_window(nohome, cmdline))
1196  {
1197  CoUninitialize();
1198  ExitProcess(1);
1199  }
1200  }
1201 
1202  /* run the message loop for this thread */
1203  while (GetMessageW(&msg, 0, 0, 0))
1204  {
1207  }
1208 
1209  CoRevokeClassObject(reg_cookie);
1210  release_dde();
1211 
1212  CoUninitialize();
1213 
1214  ExitProcess(0);
1215  return 0;
1216 }
IClassFactory InternetExplorerManagerFactory
Definition: ieframe_main.c:253
BOOL WINAPI TranslateMessage(_In_ const MSG *)
#define TRUE
Definition: types.h:120
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
VOID WINAPI ExitProcess(IN UINT uExitCode)
Definition: proc.c:1517
TCHAR * cmdline
Definition: stretchblt.cpp:32
#define strncmpiW(s1, s2, n)
Definition: unicode.h:40
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
unsigned int BOOL
Definition: ntddk_ex.h:94
static BOOL create_ie_window(BOOL nohome, const WCHAR *cmdline)
Definition: iexplore.c:952
#define debugstr_w
Definition: kernel32.h:32
smooth NULL
Definition: ftsmooth.c:416
HRESULT WINAPI DECLSPEC_HOTPATCH CoRevokeClassObject(DWORD dwRegister)
Definition: compobj.c:1089
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
unsigned long DWORD
Definition: ntddk_ex.h:95
#define ERR(fmt,...)
Definition: debug.h:109
IClassFactory InternetExplorerFactory
Definition: ieframe_main.c:243
HRESULT WINAPI CoRegisterClassObject(REFCLSID rclsid, LPUNKNOWN pUnk, DWORD dwClsContext, DWORD flags, LPDWORD lpdwRegister)
Definition: compobj.c:2806
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:1991
static void release_dde(void)
Definition: iexplore.c:1123
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:1897
#define msg(x)
Definition: auth_time.c:54
static void init_dde(void)
Definition: iexplore.c:1098

Referenced by wWinMain().

◆ iewnd_OnCommand()

static LRESULT iewnd_OnCommand ( InternetExplorer This,
HWND  hwnd,
UINT  msg,
WPARAM  wparam,
LPARAM  lparam 
)
static

Definition at line 594 of file iexplore.c.

595 {
596  switch(LOWORD(wparam))
597  {
598  case ID_BROWSE_OPEN:
600  break;
601 
602  case ID_BROWSE_PRINT:
603  if(This->doc_host.document)
604  {
606 
607  if(FAILED(IUnknown_QueryInterface(This->doc_host.document, &IID_IOleCommandTarget, (LPVOID*)&target)))
608  break;
609 
610  IOleCommandTarget_Exec(target, &CGID_MSHTML, IDM_PRINT, OLECMDEXECOPT_DODEFAULT, NULL, NULL);
611 
612  IOleCommandTarget_Release(target);
613  }
614  break;
615 
616  case ID_BROWSE_HOME:
617  IWebBrowser2_GoHome(&This->IWebBrowser2_iface);
618  break;
619 
620  case ID_BROWSE_BACK:
621  IWebBrowser2_GoBack(&This->IWebBrowser2_iface);
622  break;
623 
624  case ID_BROWSE_FORWARD:
625  IWebBrowser2_GoForward(&This->IWebBrowser2_iface);
626  break;
627 
628  case ID_BROWSE_STOP:
629  IWebBrowser2_Stop(&This->IWebBrowser2_iface);
630  break;
631 
632  case ID_BROWSE_REFRESH:
633  IWebBrowser2_Refresh(&This->IWebBrowser2_iface);
634  break;
635 
636  case ID_BROWSE_ABOUT:
638  break;
639 
640 #ifdef __REACTOS__
642  ie_dialog_properties(hwnd);
643  break;
644 #endif
645 
646  case ID_BROWSE_QUIT:
648  break;
649 
650  default:
652  {
654 
655  if(url)
656  ie_navigate(This, url);
657  }
658  return DefWindowProcW(hwnd, msg, wparam, lparam);
659  }
660  return 0;
661 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
static HMENU get_fav_menu(HMENU menu)
Definition: iexplore.c:95
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
static void ie_dialog_about(HWND hwnd)
Definition: iexplore.c:396
#define SW_HIDE
Definition: winuser.h:762
#define ID_BROWSE_BACK
Definition: resource.h:47
#define ID_BROWSE_REFRESH
Definition: resource.h:50
#define IDD_BROWSE_OPEN
Definition: resource.h:27
#define ID_BROWSE_QUIT
Definition: resource.h:42
HINSTANCE ieframe_instance
Definition: ieframe_main.c:32
static INT_PTR CALLBACK ie_dialog_open_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
Definition: iexplore.c:347
#define ID_BROWSE_OPEN
Definition: resource.h:35
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define ID_BROWSE_GOTOFAV_MAX
Definition: resource.h:56
#define ID_BROWSE_ABOUT
Definition: resource.h:43
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
#define ID_BROWSE_HOME
Definition: resource.h:46
static void ie_navigate(InternetExplorer *This, LPCWSTR url)
Definition: iexplore.c:335
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define ID_BROWSE_STOP
Definition: resource.h:49
static LPWSTR get_fav_url_from_id(HMENU menu, UINT id)
Definition: iexplore.c:100
static const WCHAR url[]
Definition: encode.c:1432
#define ID_BROWSE_PROPERTIES
Definition: resource.h:41
#define ID_BROWSE_FORWARD
Definition: resource.h:48
#define ID_BROWSE_GOTOFAV_FIRST
Definition: resource.h:55
#define msg(x)
Definition: auth_time.c:54
#define IDM_PRINT
Definition: mshtmcid.h:49
GLenum target
Definition: glext.h:7315
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define LOWORD(l)
Definition: pedump.c:82
static UINT WPARAM wparam
Definition: combo.c:716
#define ID_BROWSE_PRINT
Definition: resource.h:39

Referenced by ie_window_proc().

◆ iewnd_OnCreate()

static LRESULT iewnd_OnCreate ( HWND  hwnd,
LPCREATESTRUCTW  lpcs 
)
static

Definition at line 506 of file iexplore.c.

507 {
510 
511  This->doc_host.frame_hwnd = This->frame_hwnd = hwnd;
512 
513  This->menu = create_ie_menu();
514 
517  SendMessageW(This->status_hwnd, SB_SIMPLE, TRUE, 0);
518 
520 
521  return 0;
522 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define TRUE
Definition: types.h:120
static HMENU create_ie_menu(void)
Definition: iexplore.c:318
#define WS_CHILD
Definition: pedump.c:617
#define CCS_NODIVIDER
Definition: commctrl.h:2220
HWND WINAPI CreateStatusWindowW(LONG style, LPCWSTR text, HWND parent, UINT wid)
Definition: commctrl.c:795
#define SB_SIMPLE
Definition: commctrl.h:1930
smooth NULL
Definition: ftsmooth.c:416
LPVOID lpCreateParams
Definition: winuser.h:2908
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define SetWindowLongPtrW
Definition: winuser.h:5215
#define IDC_BROWSE_STATUSBAR
Definition: resource.h:31
#define WS_VISIBLE
Definition: pedump.c:620
#define SBT_NOBORDERS
Definition: commctrl.h:1943
static void create_rebar(InternetExplorer *ie)
Definition: iexplore.c:445

Referenced by ie_window_proc().

◆ iewnd_OnDestroy()

static LRESULT iewnd_OnDestroy ( InternetExplorer This)
static

Definition at line 581 of file iexplore.c.

582 {
583  HIMAGELIST list = (HIMAGELIST)SendMessageW(This->toolbar_hwnd, TB_GETIMAGELIST, 0, 0);
584 
585  TRACE("%p\n", This);
586 
589  This->frame_hwnd = NULL;
590 
591  return 0;
592 }
static HMENU get_fav_menu(HMENU menu)
Definition: iexplore.c:95
#define TB_GETIMAGELIST
Definition: commctrl.h:1123
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
Definition: imagelist.c:893
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
struct _IMAGELIST * HIMAGELIST
Definition: commctrl.h:309
Definition: _list.h:228
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static void free_fav_menu_data(HMENU menu)
Definition: iexplore.c:113

Referenced by ie_window_proc().

◆ iewnd_OnNotify()

static LRESULT iewnd_OnNotify ( InternetExplorer This,
WPARAM  wparam,
LPARAM  lparam 
)
static

Definition at line 543 of file iexplore.c.

544 {
545  NMHDR* hdr = (NMHDR*)lparam;
546 
547  if(hdr->idFrom == IDC_BROWSE_ADDRESSBAR && hdr->code == CBEN_ENDEDITW)
548  {
550 
551  if(info->fChanged && info->iWhy == CBENF_RETURN)
552  {
553  VARIANT vt;
554 
555  V_VT(&vt) = VT_BSTR;
556  V_BSTR(&vt) = SysAllocString(info->szText);
557 
558  IWebBrowser2_Navigate2(&This->IWebBrowser2_iface, &vt, NULL, NULL, NULL, NULL);
559 
561 
562  return 0;
563  }
564  }
565 
566  if(hdr->idFrom == IDC_BROWSE_REBAR && hdr->code == RBN_HEIGHTCHANGE)
567  {
568  RECT docarea;
569 
570  GetClientRect(This->frame_hwnd, &docarea);
571  adjust_ie_docobj_rect(This->frame_hwnd, &docarea);
572 
573  if(This->doc_host.hwnd)
574  SetWindowPos(This->doc_host.hwnd, NULL, docarea.left, docarea.top, docarea.right, docarea.bottom,
576  }
577 
578  return 0;
579 }
char hdr[14]
Definition: iptest.cpp:33
#define IDC_BROWSE_REBAR
Definition: resource.h:29
#define RBN_HEIGHTCHANGE
Definition: commctrl.h:1600
static void adjust_ie_docobj_rect(HWND frame, RECT *rc)
Definition: iexplore.c:71
LONG top
Definition: windef.h:292
LONG left
Definition: windef.h:291
#define SWP_NOZORDER
Definition: winuser.h:1232
LONG right
Definition: windef.h:293
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
smooth NULL
Definition: ftsmooth.c:416
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:241
#define CBEN_ENDEDITW
Definition: commctrl.h:3848
#define SWP_NOACTIVATE
Definition: winuser.h:1227
static REFPROPVARIANT PROPVAR_CHANGE_FLAGS VARTYPE vt
Definition: suminfo.c:85
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define CBENF_RETURN
Definition: commctrl.h:3860
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:274
#define IDC_BROWSE_ADDRESSBAR
Definition: resource.h:30
LONG bottom
Definition: windef.h:294
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)

Referenced by ie_window_proc().

◆ iewnd_OnSize()

static LRESULT iewnd_OnSize ( InternetExplorer This,
INT  width,
INT  height 
)
static

Definition at line 524 of file iexplore.c.

525 {
526  HWND hwndRebar = GetDlgItem(This->frame_hwnd, IDC_BROWSE_REBAR);
527  INT barHeight = SendMessageW(hwndRebar, RB_GETBARHEIGHT, 0, 0);
528  RECT docarea = {0, 0, width, height};
529 
530  SendMessageW(This->status_hwnd, WM_SIZE, 0, 0);
531 
532  adjust_ie_docobj_rect(This->frame_hwnd, &docarea);
533 
534  if(This->doc_host.hwnd)
535  SetWindowPos(This->doc_host.hwnd, NULL, docarea.left, docarea.top, docarea.right, docarea.bottom,
537 
538  SetWindowPos(hwndRebar, NULL, 0, 0, width, barHeight, SWP_NOZORDER | SWP_NOACTIVATE);
539 
540  return 0;
541 }
GLint GLint GLsizei width
Definition: gl.h:1546
#define IDC_BROWSE_REBAR
Definition: resource.h:29
#define RB_GETBARHEIGHT
Definition: commctrl.h:1580
static void adjust_ie_docobj_rect(HWND frame, RECT *rc)
Definition: iexplore.c:71
LONG top
Definition: windef.h:292
LONG left
Definition: windef.h:291
#define SWP_NOZORDER
Definition: winuser.h:1232
LONG right
Definition: windef.h:293
int32_t INT
Definition: typedefs.h:56
smooth NULL
Definition: ftsmooth.c:416
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define WM_SIZE
Definition: winuser.h:1593
#define SWP_NOACTIVATE
Definition: winuser.h:1227
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LONG bottom
Definition: windef.h:294
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)

Referenced by ie_window_proc().

◆ impl_from_DocHost()

static InternetExplorer* impl_from_DocHost ( DocHost iface)
inlinestatic

Definition at line 753 of file iexplore.c.

754 {
755  return CONTAINING_RECORD(iface, InternetExplorer, doc_host);
756 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by DocHostContainer_on_command_state_change(), DocHostContainer_set_status_text(), DocHostContainer_set_url(), IEDocHost_addref(), and IEDocHost_release().

◆ impl_from_IInternetExplorerManager()

static InternetExplorerManager* impl_from_IInternetExplorerManager ( IInternetExplorerManager iface)
inlinestatic

Definition at line 864 of file iexplore.c.

865 {
866  return CONTAINING_RECORD(iface, InternetExplorerManager, IInternetExplorerManager_iface);
867 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by InternetExplorerManager_AddRef(), and InternetExplorerManager_Release().

◆ init_dde()

static void init_dde ( void  )
static

Definition at line 1098 of file iexplore.c.

1099 {
1100  UINT res;
1101 
1102  static const WCHAR iexploreW[] = {'I','E','x','p','l','o','r','e',0};
1103  static const WCHAR openurlW[] = {'W','W','W','_','O','p','e','n','U','R','L',0};
1104 
1106  if(res != DMLERR_NO_ERROR) {
1107  WARN("DdeInitialize failed: %u\n", res);
1108  return;
1109  }
1110 
1112  if(!ddestr_iexplore)
1113  WARN("Failed to create string handle: %u\n", DdeGetLastError(dde_inst));
1114 
1116  if(!ddestr_openurl)
1117  WARN("Failed to create string handle: %u\n", DdeGetLastError(dde_inst));
1118 
1120  WARN("DdeNameService failed\n");
1121 }
#define CBF_FAIL_ADVISES
Definition: ddeml.h:105
UINT WINAPI DdeGetLastError(DWORD)
Definition: ddemisc.c:253
#define WARN(fmt,...)
Definition: debug.h:111
#define CBF_FAIL_POKES
Definition: ddeml.h:107
#define DNS_REGISTER
Definition: ddeml.h:152
#define DMLERR_NO_ERROR
Definition: ddeml.h:242
static HSZ ddestr_openurl
Definition: iexplore.c:60
static HSZ ddestr_iexplore
Definition: iexplore.c:60
static DWORD dde_inst
Definition: iexplore.c:59
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define CP_WINUNICODE
Definition: ddeml.h:33
unsigned int UINT
Definition: ndis.h:50
HDDEDATA WINAPI DdeNameService(DWORD, HSZ, HSZ, UINT)
Definition: ddeserver.c:154
#define CBF_SKIP_ALLNOTIFICATIONS
Definition: ddeml.h:115
GLuint res
Definition: glext.h:9613
HSZ WINAPI DdeCreateStringHandleW(DWORD, LPCWSTR, INT)
Definition: ddemisc.c:608
UINT WINAPI DdeInitializeW(LPDWORD, PFNCALLBACK, DWORD, DWORD)
Definition: ddemisc.c:1095
static HDDEDATA WINAPI dde_proc(UINT type, UINT uFmt, HCONV hConv, HSZ hsz1, HSZ hsz2, HDDEDATA data, ULONG_PTR dwData1, ULONG_PTR dwData2)
Definition: iexplore.c:1050

Referenced by IEWinMain().

◆ InternetExplorer_Create()

HRESULT WINAPI InternetExplorer_Create ( IClassFactory iface,
IUnknown pOuter,
REFIID  riid,
void **  ppv 
)

Definition at line 837 of file iexplore.c.

838 {
840  HRESULT hres;
841 
842  TRACE("(%p %s %p)\n", pOuter, debugstr_guid(riid), ppv);
843 
844  hres = create_ie(&ret);
845  if(FAILED(hres))
846  return hres;
847 
848  hres = IWebBrowser2_QueryInterface(&ret->IWebBrowser2_iface, riid, ppv);
849  IWebBrowser2_Release(&ret->IWebBrowser2_iface);
850  if(FAILED(hres))
851  return hres;
852 
853  return S_OK;
854 }
REFIID riid
Definition: precomp.h:44
static HRESULT create_ie(InternetExplorer **ret_obj)
Definition: iexplore.c:813
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
int ret
#define S_OK
Definition: intsafe.h:59

◆ InternetExplorerManager_AddRef()

static ULONG WINAPI InternetExplorerManager_AddRef ( IInternetExplorerManager iface)
static

Definition at line 885 of file iexplore.c.

886 {
889 
890  TRACE("(%p) increasing refcount to %u\n", iface, ref);
891 
892  return ref;
893 }
Definition: send.c:47
static InternetExplorerManager * impl_from_IInternetExplorerManager(IInternetExplorerManager *iface)
Definition: iexplore.c:864
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

◆ InternetExplorerManager_Create()

HRESULT WINAPI InternetExplorerManager_Create ( IClassFactory iface,
IUnknown pOuter,
REFIID  riid,
void **  ppv 
)

Definition at line 926 of file iexplore.c.

927 {
929  HRESULT hr;
930 
931  TRACE("(%p %s %p)\n", pOuter, debugstr_guid(riid), ppv);
932 
933  if (!(ret = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ret))))
934  return E_OUTOFMEMORY;
935 
936  ret->IInternetExplorerManager_iface.lpVtbl = &InternetExplorerManager_vtbl;
937  ret->ref = 1;
938 
939  hr = IInternetExplorerManager_QueryInterface(&ret->IInternetExplorerManager_iface, riid, ppv);
940  IInternetExplorerManager_Release(&ret->IInternetExplorerManager_iface);
941 
943  return hr;
944 }
static LONG obj_cnt
Definition: iexplore.c:58
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static const IInternetExplorerManagerVtbl InternetExplorerManager_vtbl
Definition: iexplore.c:918
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG HRESULT
Definition: typedefs.h:77
int ret
#define InterlockedIncrement
Definition: armddk.h:53
#define HEAP_ZERO_MEMORY
Definition: compat.h:123

◆ InternetExplorerManager_CreateObject()

static HRESULT WINAPI InternetExplorerManager_CreateObject ( IInternetExplorerManager iface,
DWORD  config,
LPCWSTR  url,
REFIID  riid,
void **  ppv 
)
static

Definition at line 911 of file iexplore.c.

912 {
913  FIXME("(%p)->(0x%x, %s, %s, %p) stub!\n", iface, config, debugstr_w(url), debugstr_guid(riid), ppv);
914 
915  return E_NOTIMPL;
916 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_guid
Definition: kernel32.h:35
static const WCHAR url[]
Definition: encode.c:1432
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ InternetExplorerManager_QueryInterface()

static HRESULT WINAPI InternetExplorerManager_QueryInterface ( IInternetExplorerManager iface,
REFIID  riid,
void **  out 
)
static

Definition at line 869 of file iexplore.c.

870 {
871  TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), out);
872 
873  if (IsEqualGUID(riid, &IID_IInternetExplorerManager) || IsEqualGUID(riid, &IID_IUnknown))
874  {
875  IInternetExplorerManager_AddRef(iface);
876  *out = iface;
877  return S_OK;
878  }
879 
880  FIXME("interface %s not implemented\n", debugstr_guid(riid));
881  *out = NULL;
882  return E_NOINTERFACE;
883 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
static FILE * out
Definition: regtests2xml.c:44
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021

◆ InternetExplorerManager_Release()

static ULONG WINAPI InternetExplorerManager_Release ( IInternetExplorerManager iface)
static

Definition at line 895 of file iexplore.c.

896 {
899 
900  TRACE("(%p) decreasing refcount to %u\n", iface, ref);
901 
902  if (ref == 0)
903  {
905  released_obj();
906  }
907 
908  return ref;
909 }
Definition: send.c:47
static InternetExplorerManager * impl_from_IInternetExplorerManager(IInternetExplorerManager *iface)
Definition: iexplore.c:864
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
#define InterlockedDecrement
Definition: armddk.h:52
void released_obj(void)
Definition: iexplore.c:946
unsigned int ULONG
Definition: retypes.h:1
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ open_dde_url()

static HDDEDATA open_dde_url ( WCHAR dde_url)
static

Definition at line 992 of file iexplore.c.

993 {
994  InternetExplorer *ie = NULL, *iter;
995  WCHAR *url, *url_end;
996  VARIANT urlv;
997  HRESULT hres;
998 
999  TRACE("%s\n", debugstr_w(dde_url));
1000 
1001  url = dde_url;
1002  if(*url == '"') {
1003  url++;
1004  url_end = strchrW(url, '"');
1005  if(!url_end) {
1006  FIXME("missing string terminator\n");
1007  return 0;
1008  }
1009  *url_end = 0;
1010  }else {
1011  url_end = strchrW(url, ',');
1012  if(url_end)
1013  *url_end = 0;
1014  else
1015  url_end = url + strlenW(url);
1016  }
1017 
1019  if(iter->nohome) {
1020  IWebBrowser2_AddRef(&iter->IWebBrowser2_iface);
1021  ie = iter;
1022  break;
1023  }
1024  }
1025 
1026  if(!ie) {
1027  hres = create_ie(&ie);
1028  if(FAILED(hres))
1029  return 0;
1030  }
1031 
1032  IWebBrowser2_put_Visible(&ie->IWebBrowser2_iface, VARIANT_TRUE);
1033  IWebBrowser2_put_MenuBar(&ie->IWebBrowser2_iface, VARIANT_TRUE);
1034 
1035  V_VT(&urlv) = VT_BSTR;
1036  V_BSTR(&urlv) = SysAllocStringLen(url, url_end-url);
1037  if(!V_BSTR(&urlv)) {
1038  IWebBrowser2_Release(&ie->IWebBrowser2_iface);
1039  return 0;
1040  }
1041 
1042  hres = IWebBrowser2_Navigate2(&ie->IWebBrowser2_iface, &urlv, NULL, NULL, NULL, NULL);
1043  if(FAILED(hres))
1044  return 0;
1045 
1046  IWebBrowser2_Release(&ie->IWebBrowser2_iface);
1047  return ULongToHandle(DDE_FACK);
1048 }
#define ULongToHandle(h)
Definition: basetsd.h:81
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:342
static HRESULT create_ie(InternetExplorer **ret_obj)
Definition: iexplore.c:813
WINE_UNICODE_INLINE WCHAR * strchrW(const WCHAR *str, WCHAR ch)
Definition: unicode.h:248
uint8_t entry
Definition: isohybrid.c:63
static struct list ie_list
Definition: iexplore.c:61
IWebBrowser2 IWebBrowser2_iface
Definition: ieframe.h:232
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
static const WCHAR url[]
Definition: encode.c:1432
#define DDE_FACK
Definition: ddeml.h:216
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226

Referenced by dde_proc().

◆ register_iewindow_class()

void register_iewindow_class ( void  )

Definition at line 713 of file iexplore.c.

714 {
715  WNDCLASSEXW wc;
716 
717  memset(&wc, 0, sizeof wc);
718  wc.cbSize = sizeof(wc);
719  wc.style = 0;
721  wc.cbClsExtra = 0;
722  wc.cbWndExtra = sizeof(InternetExplorer*);
728  wc.hbrBackground = 0;
730  wc.lpszMenuName = NULL;
731 
732  RegisterClassExW(&wc);
733 }
#define LR_SHARED
Definition: winuser.h:1090
#define IMAGE_ICON
Definition: winuser.h:212
int cbWndExtra
Definition: winuser.h:3173
HINSTANCE ieframe_instance
Definition: ieframe_main.c:32
#define SM_CYSMICON
Definition: winuser.h:1003
HICON hIcon
Definition: winuser.h:3175
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
LPCWSTR lpszMenuName
Definition: winuser.h:3178
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_ UINT, _In_ int, _In_ int, _In_ UINT)
Definition: cursoricon.c:2172
smooth NULL
Definition: ftsmooth.c:416
int cbClsExtra
Definition: winuser.h:3172
static LRESULT WINAPI ie_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
Definition: iexplore.c:675
LPCWSTR lpszClassName
Definition: winuser.h:3179
static const WCHAR szIEWinFrame[]
Definition: iexplore.c:52
HBRUSH hbrBackground
Definition: winuser.h:3177
UINT cbSize
Definition: winuser.h:3169
int WINAPI GetSystemMetrics(_In_ int)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2074
HINSTANCE hInstance
Definition: winuser.h:3174
#define SM_CXSMICON
Definition: winuser.h:1002
HCURSOR hCursor
Definition: winuser.h:3176
UINT style
Definition: winuser.h:3170
#define IDI_APPICON
Definition: iexplore.c:48
WNDPROC lpfnWndProc
Definition: winuser.h:3171
HICON hIconSm
Definition: winuser.h:3180
#define IDC_ARROW
Definition: winuser.h:682
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:845
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2044
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define memset(x, y, z)
Definition: compat.h:39

Referenced by DllMain().

◆ release_dde()

static void release_dde ( void  )
static

Definition at line 1123 of file iexplore.c.

1124 {
1125  if(ddestr_iexplore)
1127  if(ddestr_openurl)
1129  if(ddestr_iexplore)
1132 }
#define DNS_UNREGISTER
Definition: ddeml.h:153
BOOL WINAPI DdeUninitialize(DWORD)
Definition: ddemisc.c:1112
static HSZ ddestr_openurl
Definition: iexplore.c:60
static HSZ ddestr_iexplore
Definition: iexplore.c:60
static DWORD dde_inst
Definition: iexplore.c:59
BOOL WINAPI DdeFreeStringHandle(DWORD, HSZ)
Definition: ddemisc.c:631
HDDEDATA WINAPI DdeNameService(DWORD, HSZ, HSZ, UINT)
Definition: ddeserver.c:154

Referenced by IEWinMain().

◆ released_obj()

void released_obj ( void  )

Definition at line 946 of file iexplore.c.

947 {
949  PostQuitMessage(0);
950 }
static LONG obj_cnt
Definition: iexplore.c:58
#define InterlockedDecrement
Definition: armddk.h:52
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)

Referenced by InternetExplorer_Release(), and InternetExplorerManager_Release().

◆ unregister_iewindow_class()

void unregister_iewindow_class ( void  )

Definition at line 735 of file iexplore.c.

736 {
738 }
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
HINSTANCE ieframe_instance
Definition: ieframe_main.c:32
static const WCHAR szIEWinFrame[]
Definition: iexplore.c:52

Referenced by DllMain().

◆ update_addrbar()

static LRESULT update_addrbar ( InternetExplorer This,
LPARAM  lparam 
)
static

Definition at line 663 of file iexplore.c.

664 {
665  HWND hwndRebar = GetDlgItem(This->frame_hwnd, IDC_BROWSE_REBAR);
666  HWND hwndAddress = GetDlgItem(hwndRebar, IDC_BROWSE_ADDRESSBAR);
667  HWND hwndEdit = (HWND)SendMessageW(hwndAddress, CBEM_GETEDITCONTROL, 0, 0);
669 
671 
672  return 0;
673 }
#define IDC_BROWSE_REBAR
Definition: resource.h:29
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
HANDLE HWND
Definition: compat.h:13
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
LONG_PTR LPARAM
Definition: windef.h:208
#define CBEM_GETEDITCONTROL
Definition: commctrl.h:3805
#define WM_SETTEXT
Definition: winuser.h:1599
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
static const WCHAR url[]
Definition: encode.c:1432
HWND hwndEdit
Definition: combotst.c:65
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define IDC_BROWSE_ADDRESSBAR
Definition: resource.h:30

Referenced by ie_window_proc().

◆ update_ie_statustext()

HRESULT update_ie_statustext ( InternetExplorer This,
LPCWSTR  text 
)

Definition at line 63 of file iexplore.c.

64 {
65  if(!SendMessageW(This->status_hwnd, SB_SETTEXTW, MAKEWORD(SB_SIMPLEID, 0), (LPARAM)text))
66  return E_FAIL;
67 
68  return S_OK;
69 }
#define MAKEWORD(a, b)
Definition: typedefs.h:247
const WCHAR * text
Definition: package.c:1827
#define E_FAIL
Definition: ddrawi.h:102
#define SB_SIMPLEID
Definition: precomp.h:15
LONG_PTR LPARAM
Definition: windef.h:208
#define SB_SETTEXTW
Definition: commctrl.h:1914
#define S_OK
Definition: intsafe.h:59
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

Referenced by DocHostContainer_set_status_text(), and InternetExplorer_put_StatusText().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( ieframe  )

Variable Documentation

◆ dde_inst

◆ ddestr_iexplore

HSZ ddestr_iexplore
static

Definition at line 60 of file iexplore.c.

Referenced by init_dde(), and release_dde().

◆ ddestr_openurl

HSZ ddestr_openurl
static

Definition at line 60 of file iexplore.c.

Referenced by dde_proc(), init_dde(), and release_dde().

◆ DocHostContainerVtbl

const IDocHostContainerVtbl DocHostContainerVtbl
static
Initial value:
= {
}
static HRESULT DocHostContainer_set_status_text(DocHost *iface, const WCHAR *text)
Definition: iexplore.c:776
static ULONG IEDocHost_release(DocHost *iface)
Definition: iexplore.c:764
static void DocHostContainer_get_docobj_rect(DocHost *This, RECT *rc)
Definition: iexplore.c:770
static void DocHostContainer_set_url(DocHost *iface, const WCHAR *url)
Definition: iexplore.c:796
static ULONG IEDocHost_addref(DocHost *iface)
Definition: iexplore.c:758
static void DocHostContainer_on_command_state_change(DocHost *iface, LONG command, BOOL enable)
Definition: iexplore.c:782

Definition at line 804 of file iexplore.c.

Referenced by create_ie().

◆ helpstring

◆ ie_list

struct list ie_list = LIST_INIT(ie_list)
static

Definition at line 61 of file iexplore.c.

Referenced by create_ie(), and open_dde_url().

◆ InternetExplorerManager_vtbl

const IInternetExplorerManagerVtbl InternetExplorerManager_vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI InternetExplorerManager_QueryInterface(IInternetExplorerManager *iface, REFIID riid, void **out)
Definition: iexplore.c:869
static HRESULT WINAPI InternetExplorerManager_CreateObject(IInternetExplorerManager *iface, DWORD config, LPCWSTR url, REFIID riid, void **ppv)
Definition: iexplore.c:911
static ULONG WINAPI InternetExplorerManager_AddRef(IInternetExplorerManager *iface)
Definition: iexplore.c:885
static ULONG WINAPI InternetExplorerManager_Release(IInternetExplorerManager *iface)
Definition: iexplore.c:895

Definition at line 918 of file iexplore.c.

Referenced by InternetExplorerManager_Create().

◆ obj_cnt

LONG obj_cnt
static

Definition at line 58 of file iexplore.c.

Referenced by create_ie(), InternetExplorerManager_Create(), and released_obj().

◆ szIEWinFrame

const WCHAR szIEWinFrame[] = { 'I','E','F','r','a','m','e',0 }
static

◆ wszWineInternetExplorer

const WCHAR wszWineInternetExplorer[]
static
Initial value:
=
{'W','i','n','e',' ','I','n','t','e','r','n','e','t',' ','E','x','p','l','o','r','e','r',0}

Definition at line 55 of file iexplore.c.

Referenced by create_frame_hwnd(), and ie_dialog_about().