#include "Client/Browser/BrowserAddressBar.h" #include // OFFSET: 0x00AB27A0 // FUNCTION: fn_17416 bool BrowserAddressBar::Create(int width, int requestedHeight) { this->rebar = CreateWindowExA( WS_EX_TOOLWINDOW, REBARCLASSNAMEA, "rebar", WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_BORDER | RBS_VARHEIGHT | RBS_BANDBORDERS | RBS_REGISTERDROP | RBS_DBLCLKTOGGLE | CCS_NOPARENTALIGN | CCS_NODIVIDER, 0, 0, width, 0, this->host, nullptr, GetModuleHandleA(nullptr), nullptr ); if (!this->rebar) { return false; } REBARINFO bar{}; bar.cbSize = sizeof(bar); if (!SendMessageA(this->rebar, RB_SETBARINFO, 0, reinterpret_cast(&bar))) { return false; } HWND combo = CreateWindowExA( WS_EX_CLIENTEDGE, WC_COMBOBOXA, "addressbar", WS_CHILD | WS_VISIBLE | CBS_DROPDOWN, 10, 10, 160, 22, this->rebar, nullptr, GetModuleHandleA(nullptr), nullptr ); REBARBANDINFOA band{}; band.cbSize = sizeof(band); band.fMask = RBBIM_STYLE | RBBIM_CHILD | RBBIM_CHILDSIZE | RBBIM_SIZE | RBBIM_BACKGROUND; band.fStyle = RBBS_CHILDEDGE | RBBS_FIXEDBMP; band.hwndChild = combo; band.cxMinChild = 0; band.cyMinChild = requestedHeight; band.cx = 160; band.hbmBack = LoadBitmapA(GetModuleHandleA(nullptr), nullptr); if (!SendMessageA(this->rebar, RB_INSERTBANDA, static_cast(-1), reinterpret_cast(&band))) { return false; } this->combo = combo; HWND edit = GetWindow(combo, GW_CHILD); this->previous = reinterpret_cast(SetWindowLongPtrA(edit, GWLP_WNDPROC, reinterpret_cast(this->procedure))); RECT rectangle; GetClientRect(this->host, &rectangle); SetWindowPos(this->rebar, nullptr, 0, 0, rectangle.right - rectangle.left, rectangle.bottom - rectangle.top, SWP_NOMOVE); ShowWindow(this->rebar, SW_HIDE); this->height = 0; if (this->rebar && this->visible != 0) { GetClientRect(this->rebar, &rectangle); this->height = rectangle.bottom - rectangle.top + 4; } return true; }