add last backwards-compatible version

This commit is contained in:
2021-12-14 00:33:46 -07:00
parent 68b10d413b
commit b0dd3f07f3
335 changed files with 4746 additions and 19627 deletions

View File

@@ -2,11 +2,9 @@
#ifdef FOOBAR2000_DESKTOP_WINDOWS
#include <libPPUI/CDialogResizeHelperCompat.h>
BOOL GetChildWindowRect(HWND wnd,UINT id,RECT* child);
// Legacy class referenced by old code
// Do not use in new code, use libPPUI instead
class dialog_resize_helper : public CDialogResizeHelperCompat
class dialog_resize_helper
{
pfc::array_t<RECT> rects;
RECT orig_client;
@@ -14,6 +12,12 @@ class dialog_resize_helper : public CDialogResizeHelperCompat
HWND sizegrip;
unsigned min_x,min_y,max_x,max_y;
public:
struct param {
unsigned short id;
unsigned short flags;
};
private:
pfc::array_t<param> m_table;
void set_parent(HWND wnd);
@@ -24,6 +28,11 @@ public:
inline void set_max_size(unsigned x,unsigned y) {max_x = x; max_y = y;}
void add_sizegrip();
enum {
X_MOVE = 1, X_SIZE = 2, Y_MOVE = 4, Y_SIZE = 8,
XY_MOVE = X_MOVE|Y_MOVE, XY_SIZE = X_SIZE|Y_SIZE,
X_MOVE_Y_SIZE = X_MOVE|Y_SIZE, X_SIZE_Y_MOVE = X_SIZE|Y_MOVE,
};
//the old way
bool process_message(HWND wnd,UINT msg,WPARAM wp,LPARAM lp);