Beginners_-_SetClipboard_strcat.c 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #include "raylib.h"
  2. #include <string.h>
  3. int main(void)
  4. {
  5. // Initialization
  6. //--------------------------------------------------------------------------------------
  7. const int screenWidth = 800;
  8. const int screenHeight = 450;
  9. InitWindow(screenWidth, screenHeight, "raylib example.");
  10. SetTargetFPS(60); // Set our game to run at 60 frames-per-second
  11. //--------------------------------------------------------------------------------------
  12. char output1[16] = "Test1";
  13. char output2[16] = "Test1";
  14. strcat(output1,output2);
  15. SetClipboardText(output1);
  16. // Main game loop
  17. while (!WindowShouldClose()) // Detect window close button or ESC key
  18. {
  19. // Update
  20. //----------------------------------------------------------------------------------
  21. //----------------------------------------------------------------------------------
  22. // Draw
  23. //----------------------------------------------------------------------------------
  24. BeginDrawing();
  25. ClearBackground(RAYWHITE);
  26. DrawText("Check your clipboard buffer CTRL+V",50,100,20,DARKGRAY);
  27. EndDrawing();
  28. //----------------------------------------------------------------------------------
  29. }
  30. // De-Initialization
  31. //--------------------------------------------------------------------------------------
  32. CloseWindow(); // Close window and OpenGL context
  33. //--------------------------------------------------------------------------------------
  34. return 0;
  35. }