|
Like this:
namespace MyNamespace
{
}
|
|
|
|
|
I'm creating IE instance using this code:
m_lpBrowser.CreateInstance(CLSID_InternetExplorer);
m_lpBrowser->put_StatusBar(VARIANT_TRUE);
m_lpBrowser->put_ToolBar(VARIANT_TRUE);
m_lpBrowser->put_MenuBar(VARIANT_TRUE);
m_lpBrowser->put_Visible(VARIANT_TRUE);
IOleObjectPtr pOleObject;
pOleObject = (IUnknownPtr)m_lpBrowser;
the instance is created but problem is that I cannot get it's IOleObject
interface to set it's client site (QI returns 0x80004002 - no interface
although successfully I query for IUnknown first).
I need to navigate new instance to some url and provide login&password for
HTTP authentication.
What can be the problem with QI for IOleObject?
Thank you!
rrrado
|
|
|
|
|
rrrado wrote: the instance is created but problem is that I cannot get it's IOleObject
You'll never get that IOleObject because four years in CP and you still don't use the <pre> </pre> tags to post code.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
oops ... but in this case I have no < nor > in my code so it is displayed correctly
rrrado
|
|
|
|
|
|
ODBC API
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thanx David
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Hello again,
This time my code works, it's this:
#include <iostream>
int main() {
int get;
get = 10;
std::cout << "Type number here:";
std::cin >> get;
if (get > 10) {
std::cout << "You typed correct!";
std::cin >> get;
}
if (get < 10) {
std::cout << "Ops, wrong!";
std::cin >> get;
}
if (get == 10) {
std::cout << "Yes, correct!";
std::cin >> get;
}
else {
std::cout << "Why, it's always wrong?";
std::cin >> get;
}
}
but, when i type characters in 2 times it's ok, but when i type in 3 time, program autocloses. IS there possible to make it that it makes circles without exiting program, and without adding extra if lines?
|
|
|
|
|
Hi reyyy,
What about putting your code in a loop until a certain condition is reached ....
#include
int main()
{
int get;
int x = 0;
get = 10;
std::cout << "Type number here:";
std::cin >> get;
while (x < get)
{
if (get > 10)
{
std::cout << "You typed correct!";
std::cin >> get;
}
else
{
if (get < 10)
{
std::cout << "Ops, wrong!";
std::cin >> get;
}
else
{
if (get == 10)
{
std::cout << "Yes, correct!";
std::cin >> get;
}
else
{
std::cout << "Why, it's always wrong?";
std::cin >> get;
}
}
}
x++;
}
}
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Can you give me a code example?
|
|
|
|
|
Programm3r wrote: while (x < get) {
x++;
}
that can end in an infinite loop.
|
|
|
|
|
I was aiming for a very simple concept .....
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
i repeat : don't do successive if s like this. use else if instead
|
|
|
|
|
Your logic is still wrong, however.
The get variable can only be greater than, less than, or equal to 10, so there is no need to check for all three conditions.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
what means x++ ?
And is int x = 0 better then int x;
x = 0;
?
with code while (x < get) loop continues 10 times
|
|
|
|
|
reyyy wrote: And is int x = 0 better then int x; x = 0;
yes, initializing directly in the same instruction than the declaration will give better performances.
reyyy wrote: what means x++ ?
seriously, i think you really need to open you ears at school, or document yourself a bit more, because this is part of the very basics of the C/C++ languages.
if you don't know this, don't try to go further.
|
|
|
|
|
toxcct wrote: yes, initializing directly in the same instruction than the declaration will give better performances.
In the context of his program, it won't make one bit of difference.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
reyyy wrote: what means x++ ?
Increment x using the post-increment operator.
reyyy wrote: And is int x = 0 better then int x;
x = 0;
?
For what you are doing, they are effectively identical.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I was using revvy's code ... for a simple example ... thats all
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
And is int x = 0 better then int x;
x = 0;
?
with code while (x < get) loop continues 10 times
|
|
|
|
|
Programm3r wrote:
I was using revvy's code ... for a simple example ... thats all
Ok, and??
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Can you answer to my question?
|
|
|
|
|
reyyy wrote: Can you answer to my question?
Your question has been answered multiple times.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
reyyy wrote: Can you answer to my question?
check your mails and read the thread. you already got all the answers to your questions
|
|
|
|
|
didn't see, thx and srry
Is there possible, that for if (get > 11) it can generate 2 or more different cout's, and if yes, i write them same like:
std::cout << "blah blah";
std::cout << "bleh bleh";
and how do i know whych time it will take witch output?
thx
|
|
|
|