|
are you sure SetDIBitsToDevice lets you draw sub-sections of a DIB ?
|
|
|
|
|
I never have used SetDIBitsToDevice() myself. I would suggest you to use Stretchblt(), it's almost the same. I'm sure that one does the job...
My experience is that problems with these functions mostly are caused by:
- wrong coordinate system (try negative values)
- pending clipping areas
So if you try Stretchblt() and it doesn't work either you know its not in the coordinates..
And, as someone on CP a few days before suggested, there seems to be a 'DCviewer' somewhere on CP.
Good luck
Rozis
|
|
|
|
|
Hi,
I am writing a small app to connect 2 computers. When i test the server side right from my computer, it 's ok. But because i am using a shared network with a router, my friends cannot connect to my computer by using my IP (because it is a local ip). Can anyone suggest a way to overcome this problem, please?
|
|
|
|
|
You may configure your router for NAT [^], [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
so, that 's means i have to configure something "manually". Is there any solution by using code? I just wonder how p2p apps can work when 2 comps connected directly to each other and one comp is under a shared network
|
|
|
|
|
bubuzzz wrote: I just wonder how p2p apps can work when 2 comps connected directly to each other and one comp is under a shared network
When one of the two peer-to-peer appliacations is inside a private network, you've to configure (manually) the router for NAT .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
bubuzzz wrote: so, that 's means i have to configure something "manually". Is there any solution by using code? I just wonder how p2p apps can work when 2 comps connected directly to each other and one comp is under a shared network OMG
As long as one of the two peers is not firewalled (incoming connections are not blocked), they can make a connection. If both are in a local network without port forwarding it gets much more trickier, but there are still possibilities (as Skype shows).
/M
|
|
|
|
|
Port forwarding is not possible (see router configuration)?
|
|
|
|
|
yup. That is what i am trying these day. Thanks all for replying me
|
|
|
|
|
How do i generate tables in WORD through code? i am creating an application where i have to create tables depending on the input given. for example, if there are 10 objects there should be 10 rows and each row should have an object.
i was trying some examples in CP. couldnt find any.. if somebody can help me it would be great
|
|
|
|
|
There are actually some goo examples about office automation here at CP [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi Members
I am try to show Message when copy file or folder from windows explorer.Is it possible?
|
|
|
|
|
What do you mean?
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
|
You want to show the copy operation progress while it is being performed? Take a look at CopyFileEx[^] function, especially the third parameter.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
i am not going to copy file folder.If copy function of windows is stsrt then i want to show message.If i use CopyFile function then easily i can show message.
I want to show message when windows copy function is start then.
Plz help me
|
|
|
|
|
There is any more opinion.About this topic.
|
|
|
|
|
Hai,
I am having a C++ MFC Application. I have downloaded the original application from a website Metaqoutes.net.I have modified the program & run the pgm.It is wrkng correctly.that is when i build it & debug it,it is wrkng.But when i go to debug folder & running the Application.Exe it is showing the result of the original exe,i.e my changes r nt reflected in that.I am wrkng on VC++9 bt d original program is VC++6.Please help me
|
|
|
|
|
Check your project settings to see what is the output directory.
|
|
|
|
|
I have a project similar to installation program, which has an uninstall app - I hope the uninstall-app deletes all programs including itself - of course failed because it is in running.
I just wandering why normal installation programs, such as inno, can delete uninstallation program itself? what is deep story inside?
any comments?
|
|
|
|
|
|
it is interesting, I will do a test.
thanks
|
|
|
|
|
That's a C# article.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
See here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Please see the code bellow.
#include <iostream>
#include <stdlib.h>
using namespace std;
class Cpolygon
{
protected:
int width, height;
public:
void setvalues (int a, int b)
{
width=a;
height=b;
}
};
class Crectangle:public Cpolygon
{
public:
int area ()
{
return(width*height);
}
};
class Ctriagle:public Cpolygon
{
public:
int area()
{
return((width*height)/2);
}
};
int main(int argc, char *argv[])
{
Crectangle rect;
Ctriagle tril;
Cpolygon *Poly1 =▭
Cpolygon *Poly2 =&tril;
Poly1->setvalues(4,5);
Poly2->setvalues(4,5);
cout<<Poly1->area()<<endl;
cout<<Poly2->area()<<endl;
system("PAUSE");
return 0;
}
I have two questions.
1.
Cpolygon *Poly1 =▭
Cpolygon *Poly2 =&tril;
What does these two lines indicate?
2. Instead of creating two objects of base class can we use only one object of base class to set the values.
i.e.
Cpolygon *Poly;
So that
Poly->setvalues(4,5); need to call only once and create the objects of derived class and show the outputs i.e.
Crectangle *rect;
Ctriagle *tril;
cout<<rect->area()<<endl;
cout<<tril->area()<<endl;
will it work?
Thanks for reading.
|
|
|
|