vbadll.cpp 1.0 KB

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