|
aaaaaah.....but that doesnt work....i had tried that out when i searched MSDN.....I get more errors (from 3 errors to 47 errorz!!!!!)
by the way the #include<stdafx.h> is already there in the hearder files that i have loaded.....removing that and adding in the correspondin cpp file also doesnt help.....
sob.....any other ideas.....
thanx a lot all u guyz for ur answerz.....and expecting u could clear it up for me.....
|
|
|
|
|
i find this
fatal error C1010: unexpected end of file while looking for precompiled header directive
For solve this common problem You need to use automatic use of precompliled headers. Select project/settings (or ALT+F7) then, in the Project Settings Dialog, select the C/C++ tab, then select the Precompiled Headers item in the combo box, and select the Automatic use of precompliled headers option.
here:
http://www.codeproject.com/database/caaadoclass1.asp[^]
hope it can help
-------------------------
Best Wishes sehsiW tseB
-------------------------
You will when you believe!
-------------------------
|
|
|
|
|
well.....the link that u gave me has to do with databases!!!!!
i guess u have put up the wrong link!!!!!
i selected the "Automatic use of precomplied headers" option,but what do i put in the through header box??
thankz for ur reply.....
|
|
|
|
|
hi,
i am trying to provide an interface to a webcam in
vc++/sdk please help me........Please help me if anyone
knows about the api's used to capture a webcam
in vc++..Please reply as soon as possible...
|
|
|
|
|
Hello
There is an SDK available from Microsoft Research called "Vision SDK". With this SDK you can connect to your webcam and capture images in a variety of formats. I have worked on a project using this SDK in my 3rd year project in BS. Tell me if you want any additional help.
PS. Oh and i just learned that Microsoft has sold its Vision SDK product to some german company which might make it commercial so it might not be publicly available. Fortunately i found a website for you that allows you to download the microsoft version visit http://www.cs.ualberta.ca/~jiayuan/414/
Regards
Ahmed Ajmal
|
|
|
|
|
Ahmed,
Thanks for the info,
I have a query ? Does the version of DIrectX (9.0c) which i have matter
to run the VisSDK application bcoz, when i started compiling am getting errors
in files "mmstream.h" and "strmif.h" ?
for the SDK to compile - what is the version of Direct X i should use...
Thanks,
Pramod
|
|
|
|
|
The most effective way to use an installed webcam is to use DirectShow, which comes with DirectX 9.
The webcam driver, when it was installed and loaded, created a DirectShow filter for the video stream and pictures available from the camera. This filter offers one or more interfaces, depending on what services the camera has. If you build and operate a 'capture chain' (DirectShow term), you can capture live data from the camera into a Windows window, a file or a network stream.
To use DirectShow in your programs, you must download and install the latest DirectX SDK available freely from Microsoft. The DirectX Documentation accompaning this SDK has a few examples and code samples on how to create capture chains. The process of creating a chain is similar everytime: the filters that join the chain determine the nature, purpose and features of the chain.
For example, to use a webcam to get live data from the camera to a Windows window, create a capture chain with the webcam filter and a Video Rendering Mixer filter. VRM filter can render video data into a window you create and specify with a HWND parameter. Remember that the VRM filter creates an auxilary window which is a child of the HWND you specify. The auxilary window has no title bar, system menu or anything else. It's just a blank square which is constantly redrawn with video data. Thus you need an actual top-level window which allows you to control the video display. You can't create a program and just put a video window over the desktop, as you would then have no way of closing the program without CTRL+ALT+DEL.
-Antti Keskinen
----------------------------------------------
"If we wrote a report stating we saw a jet fighter with a howitzer, who's going to believe us ?"
-- R.A.F. pilot quote on seeing a Me 262 armed with a 50mm Mauser cannon.
|
|
|
|
|
Well VisionSDK doesnt have any dependencies that is you do not require a version of DirectX for that. Run the samples that come with the installation and do read in the documentation too This will clarify a lot of things. Basically VisionSDK supports Webcams that support Video for Windows(VFW) which virtually everybody webcam supports. If you are more comfortable with the COM style architecture than I suggest you go for DirectShow as Keskinen has suggested. Any more queries are welcome. I can help with implementation of Webcam interface
Regards
Ahmed Ajmal
|
|
|
|
|
It's true that DirectX has it's dependencies, but facing reality, how many Windows machines there are in the world which don't have DirectX (any version) installed ?
DirectShow is also a lot easier to program once you grasp the basics. I don't know how flexible or effective the VisionSDK is, though. Both are valid solutions (DirectX and VisionSDK), the choice is up to the designer..
-Antti Keskinen
----------------------------------------------
"If we wrote a report stating we saw a jet fighter with a howitzer, who's going to believe us ?"
-- R.A.F. pilot quote on seeing a Me 262 armed with a 50mm Mauser cannon.
|
|
|
|
|
Thanks all,
One more thing, when i tried to execute a sample application ( with Direct X ) am getting the following error
especially with "strmif.h"
stating at
"typedef DWORD_PTR HSEMAPHORE; " as missing ;(semicolon)
also, unexpected end of file...
I have neither modified this file..nor did create this file..in VC 6 application.,
Can u guide me the root cause for this problem ? should i change/set any parameters for the same..??
Thanks in advance,
Pramod.
|
|
|
|
|
Hi all:
Recently I've been reading Charles Petzold's Programming Windows, but in the The GDI Mapping Mode chapter I encounter a few sentences for which I think they're contradict with each other. I'm sure It just because I'm just don't fully understand the priciple in it. But, for now it really confused me. So I hope if someone had readed this book or have a understanding about Mapping Mode can show me the way! The following is the excerpt for the book that confused me!
Charles Petzold said "If you change the viewport origin to (xViewOrg, yViewOrg), the logical point (0, 0) will be mapped to the device point (xViewOrg, yViewOrg). If you change the window origin to (xWinOrg, yWinOrg), the logical point (xWinOrg, yWinOrg) will be mapped to the device point (0, 0), which is the upper left corner. Regardless of any changes you make to the window and viewport origins, the device point (0, 0) is always the upper left corner of the client area."
given the code
<br />
SetViewportOrgEx (hdc, cxClient / 2, cyClient / 2, NULL) ;
SetWindowOrgEx (hdc, -cxClient / 2, -cyClient / 2, NULL) ;
and he says "This means that the logical point (-cxClient/2, -cyClient/2) is mapped to the device point (cxClient/2, cyClient/2)"
Here's the confusion comes. the first line of code mapped the logical point (0,0) to the device point (0,0) which lies in the center after the call SetViewportOrgEx(...), I have no problem with that, but according to "If you change the window origin to (xWinOrg, yWinOrg), the logical point (xWinOrg, yWinOrg) will be mapped to the device point (0, 0)" how's the (-cxClient / 2 ,-cyClient / 2) which is in the upper left corner mapped to the (cxClient/2, cyClient/2) which is in the lower right corner???? Since the device point (0,0) can't be changed, It always lies in the upper left corner??
note: the mapping mode is in the default!MM_TEXT
|
|
|
|
|
The mapping mode is a very funny thing in Windows. The thing which Peltzoid has forgotten to mention is that these two calls are mutually exclusive. You use the first or the second, but not both. Also, please forgive me if I am stating the obvious. I've used a very thick iron line in this bending process
Like Peltzoid says, the only thing you can do is determine how the logical points of the device context you draw to refer to the device points of the actual device. In short, how does (0,0) of the DC (which uses logical points) relate to the (0,0) of the actual device. The device point (0,0) is ALWAYS at the upper left hand corner of the device space. It does not change, ever.
For the example's sake, consider you have a window of measures 200 pixel width, 200 pixel heigth. SetViewportOrgEx allows, like stated, you to change the mapping of logical point (0,0) inside the device's space. If you command
SetViewportOrgEx(hdc, cxClient/2, cyClient/2, NULL);
the logical point (0,0) will refer to device point (100, 100) (cxClient = 200, cxClient/2 = 100) the exact center of the window. This call changed the mapping of logical point (0,0) to the device point(x,y) given as parameters. If you now called MoveTo(0,0) and LineTo(100, 0), the program would draw a horizontal line from the center of the window to the right hand edge.
In the other call, SetWindowOrgEx will allow you change the mapping of the logical point (x,y) inside the device's space. Following the same example, if you call
SetWindowOrgEx(hdc, -cxClient/2, -cyClient/2, NULL);
the logical point (-100,-100) (cxClient = 200, -cxClient = -200, -cxClient/2 = -100) will refer to device point (0,0). Doing simple math, where is logical point (0,0) now ? That's correct, in device point (100,100), which in our example is the centre of the window, again. This call changed the mapping of logical point (x,y), given as parameters to device point (0,0). If you used MoveTo(0,0) and LineTo(100, 0), you would again draw a line from the centre to the right hand edge.
The two calls were mutually exclusive: they did precisely the same thing. The changes done by the first one were overwritten with the second call.
Hope this helps you out
-Antti Keskinen
----------------------------------------------
"If we wrote a report stating we saw a jet fighter with a howitzer, who's going to believe us ?"
-- R.A.F. pilot quote on seeing a Me 262 armed with a 50mm Mauser cannon.
|
|
|
|
|
Hi,everyone
how to create a dialog which is not the main window, but its parent window and owner window are all NULL, such as the conversation window in MSN Messenger.
|
|
|
|
|
Make the parent window of each dialog as desktop window by calling GetDeskTopWindow()
-prakash
|
|
|
|
|
oh,it works!
Thanks very much.
|
|
|
|
|
in the "Handling Screen Savers" part of the platform SDK it says 2 functions "must be exported in the application's module-definition file." what is a definition file, and how do I make one for my project?
- thanks
|
|
|
|
|
|
.def is defintion file. Open a .def file ,you can define exported function in it.
|
|
|
|
|
hello
I need to make a program that is supposed to export data to a table like structure.I am coding in vc++ 6.0
Is there some way to dump all the data resulted from a program to a excel table or something
also, I have some experiences with list boxes in c, is there any way to make a list box have 2 collumns instead of just one or does this simply require 2 listboxes placed one next to another.
Is there another structrre besides the li9st box that I could use to display the resulting data in a table like form.
Any other suggestions about how a program like this might best be designed are also wellcomed. thank you
pLesae reply.
|
|
|
|
|
Spiritofamerica wrote:
Is there some way to dump all the data resulted from a program to a excel table or something
The easiest way is to write your data to a *.csv (comma seperated values) file. *.csv files are simple text files that are easy to create and are supported by most database and spread sheet programs out there.
Spiritofamerica wrote:
is there any way to make a list box have 2 collumns instead of just one
List boxes can be created with the LBS_MULTICOLUMN style, but I have never used a listbox that way. I use a ListView control instead when I want multiple columns.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
To use Excel function in VC++, you should first import Excel typelib From your office location and than use the code like:
CoInitialize(NULL); // Init COM
CLSIDFromProgID(L"Excel.Application",&clsid);
_Application ExcelApp; //Construct Excel object
if (FAILED(GetActiveObject(clsid, NULL, (IUnknown**)&pUnk)))
{
if (!ExcelApp.CreateDispatch("Excel.Application"))
{
AfxMessageBox("Failed to create Excel object!");
}
}
else
{
hr=pUnk->QueryInterface(IID_IDispatch, (void**)&pDispExcel);
ExcelApp.AttachDispatch(pDispExcel);
}
// and ...
See MSDN for detail reference.
Lisoft
|
|
|
|
|
If you use dialog display data , you can add List Control(not List Box) to the dialog.
|
|
|
|
|
Hi, Friend,
I have a edit control in a dialog. I initialize it to "Type Here". I also want to select "Type Here", and make it highlight.
I do this
//output text
m_ctlEdit->SetWindowText("Type Here");
//select all text
m_ctlEdit->SetSel(0,-1);
all works fine. but the "Type Here" won't highlight. I study CEdit, I could not find any method to highlight selected text.
Thank you
|
|
|
|
|
Is this[^] the effect you are after?
As for selecting the text, it works better if you place the SetSel(0, -1) code in the edit control's EN_SETFOCUS notification message handler.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
Howdy all,
First off this board is great, thanks for everyone who helped me earlier.
I'm explicitly loading a DLL and constructing an object of type CTestDLL. In this class's constructor is the following code:
CTestDLL::CTestDLL()
{
fstream outfile;
cerr << "constructed";
outfile.open("c:\test.log", ios::app);
if (!outfile)
{
cerr << "could not open file";
exit(1);
}
}
It always fails to open, but the constructor's definitely being called. In addition to failing to open, I always get "the instruction at 0x00000000 referenced memory at 0x00000000. The memory could not be read".
I've tried creating the file manually, then trying to open it, with no luck. I've tried casting the const char* to a (LPCTSTR), using a CString, making the whole class visible, or just the individual methods (constructor/destructor) visible, all with the same results and same error.
Any ideas? I've googled and found others with the same problem, but unfortunately no answers. If I take the fstream code out the object contructs fine, but the fstream seems to muck things up.
|
|
|
|
|