|
Hey, thanks a lot Chris! The simplest of solution; huh? I'm real new to all this, but I'm learning.
Garry
|
|
|
|
|
Hi,
I am trying again. maybe this time I will get lucky..
I have a program based on a FrameWnd that contines a splitter with left side tree control and right side list control, everything works great....
From the menu of this application I activate another window which is also a FrameWnd that contains a list control. After I respond to a double click on this list control, the main window pops up and cover the second one
If I try SetFocus() right after the handling of the double click, I will cover something I dont't want. The only question is why the parent window decides to pop up ????
Any questions are welcomed, I can even send the source....
Thanks
Shay Harel
|
|
|
|
|
How can one autofill fields in IE or Netscape. I understand the two maybe completely different ways. I do not wish to use the functionality that comes with the browser for autofill. I have the information in a database and then need to launch the browser and then fill some fields.
Any ideas?
Thanks
|
|
|
|
|
If by autofill you mean put a value in the textbox initially, right when the page loads, add a value="whatever" attribute to the <input> element.
-Domenic Denicola- [CPUA 0x1337]
MadHamster Creations
"I was born human. But this was an accident of fate - a condition merely of time and place. I believe it's something we have the power to change..."
|
|
|
|
|
Depends if you are on the client-side or on the server side :
- on the server side, the solution will work for ALL browsers including Opera as well :
your web server is a proxy server. Surfers surf the net through your web server by urls of the form http://www.yoursite.com?url=... where ... is the URL of the target site.
What you do is that you get this request, you DO yourself the request against the target URL, retrieve the HTML, and once you've got the HTML you must do two things :
- remap all relative links to absolute links by adding http://www.yoursite.com?url= prefixes
- parse the HTML source code and fill out yourself all recognized forms in it, such like those for login, and so on.
Using PHP or ASP that's very easy. Even a dumb can do it.
That's it !!
- on the client-side, it will work on IE only. Do a C++ app, MFC-based is highly recommended. Do an app that wraps the web browser control. And override the OnDocumentComplete() event. That will give you access to the DOM once the HTML page is retrieved. Using the DOM, you can easily find form fields (there is even a collection for forms), and apply new value for recognized forms such like login, ...
That's it !!
And I swallow a small raisin.
|
|
|
|
|
Its client side but I cannot wrap the IE control. What I need is the ability to launch the browser and fill the fields. Sort of how Gator does it. In case you have not used Gator, it memorizes all your entries and then fills up fields as you reuse these pages.
I do not want my application to pick up what the user types. Simply fill in from a database after IE is launched. Cannot have an embedded IE control though.
Thanks
|
|
|
|
|
Gator is scum. If you are developing such IE extensions and intend to sell it, be ready to be assaulted by many folks who really don't want this in their browser.
If you provide the exact same features than Gator, then I don't know where you are going.
Besides auto-fill features, which by the way is built-in in IE (that's why users will not buy or even download a client-side toolbar for it), you'll spend most of your time answering back users for proof of whether or not your IE extension is doing any harm to their privacy. I know what I am talking about...
Believe me, if your project is just for fun, go on, I believe that's fun achieving it. And for this purpose I recommend you download the samples that were available with the Internet Client 4.0 SDK : you'll have sample of deskbands, commbands, and so on. Hopefully these samples are still available with MSDN CDs. I recommend you get the back issues of MSDN magazine (available free on MSDN site) : there are very very good articles and samples,
And I swallow a small raisin.
|
|
|
|
|
I am aware that Gator is crap and thanks for your marketing stratgey advice. No I am not interested in making any product and selling it to anyone. I am simply working on something and used Gator as an example to get some technical answers. But that seemed to have gotten lost. Thanks all the same.
|
|
|
|
|
And I hate it when I forget to log in and it puts in my reply as anonymous.
Have a good day you all.
|
|
|
|
|
Hi
A famous Newbies example to declare a CString was
CString welcome_string = "Welcome to Visual C++";
What if I want to declare a text that was as long as one paragraph? when I can't even do things like this
CString welcome_string
="Welcome to Visual C++...not finish yet continue next line
.....more text ";
there was a "newline is constant" error. Please help
Newbies
|
|
|
|
|
you need a "\" as this:
CString welcome_string
="Welcome to Visual C++...not finish yet continue next line\
.....more text ";
to let the compiler know that this line is not finished.
try it.
|
|
|
|
|
Thanks. I never thought it was so simple. What a shame.
What if I want to force it to make a newline?
Newbies
|
|
|
|
|
A new line in the text? Use \n , there's others too like \t for tab, \\ for '\', etc. Look these up (or 'escape sequences') in MSDN for more info
Dylan Kenneally
London, UK
|
|
|
|
|
Thanks
I've look at MSDN and you were right.
but when I want to type like this
CString welcome_string
= "Hello\ \n
World";
so that Hello and World are in different line, there was a "newline is constant" error.
Newbies
|
|
|
|
|
CString welcome_string
= "Hello\ \n\
World";
|
|
|
|
|
lucy wrote:
CString welcome_string
= "Hello\ \n\
World";
Thanks again. I've tried that but this came out
warning C4129: ' ' : unrecognized character escape sequence
and the line was still in one line.
Newbies
|
|
|
|
|
oops, sorry, should be
CString welcome_string
= "Hello\n\
World";
|
|
|
|
|
A lot of thanks for your reply BUT the output was
Hello|World
and not
Hello
World
this was my code
void CMyView::OnDraw(CDC* pDC)<br />
{<br />
CString welcome_string <br />
= "Hello\n\<br />
World";<br />
pDC->TextOut(0,0,welcome_string);<br />
}
Newbies
|
|
|
|
|
I'm afraid TextOut couldn't handle the "\n", but MessageBox() can. Try
MessageBox(welcome_string);
and see.
|
|
|
|
|
Thanks
Is this means only messagebox can handle "\n"? How about editbox or listbox ia a dialog?
Newbies
|
|
|
|
|
I'm not sure. You'd better check that out.
|
|
|
|
|
Thanks
Newbies
|
|
|
|
|
As Lucy said, TextOut() can not handle newlines, but DrawText() can. If you want to output multi line text use DrawText() .
HTH
CPUA 0x5041
Sonork 100.11743 Chicken Little
"So it can now be written in stone as a testament to humanities achievments "PJ did Pi at CP"." Colin Davies
Within you lies the power for good - Use it!
|
|
|
|
|
this is easy:
CString t=
"hello \
world";
Pay attention to the backslash, type ENTER after it and go on
|
|
|
|
|
or you can do this
CString t = "Hello"
"World";
without the '\' slash character
|
|
|
|