Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.0 KiB

  1. helper Visual
  2. {
  3. public class VisualCI : Native.ContructInfo
  4. {
  5. public int pgadParent;
  6. };
  7. public Visual(Visual vParent)
  8. {
  9. VisualCI ci = new VisualCI();
  10. ci.pgadParent = vParent.pgad;
  11. int pgad = Native.BuildGadget(idVisual, ci);
  12. if (pgad != 0)
  13. {
  14. this.pgad = pgad;
  15. }
  16. else
  17. {
  18. uint error = Native.GetLastError();
  19. throw new System.SystemException("Unable to create new Visual");
  20. }
  21. }
  22. public Visual(HGadget gadParent)
  23. {
  24. VisualCI ci = new VisualCI();
  25. ci.pgadParent = Native.CastGadgetDirect(gadParent.hgad);
  26. int pgad = Native.BuildGadget(Native.FindGadgetClass("Visual", 1), ci);
  27. if (pgad != 0)
  28. {
  29. this.pgad = pgad;
  30. }
  31. else
  32. {
  33. uint error = Native.GetLastError();
  34. throw new System.SystemException("Unable to create new Visual");
  35. }
  36. }
  37. };