1
0

ChildSizer.cpp 735 B

123456789101112131415161718192021222324252627282930313233
  1. #include "ChildSizer.h"
  2. ChildSizer childSizer;
  3. ChildSizer::ChildSizer()
  4. : childresize_init(0),
  5. childresize_resize(0)
  6. {}
  7. void ChildSizer::Init(HWND dlg, ChildWndResizeItem *list, int count)
  8. {
  9. if (!childresize_init)
  10. childresize_init = (ChildResizeFunc)mediaLibrary.GetWADLGFunc(32);
  11. childresize_init(dlg, list, count);
  12. }
  13. void ChildSizer::Resize(HWND dlg, ChildWndResizeItem *list, int count)
  14. {
  15. if (!childresize_resize)
  16. childresize_resize = (ChildResizeFunc)mediaLibrary.GetWADLGFunc(33);
  17. childresize_resize(dlg, list, count);
  18. }
  19. ChildWndResizeItem *ChildSizer::Lookup(int id, ChildWndResizeItem *list, size_t numElements)
  20. {
  21. for (size_t i=0;i!=numElements;i++)
  22. {
  23. if (list[i].id == id)
  24. return &list[i];
  25. }
  26. return 0;
  27. }