1
0

vbadll.cpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #include "cdrapi.h"
  2. #include "cdrapp.h"
  3. extern corel *cdr;
  4. void open_lycpg();
  5. extern "C" __declspec(dllexport)
  6. int __stdcall vbadll(int code, double x =0.0){
  7. try {
  8. switch(code){
  9. case 1:
  10. AdobeAI_Copy_ImportCdr(cdr);
  11. break;
  12. case 2:
  13. CdrCopy_to_AdobeAI(cdr);
  14. break;
  15. case 3:
  16. Clear_Fill(cdr);
  17. break;
  18. case 4:
  19. Shapes_Filp(cdr);
  20. break;
  21. case 5:
  22. cql_FillColor(cdr);
  23. break;
  24. case 6:
  25. cql_OutlineColor(cdr);
  26. break;
  27. case 7:
  28. cql_SameSize(cdr);
  29. break;
  30. case 8:
  31. fill_red(cdr);
  32. break;
  33. case 9:
  34. BBox_DrawRectangle(cdr, x);
  35. break;
  36. case 10:
  37. Box_AutoGroup(cdr, x);
  38. break;
  39. case 11:
  40. run_BoundaryGroup(cdr);
  41. break;
  42. case 888:
  43. open_lycpg();
  44. break;
  45. default:
  46. return 0;
  47. }
  48. } catch (_com_error &e) {
  49. MessageBox(NULL, e.Description(), "Error", MB_ICONSTOP);
  50. EndOpt(cdr);
  51. }
  52. return code;
  53. }