|
maybe it's a mistake but i can't do what you said, i have to find another solution...
thanks for your interest
|
|
|
|
|
I think what vasmvr wants to is to provide the problematic header file with his own code.
Regards,
Marcus.
|
|
|
|
|
Mixing and matching versions of the SDK is never a good idea. It only leads to a highly complicated codebase and bugs that are extremely difficult to track down. I realize you just want this flag out of the newer SDK, but trying to mix'n'match in this way only opens the door to much bigger problems. My suggestion is to try to use the newer SDK completely and fix any issues you have when that is done.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Hi together,
I need your help: I have to find out what kind of graphics card is installed on a PC (e.g. ATI or NVIDIA and what kind of model). More specifically, I need to know if the card supports the languages cg or glsl, but that can be derived from the graphics card model, of course. Can anybody give me a hint on how to do that?
Thank you very much in advance.
Regards,
Marcus.
|
|
|
|
|
You can use a simple diagnostic program called dxdiag to determine your computer's hardware, operating system, and graphics card.
To use the dxdiag program:
1. Select "Start"
2. Choose "Run."
3. Type "dxdiag" in the box and click "OK."
4. Click "Yes" to the prompt, and the program will begin running.
5. Select the "Display" tab and the Name listed under the "Device" section is the name of your graphics card.
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
Thank you very much for the detailed instruction. The information presented in the dialog is exacly what I was looking for, but I need it in a C++ program. I forgot to mention that, but that's why I posted my question to the C++ forum
Do you have any idea how to do that? Thanks again!
Regards,
Marcus.
|
|
|
|
|
If no other solutions, you can try Windows Management Instrumentation (WMI), which allows you to find some hardware and software details programmatically.
The next sample displays available video controller(s):
#include "stdafx.h"
#define _WIN32_WINNT 0x0400
#include <objbase.h>
#include <comdef.h>
#include <Wbemidl.h>
#pragma comment(lib, "wbemuuid.lib")
_COM_SMARTPTR_TYPEDEF(IWbemLocator, __uuidof(IWbemLocator));
_COM_SMARTPTR_TYPEDEF(IWbemServices, __uuidof(IWbemServices));
_COM_SMARTPTR_TYPEDEF(IEnumWbemClassObject, __uuidof(IEnumWbemClassObject));
_COM_SMARTPTR_TYPEDEF(IWbemClassObject, __uuidof(IWbemClassObject));
void ShowVideoControllers()
{
CoInitializeEx(NULL, COINIT_MULTITHREADED);
CoInitializeSecurity(
NULL,
-1,
NULL,
NULL,
RPC_C_AUTHN_LEVEL_DEFAULT,
RPC_C_IMP_LEVEL_IMPERSONATE,
NULL,
EOAC_NONE,
NULL);
IWbemLocatorPtr locator;
CoCreateInstance(
CLSID_WbemLocator,
0,
CLSCTX_INPROC_SERVER,
IID_IWbemLocator,
(LPVOID *)&locator
);
IWbemServicesPtr services;
locator->ConnectServer(
_bstr_t(L"ROOT\\CIMV2"),
NULL,
NULL,
0,
NULL,
0,
0,
&services
);
IEnumWbemClassObjectPtr enumerator;
services->ExecQuery(
bstr_t("WQL"),
bstr_t("SELECT * FROM Win32_VideoController"),
WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY,
NULL,
&enumerator);
IWbemClassObjectPtr object = 000;
for( ; ; )
{
ULONG ret;
enumerator->Next(WBEM_INFINITE, 1, &object, &ret);
if( ret == 0) break;
_variant_t variant;
object-&Get(L"Name", 0, &variant, 0, 0);
_bstr_t model = variant;
MessageBox(0, model, "", MB_OK);
}
}
Hope it helps.
-- modified at 9:41 Wednesday 21st June, 2006
|
|
|
|
|
Thank you! I'll try it.
Regards,
Marcus.
|
|
|
|
|
hi to all
i have a problem that static box id does not appear in the class wizard to add variable plz tel me
thanks
Ashish Dogra
MCA
Noida
|
|
|
|
|
It won't as IDC_STATIC .
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Right click on the static control . Go to properties . Change the id to something other than IDC_STATIC. Now open the class wizard to add variable to the control .
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
this problem is in all projects or this project
whitesky
|
|
|
|
|
i try it but it still have same problem
plz tel me something else
Ashish Dogra
MCA
Noida
|
|
|
|
|
|
no sir problem is still there
Ashish Dogra
MCA
Noida
|
|
|
|
|
Not sure if that will help: in your project directory, delete (or rename) the .clw file (which contains the information for ClassWizard). Then reopen your project and open Class Wizard. IT will prompt you that the file is not found and if it should reconstruct it with the source files. Say yes.
Check if that works.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
Hello,
Long time reader, first time poster.
I have created a simple .txt parser. I am wondering if it is possible to drag and drop a .txt file into the parser.exe and have it execute automatically. At the moment when I drag and drop a file it opens the program, so I would assume that Windows must handle the event in some way or another. Anybody wanna point me in the right direction?
P.S. I work in Visual C++ but really mostly with Windows Code and C.
Thanks,
Joe the Noob :->
-- modified at 8:36 Wednesday 21st June, 2006
|
|
|
|
|
TheDelChop wrote: At the moment when I drag and drop a file it opens the program...
Isn't that the same thing as executing it?
Otherwise, when your application receives the WM_DROPFILES message, start processing the files.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Depends what you want to do.
Suppose you have Windows explorer open with a VC console application MYPROGRAM.EXE visible in the list of files, and you drag some other file FILE.TXT onto MYPROGRAM.EXE and drop it, then windows behaves as if you entered "MYPROGRAM FILE.TXT" at the command line. So what you have to look for is how to use command line parameters. ARGV springs to mind, but it's been a while since I used that stuff.
If you want to drag a file and drop it onto an application which is already running, I have no idea!
|
|
|
|
|
|
After weeks of trying to program using the dlls and/or libs, i finally considered building my own gui i.e. Console Programming in vc++
Now all i get is
<br />
CString csExecute;<br />
csExecute="C://msys//home//ffmpeg4//ffmpeg.exe";
csExecute+= " ";<br />
csExecute+="-i Rahul.avi -s qcif -o fort1.mpeg";<br />
SECURITY_ATTRIBUTES secattr; <br />
ZeroMemory(&secattr,sizeof(secattr));<br />
secattr.nLength = sizeof(secattr);<br />
secattr.bInheritHandle = TRUE;<br />
<br />
HANDLE rPipe, wPipe;<br />
<br />
CreatePipe(&rPipe,&wPipe,&secattr,0);<br />
STARTUPINFO sInfo; <br />
ZeroMemory(&sInfo,sizeof(sInfo));<br />
PROCESS_INFORMATION pInfo; <br />
ZeroMemory(&pInfo,sizeof(pInfo));<br />
sInfo.cb=sizeof(sInfo);<br />
sInfo.dwFlags=STARTF_USESTDHANDLES;<br />
sInfo.hStdInput=NULL; <br />
sInfo.hStdOutput=wPipe; <br />
sInfo.hStdError=wPipe;<br />
char command[1024]; <br />
strcpy(command,csExecute.GetBuffer(csExecute.GetLength()));<br />
<br />
CreateProcess(0, command,0,0,TRUE,<br />
NORMAL_PRIORITY_CLASS|CREATE_NO_WINDOW,0,0,&sInfo,&pInfo);<br />
CloseHandle(wPipe);<br />
<br />
char buf[100];<br />
DWORD reDword; <br />
CString m_csOutput,csTemp;<br />
BOOL res;<br />
do<br />
{<br />
res=::ReadFile(rPipe,buf,100,&reDword,0);<br />
csTemp=buf;<br />
m_csOutput+=csTemp.Left(reDword);<br />
}while(res);<br />
AfxMessageBox(m_csOutput);<br />
which does a nifty little trick of displaying output from the console
Now all i get is
<br />
"Rahul.avi I/O Error<br />
Usually that means that input file is truncated and/or corrupted "<br /> which is strange since if i try the same from the command line it encodes fine.
So what am I doing wrong?
|
|
|
|
|
Try using ShellExecuteEx
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
I am trying shellexecute as well
ShellExecute(NULL,_T("Open"),_T("C://msys//home//ffmpeg4//ffmpeg.exe"),_T(" -i Rahul.avi -s qcif fort.mpeg"),NULL,SW_SHOWMAXIMIZED);
DOesnt seem to work though
|
|
|
|
|
Try specifying the full path to your avi. Also GUI means Graphical User Interface, and calling a console application as a GUI is a bit of a stretch.
|
|
|
|
|
Well I intend to extend my dialog to give the user options and all that jazz.
SOrry for the confusion.
|
|
|
|
|