|
|
you may try this link :
http://www.naughter.com/vfwgrab.htm
The app was made for posting images into web, but you may use the code (or some snippets) for your own ideas.
|
|
|
|
|
Thank you for the help but I am unable to locate
<gdiplus.h>
included in stdafx.h
|
|
|
|
|
|
ok, got the problem .... i've downloaded that source and the needed gdiplus files are not included.
So try this ... there is an other article named hints get GDI+ running
here at codeproject :
http://www.codeproject.com/useritems/codemaze.asp
http://www.codeproject.com/useritems/CodeMaze/GDI+Files.zip
The download file is about 1 MB big, but includes a complete gdi+ version (gdiplus*.* => dll, lib, headers). I have not tried to merge both projects and re-compile the exe, but if there are problems you may ask PJ Naughter directly for a hint.
|
|
|
|
|
If you want to control the properties of the camera try DirectShow, specifically:
the IAMCameraControl Interface
the IAMVideoProcAmp Interface
IAMCameraControl gives you access to
typedef enum {<br />
CameraControl_Pan = 1,<br />
CameraControl_Tilt,<br />
CameraControl_Roll,<br />
CameraControl_Zoom,<br />
CameraControl_Exposure,<br />
CameraControl_Iris,<br />
CameraControl_Focus<br />
} CameraControlProperty;
IAMVideoProcAmp gives you access to
typedef enum tagVideoProcAmpProperty<br />
{<br />
VideoProcAmp_Brightness,<br />
VideoProcAmp_Contrast,<br />
VideoProcAmp_Hue,<br />
VideoProcAmp_Saturation,<br />
VideoProcAmp_Sharpness,<br />
VideoProcAmp_Gamma,<br />
VideoProcAmp_ColorEnable,<br />
VideoProcAmp_WhiteBalance,<br />
VideoProcAmp_BacklightCompensation,<br />
VideoProcAmp_Gain<br />
} VideoProcAmpProperty;
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
I am writing a COM dll that uses job objects to control certain procsses. I am having trouble with getting my job object to behave in the way I want, and there is a profound lack of documentation on this subject so I am reaching out to the outer world for help. I am new to this forum, but I was immediately impressed by the knowledge that I have found here at CP. If any of you saving developers have worked with job objects or are familier with the querky inner workings of them, I would be grateful for your response.
The main problem that I am having is getting my job object to terminate at the right point, and not to terminate when I don't want it to. If any of you savvy developers have worked with job objects or are familier with the querky inner workings of them, I would be grateful for your response. Please post or email me if you are interested and I can explain in greater detail and give source code to go along with it. TIA
If at first you don't succeed, Post....
|
|
|
|
|
Haven't used it, but Jeff Richter covers it in Programming Applications for Microsoft Windows[^].
Previous editions of this book were called Advanced Windows, but the chapter on jobs is new to the fourth edition (being new to Windows 2000).
|
|
|
|
|
Thanks mike...Ill check it out...If anyone else knows where I can find any other documentation on this subject let me know....
|
|
|
|
|
I am writing a COM dll in ATL.
But if i write "double bound[2][2]" in IDL, in c#, the parameter is "double[] bound". Maybe user will be puzzled by refer to 1 dimension array.
How can i express the function interface as strict as possible?
Thanks!!
|
|
|
|
|
I'm using some custom buttons which use bitmaps for their appearance. These buttons are all stored as MFC Bitmap project resources in the default 16 colors. They are placed in the program using CBitmapButton::LoadBitmaps and CMenu::SetMenuItemBitmaps (for different purposes).
They seem to work just fine but, if the user is using desktop settings which select a different color for "3D Objects" so that windows appear in a color other than the default grey, the custom buttons still have a gray background although my custom toolbars change to match the user color.
How can I get my custom bitmaps to adapt to the user's desktop colors?
|
|
|
|
|
Instead of CBitmap::LoadBitmap() , use LoadImage() with the LR_LOADTRANSPARENT and LR_LOADMAP3DCOLORS flags.
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"
|
|
|
|
|
Do you mean CBitmap::LoadMappedBitmap()? That code seem to work. Thank you!
But what can I use for CBitmapButton::LoadBitmaps() to achieve the same effect? It doesn't seem to have an equivalent parallel.
|
|
|
|
|
I don't still master CALLBACK function,
such as its working theory and coding rule and so on
Can somebody tell me?
Thank you in advance!
|
|
|
|
|
As far as I know there's nothing much different in syntax.
just use the CALLBACK specifier.
The difference come in the code that's inside the function.
A callback is called from some outside source (usually windows itself) on the occurence of some event. Callback functions are 're-entrant'. So if that event occurs twice while your function is still processing windows will still call the function for execution (instead of waiting the first call to finish it's job).
This means that you have to make sure that your callback routine can handle such a situation.
Setting / resetting values of variables can cause a lot of confusion here.
"It was when I found out I could make mistakes that I knew I was on to something."
-Ornette Coleman
|
|
|
|
|
Thank you again
It will cost much time to solve this problem if one error happens here.
|
|
|
|
|
Actually I've never read any formal documentation on CALLBACK function, don't even know if there's anything good around.
I just tried using the different callbacks with the WINAPI enum functions... and making mistakes!
"It was when I found out I could make mistakes that I knew I was on to something."
-Ornette Coleman
|
|
|
|
|
|
|
I trying to create an MFC app which is capable of opening and creating multiple types of documents. I have two document templates created in the main app class using the CMultiDocTemplate class. Everything appears to work, except when I try to open a document (Rich Text in this case) that was saved (which is supported by the app) the document appears to be empty. Any ideas as to what might need to be done to make this work? Thanks.
neacetp
|
|
|
|
|
Come ON, someone out there must know this...
How can you send a char that's not on the keyboard using SendInput?
To type '¯', for example, you hold alt and type 0175 on the num pad.
So I guessed this, but it doesn't work
int i;
INPUT input[10];
ZeroMemory(input, sizeof(input));
for (i = 0; i < 10; i++)
input[i].type = INPUT_KEYBOARD;
input[0].ki.wVk = 18;
input[1].ki.wVk = input[2].ki.wVk = 0x60;
input[3].ki.wVk = input[4].ki.wVk = 0x61;
input[5].ki.wVk = input[6].ki.wVk = 0x67;
input[7].ki.wVk = input[8].ki.wVk = 0x65;
input[9].ki.wVk = 18;
input[2].ki.dwFlags = input[4].ki.dwFlags = input[6].ki.dwFlags =
input[8].ki.dwFlags = input[9].ki.dwFlags = KEYEVENTF_KEYUP;
SendInput(10, input, sizeof(INPUT));
using a keyboard logger, i can see that it does exactly what I want, ie press alt, type 0175, release alt, but it doesn't send '¯' to the active app
Any ideas?
Any method to simulate the typing of ¯ to the active app will be fine - not necessarily SendInput(), that's just what i have used do far.
thanks in advance
=====
Phlip
Always proofread carefully to see if you any words out
|
|
|
|
|
Friendly advice: Yelling at the board will not increase the chances of getting a response.
Partial response: Use VK_MENU for the Alt key.
--Mike--
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
Latest art~!@#2rDFA#@(#*%$Rfa39f3fqwf--=
NO CARRIER
|
|
|
|
|
Michael Dunn wrote:
Friendly advice: Yelling at the board will not increase the chances of getting a response.
but it will increase it's chance of getting seen - this forum's so popular that in 1 day a post drifts back to the third page - it's quite likely that a lot of regulars who might know the answer to my problem never saw the post because it had disappeared before they got here.
=====
Phlip
Always proofread carefully to see if you any words out
|
|
|
|
|
Did you try WM_CHAR already or it didn't work? Just like: ::SendMessage(hwnd, WM_CHAR, (WPARAM)175, (LPARAM)0); or something like that...
|
|
|
|
|
it didn't work, but I've had an idea...
it would probably work if i sent the WM_CHAR to the text box rather than the window
is it possible to get the hwnd of the control with the focus on a different window? There's probably an API call for it, but what is it?
I don't know the control ID or anything like that - i'm sending to a 3rd-party chat app
=====
Phlip
Always proofread carefully to see if you any words out
|
|
|
|