|
You're thinking of rentacoder.com
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
A long time ago now I wrote some code to access the individual frames/bitmaps that make up a video file. I used the Video For Windows API and this code works great on WinXP. However I would like to rewrite it, as I understand it Microsoft aren’t pusing VFW anymore. Can anyone tell me which technology I should focus on? It is important that it doesn’t require any redistributables and will run on out of the box XP.
Anyone any thoughts? Now of any resources?
|
|
|
|
|
DirectShow is what you want.
MS has a free SDK with a bunch of sample programs. i think the frame extraction one is called "SampleGrabber".
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
Hi..
I m working on image processing...i m beginner of VC++ 6.0..i dont know how to load and display image meanz if i open any image through file dialoug it will display in non client area of window in SDI..
|
|
|
|
|
try this ,you will just have to pass the device context to the class,
http://www.codeproject.com/bitmap/cpicture.asp
Z.A
|
|
|
|
|
i m making Paint..i need memory device context
i did it but it doesnt work
did like daT
static int i=0;
if(i==0)
{
memDC.CreateCompatibleDC(pDC);
i++;
}
pDC->BitBlt(20,10,436,364,&memDC,0,0,SRCCOPY);
if i draw line i call invalidate it repaints so wht i draw in my device context i also draw in mem dc
but it doesnt work???
|
|
|
|
|
you need to select the bitmap into your mem DC by SelectObject(...) function.
A nice tool for optimizing your Microsoft html-help contents.
Includeh10
|
|
|
|
|
i tried but it gives assertion failure
|
|
|
|
|
there are million of samples in VC disk.
try to search the function you used inside these samples.
VC samples are first place to go for learning something new.
when you test your functions (calling process), be careful to find which function doesn't work.
A nice tool for optimizing your Microsoft html-help contents.
Includeh10
|
|
|
|
|
|
I'm doing some subclassing to allow only digits and one only of three allowable alpha characters at the end of the edit string. I'm overriding OnChar and find a need to modify the existing string before passing the allowable characters on. However, when I pass any character other than the character trapped by MyCEdit::OnChar to CEdit::OnChar it still results in passing the trapped character.
I assume this is the way the system behaves but I don't understand why. Could someone enlighten me? The way I'm getting the job accomplished feels rather kudgy to me and I'd rather avoid it if I can.
Thanks,
Lilith
|
|
|
|
|
try to override WM_KEYDOWN (OnKeyDown?) also.
if you control both OnChar and OnKeyDown, it should work.
A nice tool for optimizing your Microsoft html-help contents.
Includeh10
|
|
|
|
|
if you control both OnChar and onkeydown, it should work.
This is the note given in MSDN explaining the correct scenario explaning that you cant fool the system .
Note This member function is called by the framework to allow your application to handle a Windows message. The parameters passed to your function reflect the parameters received by the framework when the message was received. If you call the base-class implementation of this function, that implementation will use the parameters originally passed with the message and not the parameters you supply to the function.
in your case map the EN_UPDATE ,check wether the characters are integers and if the count goes above 10 , you do the required .
Regards
FarPointer.
|
|
|
|
|
Actually that's what I originally did except that I used EN_CHANGE, which may have been a mistake. Although a similar approach had worked before, this time I somehow got an odd character at the beginning of the string when I re-read it from the edit control.
Using a combination of OnChar to filter the input and EN_CHANGE to process the string at least would have the benefit of reducing my logic's complexity.
Lilith
|
|
|
|
|
I want to build an application which is determine the time a customer use a computer (a netcafe' software, like that). But a customer can easily endtask my application with TaskManager. Is there a way to prevent the app ended by the user ( the user may be log on admin acc) ? I know many program cant be endtask (and the most is viruses ~.~), but I dunno the tech. This is not just prevent user open TaskManager.How I solve this problem ?
Tnx all.
-- modified at 22:09 Friday 13th January, 2006
|
|
|
|
|
The best way would be not to get tricky and simply use the normal security architecture - ie. Not let the user log on as an administrator and set up permissions so they can't kill stuff. If, for some reason, this isn't feasible, it is possible but beyond most programmers (including me). Check out this - Read the bit under the "Kernel-mode Rootkits" heading. This would have to be done in kernel mode which is nothing like user mode programming and where mistakes are fatal. After going to all this trouble you might find that virus scanners and other tools think your app is a virus or rootkit.
Steve
|
|
|
|
|
a technique i have used is to run two processes -- let's say your app is tracker.exe, i would use tracker.exe and tracker_helper.exe. basically in both apps, use the WaitForSingleObject function, to wait for the other's process handle. if it is killed, just respawn the other process again.
of course this will be conspiciouos, if you want to stop people from seeing that you are doing this, maybe use srvtasks.exe or something kernel-sounding for the second one and put it in a system folder. (possibly ????)
still, if the user knew what they were doing, they could write an app to kill both processes simultaneously. if you don't want that, you can probably write a security descriptor for you main process and apply it somehow (sorry, can't help you there). if you have norton antivirus you can try to kill navapscv.exe and see what i mean.
hope that helps
|
|
|
|
|
I need to start another process from my program and pass it some arguments. Anyone know how to do this using VC++.Net Under Visual Studio 2003? Please Help if you can. Thank you
Pablo
|
|
|
|
|
You could use the "CreateProcess" API. Here is what a typical call would look like:
-----------------------------------------------------------------------------------
STARTUPINFO si = {0};
si.cb = sizeof(si);
PROCESS_INFORMATION pi;
BOOL bOk = CreateProcess(
"C:\\Windows\\System32\\Notepad.exe", // LPCTSTR lpApplicationName
NULL, // LPTSTR lpCommandLine,
NULL, // LPSECURITY_ATTRIBUTES lpProcessAttributes,
NULL, // LPSECURITY_ATTRIBUTES lpThreadAttributes,
FALSE, // BOOL bInheritHandles
0, // DWORD dwCreationFlags
NULL, // LPVOID lpEnvironment
NULL, // LPCTSTR lpCurrentDirectory
&si, // LPSTARTUPINFO lpStartupInfo
&pi // LPPROCESS_INFORMATION lpProcessInformation
);
if ( bOk )
{
pi.CloseHandle(pi.hProcess);
pi.CloseHandle(pi.hThread);
}
There are other options like "ShellExecute" and "ShellExecuteEx" and CRT functions such as "_spawn".
Steve
|
|
|
|
|
I want to be able to cause Microsoft Word to load(run) with a particular ".doc" displayed and when the user finishes the document and selects the [-] min or [X] close button in Mircosoft word the user returns to exactly where he/she left off in the program.
How can this be done AUTOMATICALLY from within a program? EXAMPLE of working code PLEASE!
C++ is my favorite programming language
|
|
|
|
|
You can call a ShellExecute on the filename of the doc you want to open.
SHELLEXECUTEINFO sei;
ZeroMemory(&sei, sizeof(SHELLEXECUTEINFO));
sei.cbSize = sizeof (SHELLEXECUTEINFO);
sei.lpVerb = "open";
sei.lpFile = curPath;
sei.nShow = SW_SHOW;
sei.hInstApp = NULL;
sei.lpDirectory = strPath;
sei.fMask = SEE_MASK_DOENVSUBST|SEE_MASK_NOCLOSEPROCESS;
sei.lpParameters = NULL;
ShellExecuteEx (&sei);
Where curPath is the filename (including path) and strPath is the name of the working directory.
This will call the default program for the specified filetype to open with that file. If the user has a different program defaulted for opening up .doc files (like wordperfect or something), then this will not open word.
Kelly Ryan
|
|
|
|
|
Hi ,
I guess you need to use automation ,by this way you export all the function provided by the word type library, you can do all the sort of work in that word like if the user is doing it, you can set the setuservisible(true),("i guess so ") ,and that word becomes visible to the user ,
i havent tried this on word, but on excel and it works wonderfully.
Regards
FarPointer.
|
|
|
|
|
I would like to know how to send a shortcut to the desktop from within a program?
Can anybody give me a working example?
C++ is my favorite programming language
|
|
|
|
|
|
Hi,
I have a VC++(mfc) classes written especially as base class for enhancing menu's in MFC modules.
Now i want to make use of this classes(vc++)for enhancing menu's in a vb6.0 module aswell. So these classes will be accessed by mfc & vb at same time.
1. How do i do this, do i create a dll?, if so what dll?, there are diff options in MFC wizard, which one do i choose to create?
2. Do i need to make any modifications in existing classes to export to VB
Please anyone give me an Idea.
Thanking you
Mo
|
|
|
|