arian8j2 / clipboardxx Goto Github PK
View Code? Open in Web Editor NEWHeader only, lightweight and cross platform C++ library for copy and paste text from clipboard.
License: GNU General Public License v3.0
Header only, lightweight and cross platform C++ library for copy and paste text from clipboard.
License: GNU General Public License v3.0
Does not compile with bcc32..
Whenever I try to copy text to the clipboard using this, it gives errors about it being 'not a class or namespace name' and 'clipboard undeclared identifier' and such and have no idea how to fix this. Am I using it wrong or is it to do with the header file its self?
Version 0.4
When there are more than 1 copy command in my program, the error below appears at the 2nd copy command:
(I am really sorry for the "screenshot", I cannot access the clipboard for screenshotting when the program is debugging)
Here is a simple code that replicates my problem:
#include <iostream>
#include "clipboardxx.hpp"
int main()
{
clipboardxx::clipboard clipboard;
std::string string;
std::cin >> string;
clipboard << string;
std::cin >> string;
clipboard << string;
}
Please do let me know if you need any more information to follow this up. Thank you in advance.
Hey,
at the beginning, I would like to mention that I'm a beginner programmer, that is my first activity on Github and so I ask for leniency.
So I tried to use your library in my program and whenever I copy something for the second time I get a critical error (c0000374) in line 279 (SetClipboardData(CF_TEXT, global);
). Moreover, there is a warning (C28183).
I think that the clipboard is not "closing/deleting/empty/...." itself and that is why the program cannot rerun the copy function.
In my program, I added clipboardxx::clipboard clp;
at the beginning of the main function,
then used overflown operator <<
in a switch (users choice of action) in a while (menu with actions) loop (clp << password;
)
Thank you in advance for your reply.
strncpy() now returns an unsafe error when compiling in VS2019. Error says change to strncpy_s();
ClipboardXX/include/detail/windows.hpp
Line 48 in f35609b
See the documentation here: https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setclipboarddata
Also, you might want to do some error checking on the other API calls. There are some nice LastError to std::exception wrappers available as well.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.