|
1. either link in the "wmvcore.lib" into your project settings (link tab)
or
2. add this to your source or into "stdafx.h"
#pragma commend(lib, "wmvcore.lib")
or
3. directly add the lib into your project as one of the files
|
|
|
|
|
Hi,
I have an app with a series on property pages in a row. I was wondering if there was a fancy way that it could dock on the left hand side on the screen tucked away and the subsequent clicks would bring it out to the middle of the screen and vice versa.
I think I have seen something like this some where but can't remember where.
Does any one have a small sample link to such a thing?
|
|
|
|
|
Hello,
I'm writing a GUI to simplify the use of a console-based application, I've created a WIN32 application ( no MFC or ALT), I want to know if it's possible to print the output from dos console to an HWND that it's related to a listbox control;for opening the dos-console program I've used the ShellExecuteEx function.
thanks
Paolo
|
|
|
|
|
There is one article in Codeproject which also redirect stdin, stdout and stderr handles to a window.
Check this out.
http://www.codeproject.com/dialog/quickwin.asp
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
See these two articles:
http://support.microsoft.com/default.aspx?scid=kb;en-us;190351
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/creating_a_child_process_with_redirected_input_and_output.asp
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi there,
Does anyone have an idea of how to go about using Constrained Delaunay Triangulation in Line thinning? The input is a black and white TIFF image, pixel based. The program should thin the lines of the image to one pixel width.
Would really appreciate help here!
regards, fuzzypeach
|
|
|
|
|
Hi,
Now I'm using IHTMLDocument2::write to write html contents to an HTML document. But I found it become slower and slower after many times of writes, even I wrote in the same html contents every time. I dont know why
Below is the sample codes:
IHTMLDocumentPtr doc;
if(FAILED(doc.CreateInstance(CLSID_HTMLDocument, NULL, CLSCTX_INPROC_SERVER)))
return;
CComQIPtr<IHTMLDocument2> doc2 = doc;
if(doc2 == NULL)
return;
time_t startTime, ltime, delta = 0;
int step = 200;
for (int i = 1; i <= 50000; i++)
{
time(& startTime);
if(FAILED(doc2->write(sfArray)))
break;
doc2->close();
time(& ltime);
delta += ltime - startTime;
if (i % step == 0)
{
TRACE (_T("Seconds used on loading %d html DOM from %dth with same doc: %ld\n"), step, i - step, delta);
delta = 0;
}
}
I also write a demo project to demonstrate this but cant attach it here. If you need it, I'll send it to you.
Thanks & regards,
Hailiang
|
|
|
|
|
Okay, so I'm checking out the source code on this project. And I get to this section of code.
<br />
void GetResolution( int &X, int &Y ) {<br />
byte array[8];<br />
X = Y = 0;<br />
unsigned long address;<br />
if ( ReadProcessMemory( g_hCurrentProcess, (void *) g_uiResolutionOffset, (void *) array, 4, NULL ) ) {<br />
address = GetUnsignedLong( array );<br />
if ( ReadProcessMemory( g_hCurrentProcess, (void *) (address + 268), (void *) array, 4, NULL ) ) {<br />
X = GetUnsignedLong( array );<br />
if ( ReadProcessMemory( g_hCurrentProcess, (void *) (address + 272), (void *) array, 4, NULL ) ) {<br />
Y = GetUnsignedLong( array );<br />
Now, I am a bit confused as to what is meant by "address +268" I know 'address' is the base offset, but what is added to it? is it 268 bytes or is it an unsigned long or what?
|
|
|
|
|
looks like 268 bytes to me
|
|
|
|
|
What is added to it is (268 * sizeof(unsigned long)).
For example:
unsigned long al[10];
unsigned long* pal = al + 1; // same as pal = &al[1];
// and
unsigned long al1 = al[1]; // same as al1 = *(al+1);
INTP
|
|
|
|
|
John R. Shaw wrote:
What is added to it is (268 * sizeof(unsigned long)).
This is not correct. address is defined as an "unsigned long ", not as an array or a pointer. So (void*)(address + 268) adds 268 to the number held in address , and then casts to a void pointer. So it is incrementing by 268 bytes, not 268 unsigned long s.
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"
|
|
|
|
|
i gave you a 5 for that, cos you were thinking exactly the same thing as me, but you type faster
oh and your response is more legible
|
|
|
|
|
Whoops! You are correct, I need to be more observant. I saw 'address' and automaticaly saw a pointer variable, instead of an unsigned long variable that is holding a value that happens to be an address.
INTP
|
|
|
|
|
well then I'm confused. In the example given :
unsigned long address;
now if address is then set to 1000;
address = 1000;
then you add 268;
address += 268;
it'll be 1268
NOT 1000 + (268 *sizeof(unsigned long)) = 1072+1000 = 2072
what you have said doesn't make a lot of sense to me.
|
|
|
|
|
How to capture/save a bitmap on the picture box using VC++?
Aparna
|
|
|
|
|
GDI+
capture and save a bitmap of what?
Screen shot? Your active window?
by save do you mean to file or draw on the screen?
|
|
|
|
|
you can write it Byte wise. (like printf, but then it's called fwrite or write or something) You can then write pixel per pixel.
(Note: bitmaps have headers, this should be written first)
(Note: Write BGR NOT RGB (don't know why it just is)
(NOTE: remember Y-axis is inverted)
hope it helps!
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimmy Hendrix
|
|
|
|
|
How should an application create a file so that it inherits the permissions of the folder it is created in?
Microsoft says, in http://www.eu.microsoft.com/resources/documentation/windows/2000/server/reskit/en-us/serverop/part1/sopch03.mspx,
The version of NTFS included with Windows 2000 offers an important new feature for managing security — inheritable permissions. The Security dialog box offers the option to Allow inheritable permissions from parent to propagate to this file object *which is enabled by default*. (Emphasis mine)
And, in http://www.microsoft.com/resources/documentation/WindowsServ/2003/all/techref/en-us/Default.asp?url=/resources/documentation/windowsServ/2003/all/techref/en-us/w2k3tr_sec_authz_over.asp,
Inheritance of permissions You can control permissions for new objects created in a container object by setting inheritable permissions on the container. The permissions that you set on a container are also inherited by existing objects in the container *as well as newly created objects*. (Emphasis mine)
Well, it doesn’t seem to work that way at all. The second article also gives the following code for opening a file that will be written:
hfile=CreateFile(pszFile,GENERIC_WRITE,0,NULL,OPEN_EXISTING,0,NULL);
That’s exactly how I open an output file in my application, except that I use CREATE_ALWAYS instead of OPEN_EXISTING, because the file to be written may not exist yet.
The problem is that a file created by the application DOES NOT inherit permissions from the folder it is created in. This is true even if the file already exists and DOES inherit permissions before CreateFile() is called! When the “Security” tab of the file properties is examined, the “Allow inheritable permissions…” checkbox is cleared. This means that, if an Administrator creates the file, no non-Administrator users can open the file, even for read access.
How can I fix this problem?
|
|
|
|
|
From MSDN:
CREATE_ALWAYS Creates a new file. If the file exists, the function overwrites the file and clears the existing attributes.
Maybe two calls one with CREATE_NEW
if it fails you use OPEN_EXISTING
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Both files have been found. They are part of Cygwin.
www.cygwin.com
Hi all,
I'm trying to compile a project I obtained from Sourceforge. There are #includes for files such as <strings.h> and <poll.h>. I'm pretty sure they are not files missing from the project I downloaded, but more so, files I'm missing for a library that I have not downloaded.
I've done a quick search on google, and I get the impression that they exist on unix dev environments. The author of the project says his project compiles ni VC7.x and the code is like this :
#ifdef WIN32
#include <poll.h>
#include <strings.h>
#endif
and this is in several files, so it seems that they are available somewhere for win32.
Anyone know where I can get these or with which library they exists? (it's not in the latest Platform SDK, i looked)
Thanx
Jubjub <b></b>
|
|
|
|
|
Hi,
I am pretty new to DirectX and I need to accomplish the following thing:
Preview a live video stream from a webcam and be able to select (draggable&resizable rectangle) an area of the live video and apply some real-time image processing only on that area.
This involves video overlay (for the selection rectangle) and video processing of a portion of the video stream.
I understand DirectShow will let me preview a live video stream "quite easily". But will it give me the flexibility I need for overlaying the video and processing a portion of it?
If so how? And if not, what could I use?
Anything that could point me in the right direction would be greatly appreciated.
Thanks!
|
|
|
|
|
go to see my article http://www.codeproject.com/useritems/Motion_Detection.asp
|
|
|
|
|
Thanks, but I am looking for something in C++, not C#.
Also I would like to know what the best way is to achieve what I am trying to do. DirectShow + DirectDraw, or DirectDraw only?
Since I am starting with DirectX, I would like to get a few pointers in the right direction... For example, once I manage to get a preview of the live video feed using DirectShow, how do I implement localized video processing? What's the best way to do that?
Thanks!
|
|
|
|
|
I've done something similar to this for the project I'm working on at the moment. I've used a DirectShow filter graph to capture the images, inside that graph is a sample grabber filter which pushes images into my application. They are then connverted into textures which are drawn with Direct3D.
The key to this is that is that there are two distinct parts, both of which can be implemented in a number of ways. Frame capturing can be done with DirectShow, VFW or Video4Linux. Once you've got the frames in your image you can present them any way you like (GDI, Direct3D, DirectDraw, OpenGL, ...)
Adding the image processing is fairly simple. You can either add the image processing into your application after you have retrieved the data or you can modularise it by making it a directshow filter. My personal opinion is to do as little manipulation of frames as possible in DirectShow to ensure you have the most upto date frames flowing through the filter graph. Either way you end up dealing with an array of bytes which represent the image (depending on the camera format typically red, green blue triplets)
Drawing rectangles around regions is a minor problem compared to getting everything else correct, but all the drawing API's support this to some degree.
Simple Image Processing Architecture with DirectShow:
Source Filter
|
CSampleGrabber Filter -- Application -- Texture -- Direct3D Surface
|
Null Renderer
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
|
|
|
|
|
Thanks Andrew!
I think I need to spend some time learning DirectShow. I know DirectDraw and I understand how to apply image processing and overlay to a video buffer (primary surface, back buffer...). However I am missing the piece to get the video from the webcam to a buffer (DirectShow).
Can you tell me briefly how it works?
Merlinos
|
|
|
|