|
QuickDeveloper wrote: 2)is there any function in VC to get the current screen resolution and change the bitmap accordingly??
Otherwise the only alternative is to make the application work only under specific resolution
SystemParametersInfo and StrechBlt api will help
QuickDeveloper wrote: Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
good quote!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
hi
how can i hide a process?
|
|
|
|
|
farshad.f wrote: how can i hide a process?
hide from where?
nave
|
|
|
|
|
If it was easy to hide a process every virus/trojan would be doing it already.
Steve
|
|
|
|
|
1. By closing it.
2. By renaming it.
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[ ]--
[My Current Status]
I dont know why the hell the script for voting 5 is disabled only for me??
|
|
|
|
|
VuNic wrote: 2. By renaming it.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
farshad.f wrote: how can i hide a process?
yes you can ShowWindow(SW_SHOW)... be more specfic while asking question?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
If anybody have used NetMeetin 3 SDK componant please reply. I need help on this.
Thank you.
KIRAN PINJARLA
|
|
|
|
|
kiran.pinjarla wrote: If anybody have used NetMeetin 3 SDK componant please reply. I need help on this
exactly what is your problem!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi,i want to ask..how can v load the 3d images in opengl?
Regards
NooR
|
|
|
|
|
Read an OpenGL book - I think you need to get more familiar with the library if you are asking questions like this - do you mean render an image, load a 3D object from a file?
A cynic is a man who, when he smells flowers, looks around for a coffin. -H.L. Mencken
|
|
|
|
|
_I am using Visual Studio C++ .NET 2003, and I have problem when using cout. Here is my code:
#include <iostream>
using namespace std;
class A
{
private:
unsigned int m_nCount;
public:
A()
{
m_nCount = 0;
}
~A(){}
int Test()
{
m_nCount++;
return m_nCount;
}
};
void main()
{
A a;
cout << a.Test() << a.Test() << a.Test() << endl;
}
_ I expected that the output must be "123" but it was "321". I don't know what to do. Is my code wrong or that's a bug of VS C++ 2003. I need your help, thanks in anvance!!!
|
|
|
|
|
fatherhood of this problem is that Test func first called for third parameter of cout . I found this by change your code :
(First MyFunc called then Test function )
<br />
<br />
class A<br />
{<br />
private:<br />
unsigned int m_nCount;<br />
<br />
public:<br />
A()<br />
{<br />
m_nCount = 0;<br />
}<br />
<br />
~A(){}<br />
<br />
int Test()<br />
{<br />
m_nCount++;<br />
return m_nCount;<br />
}<br />
<br />
int MyFunc()<br />
{<br />
m_nCount++;<br />
return m_nCount;<br />
}<br />
<br />
};<br />
<br />
int _tmain(int argc, _TCHAR* argv[])<br />
{<br />
A a;<br />
<br />
cout << a.Test() << a.Test() << a.MyFunc() << endl;<br />
<br />
}<br />
<br />
-- modified at 3:37 Saturday 22nd July, 2006
|
|
|
|
|
_ I debugged your modified code and found as you said, MyFnc() was called before Test(). But if MyFnc() was called first, I expected that the result must be "123" but it was still "321". Because when MyFnc() is called, the return value is 1 and 2 calls of Test() later returns 2 and 3.
_ When I modified my code as follow, the result was "123", MyFnc() still got called first. It is very strange???
#include <iostream>
using namespace std;
class A
{
private:
unsigned int m_nCount;
public:
A()
{
m_nCount = 0;
}
~A(){}
int Test(unsigned int i)
{
return i;
}
int MyFnc(unsigned int i)
{
return i;
}
};
void main()
{
A a;
cout << a.Test(1) << a.Test(2) << a.MyFnc(3) << endl;
}
_ When I tested "cout << 1 << 2 << 3 << endl;", the output was "123".
_ I think the call order is right to left and the return values are put to the stack. When cout outputs, it pops the stack to get the inverse order.
|
|
|
|
|
You said :
"
_ I debugged your modified code and found as you said, MyFnc() was called before Test(). But if MyFnc() was called first, I expected that the result must be "123" but it was still "321". Because when MyFnc() is called, the return value is 1 and 2 calls of Test() later returns 2 and 3."
The command before exec is : cout << a.Test() << a.Test() << a.Test() << endln ;
in Step 1 command is equivalent --> cout << a.Test() << a.Test() << "1" << endln ;
in next step command is equivalent ---> cout << a.Test() << "2" << "1" << endln ;
and in last step is ---> cout << "3" << "2" << "1" << endln ;
Now why you expect you see "123" in output . It is reasonable you see "123" in output .
|
|
|
|
|
if you add endl at the end of each a.Test(),you will get the right result:123
it's really strange!
|
|
|
|
|
First note that the problem has nothing to do with "cout":
----------------------------------------------------------
//#include <iostream>
//using namespace std;
#include <stdio.h>
class A
{
private:
unsigned int m_nCount;
public:
A()
{
m_nCount = 0;
}
~A(){}
int Test(char ch)
{
// cout << ch << endl;
printf("%c\n", ch);
m_nCount++;
return m_nCount;
}
};
void main()
{
A a;
printf("%d%d%d\n", a.Test('a'), a.Test('b'), a.Test('c'));
// cout << a.Test('a') << a.Test('b') << a.Test('c') << endl;
}
----------------------------------------------------------
Output is:
c
b
a
321
The same output is produced if "cout" is used. Note the "a", "b" and "c"s - this shows what's happening: The expressions are being evaluated from right to left.
There is nothing going wrong, see here:
http://www.kuzbass.ru/docs/isocpp/expr.html
Here's a quote:
"-4- Except where noted, the order of evaluation of operands of individual operators and subexpressions of individual expressions, and the order in which side effects take place, is unspecified."
Steve
|
|
|
|
|
_ OK, I think that I have something misunderstood in my mind. I used to think that cout evaluates from the left to right but it turns out it doesn't. Thanks everybody for help
|
|
|
|
|
Don't do that. When you put multiple side-effects in the same function call (operator<< is just a function call, after all) you're getting into compiler-specific behavior.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
Hello, everyone !
I encounter a problem. When I set the VC++ (7.0) "Optimization: Maximize Speed(O2)", my program can't work correctly. But when I changed the Optimization to other, for example to "Minimize Size (O1)" or disable, my program can
work correctly.
But for some reason, I must use the (O2) option.
I want to know by which way , can I find the bug in source ?
Thanks a lot!
Best Regards,
|
|
|
|
|
Hello guys.
I'm sorry. I'm not sure I'm in right board section.
I tried to search what I'm going to ask. but failed..
I’m going to develop a dynamic library over several platforms; they are Windows, Mac and Linux.
I expect the forms of output would be ‘.dll’ , ‘ .dylib’ and ‘ .so” .
They must be built from same source codes.
But unfortunately I have neither Macintosh nor Linux machine.
So I have to build that all kinds of libraries in Windows XP system.
And I know it is very difficult to build an application for Macintosh using the Windows system. (and vice versa)
But what I'm trying to do is for just 'dynamic library' using ANSI C.
I think the cross-compiling for 'library' is easier than for 'applications'.
am I right?
And one of what I've found is 'gcc'of MinGW.
I'm wondering if it is really possible to build the three kinds of output of dynamic library from same source code using gcc of MinGW?
If not , how can I do that??
Thanks~
-- modified at 1:04 Saturday 22nd July, 2006
|
|
|
|
|
How to forbid the user to terminate my program.(in taskmgr).
Can I accomplish that to promote the process privilege.Thanks for your help.
|
|
|
|
|
Why would you want to do that? Are you writing malicious applications?
If you're writing a normal application, make it so good that no-one would want to exit it.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
You can't. This is by design of windows.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
If its an important application that needs to be running 365 days of the year, it should be firstly be running on a dedicated server. The less user interaction the more chance it wont be closed by accident. You can then start by overridding the usual suspects: OnClose, OnOK, OnCancel. Although as previous replies have said, a user could still terminate the application via task manager. - Maybe writing the application as a desktop application is the wrong avenue to take in this instance and writing the program as a windows service would be more fitting. However, even though this would give you some benefits ( e.g from people logging onto the machine and mistakingly terminating the program ) you can still not guarantee that your program could not be stopped.
If you really want to make sure that this application is not closed, you could write a heartbeat/pulse utility which periodically checks to make sure that your app is still running, and if its not re-start it! - then ofcourse some of the emphasis then shifts to the heartbeat/utility app. If this gets closed, then your back to step 1. - You could make the same heartbeat/pulse app distributed, in that it could be present on multiple servers, with all of them checking in with the server your 'important' app is running on.
Just a few ramblings.
|
|
|
|