|
Hi All.
I want to write some code that have some method that in create bitmap of the current screen.
What i mean is when this method is call - there will be create file in name X.bmp that contain the info of the screen ( line pressing on PrtScn button ).
How can i catch the picture ? what windows method (maybe API function) i need to use ?
|
|
|
|
|
You may want to look up PrintWindow and WM_PRINT . There are many other techniques, which you choose depends on what OSs you need to support.
Steve
|
|
|
|
|
I will not explane how it is done, but I suggest searching using the keywords "screen capture". There are lots of Web articles on the subject, and there is probably still a code sample in the MSDN somewhere (the origanal example is probably 15 years old now). I believe there are a few articles at CP on the subject.
INTP
Every thing is relative...
|
|
|
|
|
|
#import "msxml3.dll" rename_namespace ("NEW_MSXML2")<br />
using namespace NEW_MSXML2; <br />
#import "MSSOAP30.dll" exclude("IStream", "ISequentialStream", "_LARGE_INTEGER", "_ULARGE_INTEGER", "tagSTATSTG", "_FILETIME") rename_namespace ("NEW_MSSOAPLib30")<br />
using namespace NEW_MSSOAPLib30;
In Debug mode, it creates MSSOAP30.tli and MSSOAP30.tlh files which has NEW_MSXML2 parameter,but in Release mode those two files are getting created with MSXML2 parameter.
Any Idea whats happening?
cheers,
Super
------------------------------------------
Too much of good is bad,mix some evil in it
|
|
|
|
|
super wrote: In Debug mode, it creates MSSOAP30.tli and MSSOAP30.tlh files which has NEW_MSXML2 parameter,but in Release mode those two files are getting created with MSXML2 parameter.
Better post this problem in Microsoft newsgroup!
"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
|
|
|
|
|
What if it is some sort of preprocessor issue. I think using the "NEW_" in your new name space name could be causing a problem.
If you called it the "123123_" namespace instead, does that work?
I have seen DUMBER issues than this with preprocessors before. I am leary of calling ANYTHING "NEW" these days, since that seems to be the magic keyword ever since C++ came out
People that start writing code immediately are programmers (or hackers), people that ask questions first are Software Engineers - Graham Shanks
|
|
|
|
|
Hi,
Can I write a shell extension which can process my own shell format?
For example: I have an application which has own data format, and when
drag from this applicaion and drop on explorer, the extension can process this data format.
It's like when you drag some texts and drop on explorer, which generate some special file.
Of course, I want generate my own files.
Anyone can help me?
|
|
|
|
|
How do I dynamically create a button (for example).
I understand how to create a button in code
ie CButton pBut* = new CButton()
pBut->Create( ..... )
but how do I trap when the button is pressed? I can't add entries to the message map because at design time the button doesnt exist?
TIA
|
|
|
|
|
you should overide the OnCommand function. The HIWORD of the wParam contains the action and the LOWAORD of wParama contains the Id of control
nav
|
|
|
|
|
For handling the evenmts on the buttons:
You have to override onCommand method and then in this you can check the id and perform the operations:
In onCommand:
you can get the id in LOWORD(wParam).
Check this and write the code in the following loop.
Cheers
Ganesh
|
|
|
|
|
The last argumen of button.Create is button id. You can use it in message map
CButton *pButton = new CButton;
pButton.Create(WS_VISIBLE|WS_CHILD,CRect(10,10,110,30),this,1 /*Id of the button any id which is unique*/ );
void OnHandler(void)
{
// Something
}
ON_BN_CLICKED(1 /* Last argument of create */,OnHandler)
MANISH RASTOGI
|
|
|
|
|
manish rastogi wrote: ON_BN_CLICKED(1 /* Last argument of create */,OnHandler)
He cannot use a message map as buttons are created dynamically.
Owner drawn
Jesus Loves
|
|
|
|
|
He can if he knows what the ID's will be at compile time...
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
True. But it's not flexible.
Owner drawn
Jesus Loves
|
|
|
|
|
Is there a way to dynamically create an ID?
|
|
|
|
|
ID acts as a unique identifier for the control that you are creating. So make sure that they are unique.
Owner drawn
Jesus Loves
|
|
|
|
|
I realize that, so is there any way to ask the framework to return a unique ID
|
|
|
|
|
Look in the header 'Resource.h'. Near the bottom of the file you should see an entry that looks something like:
#define _APS_NEXT_CONTROL_VALUE 1021
(The actual number in the definition depends on your particular project.)
You can use this MACRO as the value for your first dynamically created control. Just keep incrementing the value to get a new unique value for each dynamic control.
Dan
Remember kids, we're trained professionals. Don't try this at home!
|
|
|
|
|
Look up CreateWindow() in the MSDN, a button is just another window. Setting the dwStyle parameter to BUTTON should produce a button. You will need to do a little studying to figure out how to handle the result of pressing the new button, it easier to figure out in C than when using MFC.
INTP
Every thing is relative...
|
|
|
|
|
look a this Link[^]
codito ergo sum
|
|
|
|
|
Hello,
Lets assume I have two different graphic effects: a particle system (stars coming out of teh center of the screen) and a simple rotating cube. Both consist of textures which have a z-value when blitted / written into the render-pipeline. I want the particle-stars (although their z-value gets lower if they come nearer) to be always behind the cube. It could be possible thet one of the particles suddenly pops out of the cube, thats not wanted.
Someone told me that I should erase the zbuffer before drawing the next layer. Is that possible in DirectX8 and can solve my problem?
Thank you,
Chris
|
|
|
|
|
Hi,
Can anyone suggest me some good books in implementing code for image/video frames processing in c++. I would like to learn programming some image processing techniques and to create programs where I can apply transforms, shifts and find some characteristics from the video frames of images in visual c++. It would be great if anyone can suggest me with good books or tutorials with loads of image/video frame grabbing/processing programming discussed extensively.
thanks,
-Pav
|
|
|
|
|
If you don't mind using OpenCV this might help[^]
As for books when I looked a couple of years ago there weren't any decent books on directshow[if you want to use that], though there were some in the pipelines.
The Quran's Rational Arguments (Audio)
Background on Prophet Muhammad (in progress)
"They are MUSLIM. It does not matter how you split it up: all msulims (so they say) see every other muslim as a brother, regardless of origin or nationality." -legalAlien. Alhamdullah for the blessing of Islam
|
|
|
|
|
Hi,
thanks for ur reply.
Ok here u go. I am thinking of learning pattern recognition and extraction of charateristics. so, i thought it would be better to start off with some good image processing coding books in c++. for example, I would like to find the blood velocity from a video file of retina from a patient, in which I can see the blood vessels flowing. From all the frames my goal is to find out the velocity of blood. Hope u understand the track in which i am thinking of .
thanks,
-Pav
|
|
|
|