Rich Edit control works ok but doesn't allow setting of TF_PLAINTEXT:
SendMessage(mhEditCtrl, EM_SETTEXTMODE, TM_PLAINTEXT, 0);
returns 0 which is supposed to indicate success according to the api docs. But it's not plain text because I can drag formatted text (with various fonts etc) into the...
If you want to write a program to download from links, you don't really need a browser at all. What (I think) you need to do is:
1. Download the raw HTML from the site (try wininet functions)
2. Parse the HTML to find all the (file) links. Try what Pyramus said or look around for other methods...
Where is the web page being displayed? (Are you writing your own browser? using a conventional browser? Be a little more specific)
Or perhaps you mean you want to create an editor for looking at the text of an HTML page and have the editor interact with the mouse?
Get a handle with CreateFile()
then move the file pointer with SetFilePointer()to where you want to chop off the remaining bytes
then do SetEndOfFile() on the handle
you might try mouse capture functions. Check out:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcepoint/htm/_wcesdk_win32_setcapture.asp
You could make a thin window where your line is and capture the mouse there.
If you are using MFC, CWnd-derived classes have a SetCapture...
RahulGade:
Sure. ATL away! I was just following his lead out of curiosity.
Keep in mind however, if you do a COM object you gotta register it on any other machine than the one you built it on (ask people to do regsvr32 or give them a batch file).
Ok, so you could do a dll. Apparently VB can load dlls. Instead of "LoadLibrary" which is the C/++ function call to load a dll, you use "Declare" and "Lib". I looked around for a minute and there seem to be a lot of links which deal with this topic. Here's one...
Well, not needing to see the console does not mean that the program does not need to run independently of the VB interface.
When you say things like "as it gathers/manipulates data", it sounds like the C++ program needs to remain running "in the background" even when you...
you might have to go down to sockets.
Or, you can use Wininet. Yank the internet handle out of the CFtpConnection (or open your own). Instead of doing FtpOpenFile(), open the transfer connection manually using FtpCommand to send each of the ftp commands:
REST startpoint \n
PASV \n
RETR...
Well the define trick didn't work but it looks like it should because other sites around the net say to do the same thing. However, I did get it to work. The test program I posted above was being compiled with borland 5.5. When I compiled it with VC++ it worked.
Thanks for your help though.
Sorry, that's just for finding the mouse position. There's also mouse capturing functions and stuff.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/mouseinput.asp
As to not being able to hide the mouse, I've never used DirectX...
You can catch the WM_MOUSEMOVE message...
here's a link I found searching google http://leb.net/wine/WinDoc/msdn/sdk/platforms/doc/sdk/win32/mess/src/msg25_27.htm
random_shuffle produces the same random order each time. Is there any way the seed std::random_shuffle? (srand didn't help).
#include <vector>
#include <algorithm>
#include <iostream.h>
typedef struct {int i;} TESTSTRUCT;
using namespace std;
int main()
{
vector<TESTSTRUCT> vec...
>>"wininet.dll ... is not included in typical windows installation."
Are you sure? It's on every machine I've ever worked on and that includes 98, xp, NT, and 2000 machines
If you have a char array let's say szChar:
Len()
int len = strlen(szChar);
Mid()(to get a substring of length L starting from point P.)
If you know the length of the substring at compile time:
char szSubstring[11]; // SET UP BUFFER
char* p = szChar + P; // SET POINTER TO...
hmm...
But you are still going to have problems because you are trying to have one object inherit the interface for another object. I'm not sure this will work. One way I think you could proceed is:
1. create one ATL object (A)
2. add all your A methods to its interface IA
3. Instead of creating...
The coworker is very grouchy and says they are too busy. Sorry.
The interface of A and B inherit from IDispatch because you selected "dual" instead of "custom" interface support.
Otherwise you would have inherited from IUnknown (IDispatch inherits from IUnknown anyways)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.