LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
ResourceDialog.hpp
Go to the documentation of this file.
1/* Copyright 2017 - 2025 R. Thomas
2 * Copyright 2017 - 2025 Quarkslab
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#ifndef LIEF_PE_RESOURCE_DIALOG_H
17#define LIEF_PE_RESOURCE_DIALOG_H
18
19#include "LIEF/visibility.h"
20#include "LIEF/Object.hpp"
21#include "LIEF/enums.hpp"
22#include "LIEF/errors.hpp"
23#include "LIEF/span.hpp"
24
25#include <memory>
26#include <vector>
27#include <ostream>
28
29namespace LIEF {
30class BinaryStream;
31namespace PE {
32
33class ResourceData;
34class LIEF_API ResourceDialog : public Object {
42 public:
43 using dialogs_t = std::vector<std::unique_ptr<ResourceDialog>>;
44 struct ordinal_or_str_t {
49 result<uint16_t> ordinal = make_error_code(lief_errors::not_found);
50 std::u16string string;
51
52 bool is_defined() const {
53 return ordinal || !string.empty();
54 }
55
56 operator bool() const {
57 return is_defined();
58 }
59
60 std::string to_string() const;
61 };
62 enum class TYPE {
65 UNKNOWN = 0,
66 REGULAR, EXTENDED,
67 };
68 enum class DIALOG_STYLES : uint32_t {
71 ABSALIGN = 0x0001,
72 SYSMODAL = 0x0002,
73 LOCALEDIT = 0x0020,
74 SETFONT = 0x0040,
75 MODALFRAME = 0x0080,
76 NOIDLEMSG = 0x0100,
77 SETFOREGROUND = 0x0200,
78 S3DLOOK = 0x0004,
79 FIXEDSYS = 0x0008,
80 NOFAILCREATE = 0x0010,
81 CONTROL = 0x0400,
82 CENTER = 0x0800,
83 CENTERMOUSE = 0x1000,
84 CONTEXTHELP = 0x2000,
85 SHELLFONT = SETFONT | FIXEDSYS,
86 };
87 enum class WINDOW_STYLES : uint32_t {
90 OVERLAPPED = 0x00000000,
91 POPUP = 0x80000000,
92 CHILD = 0x40000000,
93 MINIMIZE = 0x20000000,
94 VISIBLE = 0x10000000,
95 DISABLED = 0x08000000,
96 CLIPSIBLINGS = 0x04000000,
97 CLIPCHILDREN = 0x02000000,
98 MAXIMIZE = 0x01000000,
99 CAPTION = 0x00C00000,
100 BORDER = 0x00800000,
101 DLGFRAME = 0x00400000,
102 VSCROLL = 0x00200000,
103 HSCROLL = 0x00100000,
104 SYSMENU = 0x00080000,
105 THICKFRAME = 0x00040000,
106 GROUP = 0x00020000,
107 TABSTOP = 0x00010000,
108 };
109 enum class WINDOW_EXTENDED_STYLES : uint32_t {
112 DLGMODALFRAME = 0x00000001,
113 NOPARENTNOTIFY = 0x00000004,
114 TOPMOST = 0x00000008,
115 ACCEPTFILES = 0x00000010,
116 TRANSPARENT_STY = 0x00000020,
117 MDICHILD = 0x00000040,
118 TOOLWINDOW = 0x00000080,
119 WINDOWEDGE = 0x00000100,
120 CLIENTEDGE = 0x00000200,
121 CONTEXTHELP = 0x00000400,
122
123 RIGHT = 0x00001000,
124 LEFT = 0x00000000,
125 RTLREADING = 0x00002000,
126 LEFTSCROLLBAR = 0x00004000,
127
128 CONTROLPARENT = 0x00010000,
129 STATICEDGE = 0x00020000,
130 APPWINDOW = 0x00040000,
131 };
132 enum class CONTROL_STYLES : uint32_t {
135 TOP = 0x00000001,
136 NOMOVEY = 0x00000002,
137 BOTTOM = 0x00000003,
138 NORESIZE = 0x00000004,
139 NOPARENTALIGN = 0x00000008,
140 ADJUSTABLE = 0x00000020,
141 NODIVIDER = 0x00000040,
142 VERT = 0x00000080,
143 LEFT = VERT | TOP,
144 RIGHT = VERT | BOTTOM,
145 NOMOVEX = VERT | NOMOVEY
146 };
147 class Item {
155 public:
156 Item() = default;
157 Item(const Item&) = default;
158 Item& operator=(const Item&) = default;
159
160 Item(Item&&) = default;
161 Item& operator=(Item&&) = default;
162
163 enum class WINDOW_CLASS : uint32_t {
164 BUTTON = 0x0080,
165 EDIT = 0x0081,
166 STATIC = 0x0082,
167 LIST_BOX = 0x0083,
168 SCROLL_BAR = 0x0084,
169 COMBO_BOX = 0x0085,
170 };
171 uint32_t style() const {
175 return style_;
176 }
177 uint32_t extended_style() const {
184 return extended_style_;
185 }
186 int32_t id() const {
189 return id_;
190 }
191 bool has(WINDOW_STYLES style) const {
194 return (style_ & (uint32_t)style) != 0;
195 }
196 bool has(CONTROL_STYLES style) const {
199 return (style_ & (uint32_t)style) != 0;
200 }
201 std::vector<WINDOW_STYLES> window_styles() const;
204 std::vector<CONTROL_STYLES> control_styles() const;
207 int16_t x() const { return x_; }
212 int16_t y() const { return y_; }
217 int16_t cx() const { return cx_; }
220 int16_t cy() const { return cy_; }
223
224 Item& style(uint32_t value) {
225 style_ = value;
226 return *this;
227 }
228
229 Item& extended_style(uint32_t value) {
230 extended_style_ = value;
231 return *this;
232 }
233
234 Item& x(int16_t value) { x_ = value; return *this; }
235 Item& y(int16_t value) { y_ = value; return *this; }
236 Item& cx(int16_t value) { cx_ = value; return *this; }
237 Item& cy(int16_t value) { cy_ = value; return *this; }
238
239 Item& id(int32_t value) { id_ = value; return *this; }
240
241 Item& data(std::vector<uint8_t> creation_data) {
242 creation_data_ = std::move(creation_data);
243 return *this;
244 }
245
246 Item& clazz(std::u16string title) {
247 class_.string = std::move(title);
248 class_.ordinal = make_error_code(lief_errors::not_found);
249 return *this;
250 }
251
252 Item& clazz(uint16_t ord) {
253 class_.ordinal = ord;
254 return *this;
255 }
256
257 Item& title(std::u16string value) {
258 title_.string = std::move(value);
259 title_.ordinal = make_error_code(lief_errors::not_found);
260 return *this;
261 }
262
263 Item& title(uint16_t ord) {
264 title_.ordinal = ord;
265 return *this;
266 }
267 const ordinal_or_str_t& clazz() const {
272 return class_;
273 }
274 const ordinal_or_str_t& title() const {
279 return title_;
280 }
281 span<const uint8_t> creation_data() const {
284 return creation_data_;
285 }
286
287 span<uint8_t> creation_data() {
288 return creation_data_;
289 }
290
291 virtual ~Item() = default;
292
293 virtual std::string to_string() const = 0;
294
295 LIEF_API friend std::ostream& operator<<(std::ostream& os, const Item& item) {
296 os << item.to_string();
297 return os;
298 }
299
300 protected:
301 uint32_t style_ = 0;
302 uint32_t extended_style_ = 0;
303
304 int16_t x_ = 0;
305 int16_t y_ = 0;
306 int16_t cx_ = 0;
307 int16_t cy_ = 0;
308
309 int32_t id_ = 0;
310
311 ordinal_or_str_t class_;
312 ordinal_or_str_t title_;
313 std::vector<uint8_t> creation_data_;
314 };
315 static dialogs_t parse(const ResourceData& node);
318 static dialogs_t parse(const uint8_t* buffer, size_t size);
319
320 ResourceDialog() = default;
321 ResourceDialog(const ResourceDialog&) = default;
322 ResourceDialog& operator=(const ResourceDialog&) = default;
323
324 ResourceDialog(ResourceDialog&&) = default;
325 ResourceDialog& operator=(ResourceDialog&&) = default;
326
327 ResourceDialog(TYPE ty) :
328 type_(ty)
329 {}
330
331 virtual std::unique_ptr<ResourceDialog> clone() const = 0;
332
333 TYPE type() const {
334 return type_;
335 }
336 uint32_t style() const {
341 return style_;
342 }
343 uint32_t extended_style() const {
348 return extended_style_;
349 }
350 int16_t x() const { return x_; }
354 int16_t y() const { return y_; }
358 int16_t cx() const { return cx_; }
361 int16_t cy() const { return cy_; }
364
365 ResourceDialog& style(uint32_t value) {
366 style_ = value;
367 return *this;
368 }
369
370 ResourceDialog& extended_style(uint32_t value) {
371 extended_style_ = value;
372 return *this;
373 }
374
375 ResourceDialog& x(int16_t value) { x_ = value; return *this; }
376 ResourceDialog& y(int16_t value) { y_ = value; return *this; }
377 ResourceDialog& cx(int16_t value) { cx_ = value; return *this; }
378 ResourceDialog& cy(int16_t value) { cy_ = value; return *this; }
379
380 ResourceDialog& menu(std::u16string title) {
381 menu_.string = std::move(title);
382 menu_.ordinal = make_error_code(lief_errors::not_found);
383 return *this;
384 }
385
386 ResourceDialog& menu(uint16_t ord) {
387 menu_.ordinal = ord;
388 return *this;
389 }
390
391 ResourceDialog& window_class(std::u16string title) {
392 window_class_.string = std::move(title);
393 window_class_.ordinal = make_error_code(lief_errors::not_found);
394 return *this;
395 }
396
397 ResourceDialog& window_class(uint16_t ord) {
398 window_class_.ordinal = ord;
399 return *this;
400 }
401
402 ResourceDialog& title(std::u16string value) {
403 title_ = std::move(value);
404 return *this;
405 }
406
407 ResourceDialog& title(const std::string& title);
408 bool has(DIALOG_STYLES style) const {
411 return (style_ & (uint32_t)style) != 0;
412 }
413 bool has(WINDOW_STYLES style) const {
416 return (style_ & (uint32_t)style) != 0;
417 }
418 bool has(WINDOW_EXTENDED_STYLES style) const {
421 return (extended_style_ & (uint32_t)style) != 0;
422 }
423 std::vector<DIALOG_STYLES> styles_list() const;
426 std::vector<WINDOW_STYLES> windows_styles_list() const;
429 std::vector<WINDOW_EXTENDED_STYLES> windows_ext_styles_list() const;
432 const std::u16string& title() const {
435 return title_;
436 }
437 std::string title_utf8() const;
440 const ordinal_or_str_t& menu() const {
443 return menu_;
444 }
445 const ordinal_or_str_t& window_class() const {
449 return window_class_;
450 }
451
452 virtual std::string to_string() const = 0;
453
454 virtual ~ResourceDialog() = default;
455
456 template<class T>
460 const T* as() const {
461 static_assert(std::is_base_of<ResourceDialog, T>::value,
462 "Require ResourceDialog inheritance");
463 if (T::classof(this)) {
464 return static_cast<const T*>(this);
465 }
466 return nullptr;
467 }
468
469 friend LIEF_API std::ostream& operator<<(std::ostream& os, const ResourceDialog& dialog) {
470 os << dialog.to_string();
471 return os;
472 }
473
474 protected:
475 static ok_error_t parse_menu(ResourceDialog& dialog, BinaryStream& stream);
476 static ok_error_t parse_class(ResourceDialog& dialog, BinaryStream& stream);
477 static ok_error_t parse_class(ResourceDialog::Item& dialog, BinaryStream& stream);
478 static ok_error_t parse_title(ResourceDialog& dialog, BinaryStream& stream);
479 static ok_error_t parse_title(ResourceDialog::Item& dialog, BinaryStream& stream);
480 static ok_error_t parse_creation_data(ResourceDialog::Item& item, BinaryStream& stream);
481 TYPE type_ = TYPE::UNKNOWN;
482
483 uint32_t style_ = 0;
484 uint32_t extended_style_ = 0;
485
486 int16_t x_ = 0;
487 int16_t y_ = 0;
488 int16_t cx_ = 0;
489 int16_t cy_ = 0;
490
491 ordinal_or_str_t menu_;
492 ordinal_or_str_t window_class_;
493
494 std::u16string title_;
495};
496
497LIEF_API const char* to_string(ResourceDialog::DIALOG_STYLES s);
498LIEF_API const char* to_string(ResourceDialog::WINDOW_STYLES s);
499LIEF_API const char* to_string(ResourceDialog::WINDOW_EXTENDED_STYLES s);
500LIEF_API const char* to_string(ResourceDialog::CONTROL_STYLES s);
501
502}
503}
504
505ENABLE_BITMASK_OPERATORS(LIEF::PE::ResourceDialog::DIALOG_STYLES);
506ENABLE_BITMASK_OPERATORS(LIEF::PE::ResourceDialog::WINDOW_STYLES);
507ENABLE_BITMASK_OPERATORS(LIEF::PE::ResourceDialog::WINDOW_EXTENDED_STYLES);
508ENABLE_BITMASK_OPERATORS(LIEF::PE::ResourceDialog::CONTROL_STYLES);
509
510
511#endif
Object.hpp
LIEF::BinaryStream
Class that is used to a read stream of data from different sources.
Definition BinaryStream.hpp:33
LIEF::PE::ResourceData
Class which represents a Data Node in the PE resources tree.
Definition ResourceData.hpp:33
LIEF::PE::ResourceDialog::Item::~Item
virtual ~Item()=default
LIEF::PE::ResourceDialog::Item::clazz
const ordinal_or_str_t & clazz() const
Window class of the control. This can be either: a string that specifies the name of a registered win...
Definition ResourceDialog.hpp:271
LIEF::PE::ResourceDialog::Item::Item
Item(Item &&)=default
LIEF::PE::ResourceDialog::Item::cy
Item & cy(int16_t value)
Definition ResourceDialog.hpp:237
LIEF::PE::ResourceDialog::Item::y
Item & y(int16_t value)
Definition ResourceDialog.hpp:235
LIEF::PE::ResourceDialog::Item::operator<<
friend std::ostream & operator<<(std::ostream &os, const Item &item)
Definition ResourceDialog.hpp:295
LIEF::PE::ResourceDialog::Item::cx
Item & cx(int16_t value)
Definition ResourceDialog.hpp:236
LIEF::PE::ResourceDialog::Item::Item
Item()=default
LIEF::PE::ResourceDialog::Item::has
bool has(WINDOW_STYLES style) const
Check if this item has the given WINDOW_STYLES.
Definition ResourceDialog.hpp:193
LIEF::PE::ResourceDialog::Item::title
const ordinal_or_str_t & title() const
Title of the item which can be either: a string that specifies the initial text or an ordinal value o...
Definition ResourceDialog.hpp:278
LIEF::PE::ResourceDialog::Item::extended_style
Item & extended_style(uint32_t value)
Definition ResourceDialog.hpp:229
LIEF::PE::ResourceDialog::Item::creation_data
span< uint8_t > creation_data()
Definition ResourceDialog.hpp:287
LIEF::PE::ResourceDialog::Item::to_string
virtual std::string to_string() const =0
LIEF::PE::ResourceDialog::Item::title
Item & title(uint16_t ord)
Definition ResourceDialog.hpp:263
LIEF::PE::ResourceDialog::Item::operator=
Item & operator=(Item &&)=default
LIEF::PE::ResourceDialog::Item::id
int32_t id() const
The control identifier.
Definition ResourceDialog.hpp:188
LIEF::PE::ResourceDialog::Item::Item
Item(const Item &)=default
LIEF::PE::ResourceDialog::Item::creation_data
span< const uint8_t > creation_data() const
Creation data that is passed to the control's window procedure.
Definition ResourceDialog.hpp:283
LIEF::PE::ResourceDialog::Item::style
uint32_t style() const
The style of the control. This can be a combination of WINDOW_STYLES or CONTROL_STYLES.
Definition ResourceDialog.hpp:174
LIEF::PE::ResourceDialog::Item::window_styles
std::vector< WINDOW_STYLES > window_styles() const
List of WINDOW_STYLES used by this item.
LIEF::PE::ResourceDialog::Item::clazz
Item & clazz(uint16_t ord)
Definition ResourceDialog.hpp:252
LIEF::PE::ResourceDialog::Item::cx
int16_t cx() const
The width, in dialog box units, of the control.
Definition ResourceDialog.hpp:219
LIEF::PE::ResourceDialog::Item::has
bool has(CONTROL_STYLES style) const
Check if this item has the given CONTROL_STYLES.
Definition ResourceDialog.hpp:198
LIEF::PE::ResourceDialog::Item::extended_style
uint32_t extended_style() const
The extended styles for a window. This member is not used to create controls in dialog boxes,...
Definition ResourceDialog.hpp:183
LIEF::PE::ResourceDialog::Item::style
Item & style(uint32_t value)
Definition ResourceDialog.hpp:224
LIEF::PE::ResourceDialog::Item::cy
int16_t cy() const
The height, in dialog box units, of the control.
Definition ResourceDialog.hpp:222
LIEF::PE::ResourceDialog::Item::operator=
Item & operator=(const Item &)=default
LIEF::PE::ResourceDialog::Item::x
Item & x(int16_t value)
Definition ResourceDialog.hpp:234
LIEF::PE::ResourceDialog::Item::data
Item & data(std::vector< uint8_t > creation_data)
Definition ResourceDialog.hpp:241
LIEF::PE::ResourceDialog::Item::control_styles
std::vector< CONTROL_STYLES > control_styles() const
List of CONTROL_STYLES used by this item.
LIEF::PE::ResourceDialog::Item::id
Item & id(int32_t value)
Definition ResourceDialog.hpp:239
LIEF::PE::ResourceDialog::Item::y
int16_t y() const
The y-coordinate, in dialog box units, of the upper-left corner of the control. This coordinate is al...
Definition ResourceDialog.hpp:216
LIEF::PE::ResourceDialog::Item::title
Item & title(std::u16string value)
Definition ResourceDialog.hpp:257
LIEF::PE::ResourceDialog::Item::x
int16_t x() const
The x-coordinate, in dialog box units, of the upper-left corner of the control. This coordinate is al...
Definition ResourceDialog.hpp:211
LIEF::PE::ResourceDialog::Item::clazz
Item & clazz(std::u16string title)
Definition ResourceDialog.hpp:246
LIEF::PE::ResourceDialog
This class is the base class for either a regular (legacy) Dialog or an extended Dialog....
Definition ResourceDialog.hpp:41
LIEF::PE::ResourceDialog::window_class
ResourceDialog & window_class(std::u16string title)
Definition ResourceDialog.hpp:391
LIEF::PE::ResourceDialog::to_string
virtual std::string to_string() const =0
LIEF::PE::ResourceDialog::windows_styles_list
std::vector< WINDOW_STYLES > windows_styles_list() const
List of WINDOW_STYLES used by this dialog.
LIEF::PE::ResourceDialog::CONTROL_STYLES
CONTROL_STYLES
From: https://learn.microsoft.com/en-us/windows/win32/controls/common-control-styles.
Definition ResourceDialog.hpp:134
LIEF::PE::ResourceDialog::WINDOW_EXTENDED_STYLES
WINDOW_EXTENDED_STYLES
From https://docs.microsoft.com/en-us/windows/win32/winmsg/extended-window-styles.
Definition ResourceDialog.hpp:111
LIEF::PE::ResourceDialog::ResourceDialog
ResourceDialog(ResourceDialog &&)=default
LIEF::PE::ResourceDialog::parse
static dialogs_t parse(const ResourceData &node)
Parse dialogs from the given resource data node.
LIEF::PE::ResourceDialog::window_class
ResourceDialog & window_class(uint16_t ord)
Definition ResourceDialog.hpp:397
LIEF::PE::ResourceDialog::ResourceDialog
ResourceDialog(const ResourceDialog &)=default
LIEF::PE::ResourceDialog::as
const T * as() const
Helper to downcast a ResourceDialog into a ResourceDialogRegular or a ResourceDialogExtended.
Definition ResourceDialog.hpp:460
LIEF::PE::ResourceDialog::title
ResourceDialog & title(std::u16string value)
Definition ResourceDialog.hpp:402
LIEF::PE::ResourceDialog::title
ResourceDialog & title(const std::string &title)
LIEF::PE::ResourceDialog::operator<<
friend std::ostream & operator<<(std::ostream &os, const ResourceDialog &dialog)
Definition ResourceDialog.hpp:469
LIEF::PE::ResourceDialog::menu
ResourceDialog & menu(std::u16string title)
Definition ResourceDialog.hpp:380
LIEF::PE::ResourceDialog::DIALOG_STYLES
DIALOG_STYLES
From: https://learn.microsoft.com/en-us/windows/win32/dlgbox/dialog-box-styles.
Definition ResourceDialog.hpp:70
LIEF::PE::ResourceDialog::cx
int16_t cx() const
The width, in dialog box units, of the dialog box.
Definition ResourceDialog.hpp:360
LIEF::PE::ResourceDialog::has
bool has(WINDOW_EXTENDED_STYLES style) const
Check if the dialog used to given extended window style.
Definition ResourceDialog.hpp:420
LIEF::PE::ResourceDialog::style
uint32_t style() const
The style of the dialog box. This member can be a combination of window style values (such as WINDOW_...
Definition ResourceDialog.hpp:340
LIEF::PE::ResourceDialog::clone
virtual std::unique_ptr< ResourceDialog > clone() const =0
LIEF::PE::ResourceDialog::has
bool has(WINDOW_STYLES style) const
Check if the dialog used to given window style.
Definition ResourceDialog.hpp:415
LIEF::PE::ResourceDialog::menu
ResourceDialog & menu(uint16_t ord)
Definition ResourceDialog.hpp:386
LIEF::PE::ResourceDialog::extended_style
ResourceDialog & extended_style(uint32_t value)
Definition ResourceDialog.hpp:370
LIEF::PE::ResourceDialog::operator=
ResourceDialog & operator=(ResourceDialog &&)=default
LIEF::PE::ResourceDialog::y
ResourceDialog & y(int16_t value)
Definition ResourceDialog.hpp:376
LIEF::PE::ResourceDialog::cx
ResourceDialog & cx(int16_t value)
Definition ResourceDialog.hpp:377
LIEF::PE::ResourceDialog::menu
const ordinal_or_str_t & menu() const
ordinal or name value of a menu resource.
Definition ResourceDialog.hpp:442
LIEF::PE::ResourceDialog::style
ResourceDialog & style(uint32_t value)
Definition ResourceDialog.hpp:365
LIEF::PE::ResourceDialog::extended_style
uint32_t extended_style() const
The extended styles for a window. This member is not used to create dialog boxes, but applications th...
Definition ResourceDialog.hpp:347
LIEF::PE::ResourceDialog::has
bool has(DIALOG_STYLES style) const
Check if the dialog used to given dialog style.
Definition ResourceDialog.hpp:410
LIEF::PE::ResourceDialog::ResourceDialog
ResourceDialog()=default
LIEF::PE::ResourceDialog::WINDOW_STYLES
WINDOW_STYLES
From: https://docs.microsoft.com/en-us/windows/win32/winmsg/window-styles.
Definition ResourceDialog.hpp:89
LIEF::PE::ResourceDialog::x
int16_t x() const
The x-coordinate, in dialog box units, of the upper-left corner of the dialog box.
Definition ResourceDialog.hpp:353
LIEF::PE::ResourceDialog::x
ResourceDialog & x(int16_t value)
Definition ResourceDialog.hpp:375
LIEF::PE::ResourceDialog::operator=
ResourceDialog & operator=(const ResourceDialog &)=default
LIEF::PE::ResourceDialog::windows_ext_styles_list
std::vector< WINDOW_EXTENDED_STYLES > windows_ext_styles_list() const
List of WINDOW_EXTENDED_STYLES used by this dialog.
LIEF::PE::ResourceDialog::title_utf8
std::string title_utf8() const
title of the dialog box
LIEF::PE::ResourceDialog::cy
ResourceDialog & cy(int16_t value)
Definition ResourceDialog.hpp:378
LIEF::PE::ResourceDialog::~ResourceDialog
virtual ~ResourceDialog()=default
LIEF::PE::ResourceDialog::y
int16_t y() const
The y-coordinate, in dialog box units, of the upper-left corner of the dialog box.
Definition ResourceDialog.hpp:357
LIEF::PE::ResourceDialog::cy
int16_t cy() const
The height, in dialog box units, of the dialog box.
Definition ResourceDialog.hpp:363
LIEF::PE::ResourceDialog::parse
static dialogs_t parse(const uint8_t *buffer, size_t size)
LIEF::PE::ResourceDialog::window_class
const ordinal_or_str_t & window_class() const
ordinal of a predefined system window class or name of a registered window class
Definition ResourceDialog.hpp:448
LIEF::PE::ResourceDialog::title
const std::u16string & title() const
title of the dialog box
Definition ResourceDialog.hpp:434
LIEF::PE::ResourceDialog::type
TYPE type() const
Definition ResourceDialog.hpp:333
LIEF::PE::ResourceDialog::styles_list
std::vector< DIALOG_STYLES > styles_list() const
List of DIALOG_STYLES used by this dialog.
LIEF::PE::ResourceDialog::ResourceDialog
ResourceDialog(TYPE ty)
Definition ResourceDialog.hpp:327
enums.hpp
ENABLE_BITMASK_OPERATORS
#define ENABLE_BITMASK_OPERATORS(X)
Definition enums.hpp:24
errors.hpp
lief_errors::not_found
@ not_found
Definition errors.hpp:25
make_error_code
tl::unexpected< lief_errors > make_error_code(lief_errors e)
Create an standard error code from lief_errors.
Definition errors.hpp:52
LIEF::PE
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
LIEF::PE::ACCELERATOR_CODES::RIGHT
@ RIGHT
Definition AcceleratorCodes.hpp:59
LIEF::PE::ACCELERATOR_CODES::LEFT
@ LEFT
Definition AcceleratorCodes.hpp:57
LIEF::PE::ACCELERATOR_CODES::T
@ T
Definition AcceleratorCodes.hpp:97
LIEF::PE::ACCELERATOR_CODES::CONTROL
@ CONTROL
Definition AcceleratorCodes.hpp:37
LIEF::PE::to_string
const char * to_string(AuxiliaryWeakExternal::CHARACTERISTICS e)
LIEF
LIEF namespace.
Definition Abstract/Binary.hpp:36
LIEF::ok_error_t
result< ok_t > ok_error_t
Opaque structure that is used by LIEF to avoid writing result<void> f(...). Instead,...
Definition errors.hpp:109
span.hpp
LIEF::PE::ResourceDialog::ordinal_or_str_t::to_string
std::string to_string() const
LIEF::PE::ResourceDialog::ordinal_or_str_t::is_defined
bool is_defined() const
Definition ResourceDialog.hpp:52
visibility.h
LIEF_API
#define LIEF_API
Definition visibility.h:41