Reconstruct readable C++ and organize cohesive source subsystems
Administrative source import: native x86 compilation passed for 423 authored units. Source placement and submission states are migrated separately; this commit does not imply peer acceptance.
Previous head: 35d2a8cb36
Payload SHA256: 592f016d2730c5593bb653aa054c1e5f76a6df72c8f5a09e66f74876e2e33dee
This commit is contained in:
parent
35d2a8cb36
commit
a47d20f8be
890 changed files with 11796 additions and 16664 deletions
48
Source/Client/Browser/BrowserMessages.cpp
Normal file
48
Source/Client/Browser/BrowserMessages.cpp
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
#include "Client/Browser/BrowserMessages.h"
|
||||
#include "Client/Browser/BrowserRegistry.h"
|
||||
#include "Client/Browser/WebBrowser.h"
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
// OFFSET: 0x00AB33C0
|
||||
// FUNCTION: fn_17423
|
||||
LRESULT BrowserMessages::Message(HWND window, UINT message, WPARAM value, LPARAM flags) {
|
||||
CWebBrowser* browser = this->registry.Find(window);
|
||||
|
||||
switch (message) {
|
||||
case WM_CREATE:
|
||||
case WM_NCHITTEST:
|
||||
case WM_NCLBUTTONDOWN:
|
||||
case WM_PARENTNOTIFY:
|
||||
this->active = this->registry.Find(window);
|
||||
break;
|
||||
case WM_DESTROY:
|
||||
SetFocus(this->applicationWindow);
|
||||
break;
|
||||
case WM_SIZE:
|
||||
if (browser) {
|
||||
const auto dimensions = static_cast<std::uint32_t>(flags);
|
||||
browser->Resize(static_cast<std::uint16_t>(dimensions), dimensions >> 16);
|
||||
}
|
||||
break;
|
||||
case WM_CLOSE:
|
||||
this->registry.Remove(window);
|
||||
break;
|
||||
case WM_HELP:
|
||||
return 1;
|
||||
case WM_KEYDOWN:
|
||||
if (value == VK_F1 || value == VK_F11) {
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
case WM_COMMAND:
|
||||
if (LOWORD(value) == static_cast<WORD>(BrowserCommand::Navigate) && browser) {
|
||||
char address[512];
|
||||
GetWindowTextA(browser->combo, address, sizeof(address));
|
||||
browser->Navigate(address);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return DefWindowProcA(window, message, value, flags);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue