I've got an application that's using Berkelium for an embedded web browser, and I'm having trouble getting the drag-selection to work. I've seen examples of other WebKit-based applications that have it working just like a normal browser (Steam, Awesomium demo), so I feel like it shouldn't be that difficult to get working, but I don't know what may be wrong.
I'm passing in all of the mouse down, mouse move, and mouse up events to the Berkelium browser (mouseButton and mouseMoved functions on the Window) and I feel like that's all I should need to do? I wasn't able to find any help online about this, so hopefully someone here might know what's going on or where to look!
Thanks!
I tried drag selection in Berkelium in my app. It works in fields, it doesn't seem to work for page text.
It looks like the second comment on this page could be a fix for you:
http://code.google.com/p/berkelium-sharp/issues/detail?id=1#c2
The shift clicking apparently works fine to highlight text, so if you send a shift down along with button down, and a shift with button up, it will select the text along with it when the user drags.
I'm not sure if this will have an adverse affect on things like selecting multiple options on a list, but if you don't have that type of thing in the site you're trying to support, it wouldn't matter. I can't think of any other adverse effects right now, but I'm sure some probably exist.
This user says it worked for him, so it's worth a shot.
Related
I am using the latest swiftui and would like to know if it is possible to create drag & drop boundaries based on color?
I already created a drag & drop with rotation, pinching, etc. But would like to be able to create regions where you can drop into.
Thanks
Yes it is! It's a great idea, and I think you should pursue it.
As it stands there's a hundred different ways to go about things. Spend some time thinking about how you would want it to work, then just take baby steps. You've already covered a lot of the ground work by implementing rotation and pinching.
Write some code (in a playground so you get instant feedback) that does some simple drag and drop work. Add in a line of code that turns the background a different color or changes its opacity when you let go/lift your finger.
Those types of incremental changes are well documented and you will be able to google them quickly. I think it's a great sign that you haven't found ready made examples. It means you are thinking outside the box.
This is an opportunity for you to think like a developer and a designer. If you post your results somewhere or release a project on GitHub at some point, others will be able to find your work using the same search criteria you used when you didn't find any results.
If you get stuck, post the code the code that has you baffled, and I'm sure you get help on this site. Best of luck 🍀
Essentially I'm trying to learn more about the Win32 api, how certain classes/elements are created, destroyed, what items make them up etc.. Dissecting windows if you will for a project of mine.
I'm very curious at the moment what popups/tool tips/hover effects ubiquities to all windows applications are made up of. My main goal is to grab text from any tooltip/hover thingy/WS_POPUP?
If someone knows that is great but I'd also like to have the tools to research it myself.
I'm not even sure what to google to be honest to get me on the right path. I've tried some C++ code to print class names and fetch the text from what I think might be a msgbox but no dice so far.
The MiniSpy tool on Codeproject comes in handy in situations like this because it uses the corner of the spy window as the location, not the mouse.
I have a project using Qt 4.7. I need to display the contents of a webpage produced by performing a search on a website. The site has a box to type text into and an "ok" push button. When the ok button is pushed, it searches the site and goes to another page with the results. It's worth noting that these are NOT webpages made through Qt - they're just normal pages on a website. My Qt code so far is a simple UI with a QLineEdit and QPushButton. When the button is pushed, it needs to run the search on the site as if the user had typed the QLineEdit text into the search bar and clicked the ok button.
I know we're generally supposed to show sample code of what we've tried, but I honestly don't even know where to start with this, or if it's even possible. I've worked extensively with C++ but only a few months with Qt, and I've never had to write something like this. I've written code to write/parse HTML, but never to interact with a webpage that already exists. Can anyone please help? I'm really lost here. Thanks.
Edit: While looking for answers elsewhere online and seeing some of the similar-sounding questions people ask, I feel I should clarify: I absolutely am NOT in any way planning the use this for any sort of malware. It seems like a lot of similar questions get shot down over that, and I can assure everyone this project has no malicious intent whatsoever.
Try this:
void on_nameOfPushButton_pressed()
{
nameOfWebView->load(QUrl(QString("http://<website-url>.com/<search-url>?q="+
QUrl::toPercentEncoding(nameOfLineEdit->text()));
}
I would like to enable tabbing for my application. And so far it seems I could use a tab control. The problem with it is, though, that it creates a border around the client area. What I want, is more like a FireFox tab control, that only takes up a row in the application and doesn't create any frames around client area.
Does anyone know if it is possible with the default control?
I'm using MFC, but that shouldn't change things much I hope.
I'm pretty sure the tab control consists of two parts - the tab headers and the tab page. So you should be able to use the tab header only. It will take more work, but I think you can get what you want.
Look at CTabCtrl and CHeaderCtrl - will those do it? I've never customized them, but it seems possible.
There is also a CPropertySheet that's a good control. But so far it seems disabling and changing some things is simply impossible. No solution for the problem except full ownerdraw path.
I´m looking to implement a way to avoid the user taking a screenshot from one desktop application. Yes, this seems to be weird asking for that, but we need it. I tried to use OpenGL (SDL_tff) to render the text, but it seems that doesn't stop the user from taking the screenshot. Please, does anybody have some clever idea about how to do it?
Render it to video and use a hardware overlay. those are much more difficult to capture since they are technically never rendered to the screen like other apps. It goes directly to the hardware and displays through the graphics card, bypassing normal screen shot domain.
It is still grab-able though.
personally, i'd take a high res photo and run it through a img2txt converter :D
Edit: check out http://www.gamedev.net/community/forums/topic.asp?topic_id=359319 , they seem to have an example, and it specifically states how a "screenshot" of the effect is kinda silly.
As I mentioned in my comment, you can't stop the user from taking a screenshot.
There might be a few things you can do to make it a bit more difficult though, and maybe deter less knowledgeable or driven individuals from taking a screenshot.
A suggestion: you might want to watch for key combinations that are often used for taking screenshots, then briefly hide your text. It may get the behavior that it seems you are looking for: allowing the user to take a screenshot without showing the text.
Another alternative is to provide a very easy and obvious way to let the application take the screenshot FOR the user, without saving the text. This might be useful in the case that you aren't trying to make the text "impossible" to capture, but rather that the user would prefer the screenshots to be text-free.
It's not clear from your question what the motivation behind your request is. If you just would like to have "prettier" screenshots without text, this shouldn't be a hard problem to solve: just do as I mentioned before and provide a built-in mechanism for saving "clean" screenshots.
Just remember that if the user DOES want to save that text, you cannot stop them from doing it.
You cannot accomplish what you want. What you want is, in fact, nonsensical.
Even if you find some clever way to stop them doing it with their computer,
using a good quality digital camera to take a picture of their monitor provides
a remarkably good quality screenshot.
Don't forget to add VM detection routines so you can disable display if you discover you're running under a virtual machine. That way they can't take a screenshot of the VM window.
Unless they modify an open VM to remove that sort of easy tell-tale, in which case you'll have to use something stronger.