|
Im try to make a simple application with window, when i
do this , the first time, it works very well, but when i save the c++ file, the compiler save like a space work or like a projec. when i try to use the program in another day,don´t work !!! : and have the next message:
(the programm have #include stdafx.h, don´t have precompiler headers activated, and don´t have erros (is very short the code !!! (the firs time, always work))
and have the next message:
DEBUG WIN32
COMPILING
stdafx.cpp
C:\Program files .....\include\winnt.h(1092) error C2146: Syntax error: missing ';' before identifier 'KSPIN_LOCK'
C:\Program files .....\include\winnt.h(1092) fatal error C1004: unexpected end of file found
im working with WinMe
so... help me !!!
|
|
|
|
|
Assuming you have not touched the stdafx.cpp file, what does the stdafx.h file look like?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hi all,
I have created a character buffer (char buff[]) which contains the data of a word document (the document contains text and images).
i would like to pass this data onto a printer. I have managed to get the handle of the printer using GetPrinterDC. but what i can't figure out is how am i going to pass my buffer data to this DC?
If given the handle of a window, we can find its DC and then pass that data to the printer DC using BitBlt, but in my case i don't have a handle, but only an array of characters which represent some image.
Can somone suggest a method?
|
|
|
|
|
I have Resource Id in string format.
ex ("IDC_EDIT").
How can i convert it into ID format to get the handle of the Edit box
using GetDlgItem.
if anybody come across the problem .pls let me know the solution.
Advance thanks,
Chezhian
|
|
|
|
|
|
hi,
But i have the Id in string format "IDC_EDIT" instead IDC_EDIT
|
|
|
|
|
MAKEINTRESOURCE(x)
???
Currently I don't have VC++ in my PC, not quite sure...
----------------
CEdit* pEDIT = (CEdit*)GetDlgItem(MAKEINTRESOURCE("IDC_EDIT"));
Maxwell Chen
|
|
|
|
|
I tried but it gives error
|
|
|
|
|
rgchezhian wrote:
But i have the Id in string format "IDC_EDIT" instead IDC_EDIT
Why? You should have a line in the project's resource.h file similar to:
#define IDC_EDIT 123 You should then have something comparable to the following in the project's .rc file:
IDD_MY_DIALOG DIALOG DISCARDABLE 0, 0, 423, 127
BEGIN
EDITTEXT IDC_EDIT,38,83,40,14,ES_AUTOHSCROLL
END Then you can use Priyank's suggestion.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I've written a small app that opens a divx avi file and displays the frames. It uses AVIFile operations, AVIFileOpen, AVIStreamGetFrameOpen, etc. It worked ok when I had divx codec installed.
I unistalled the divx codec and installed ffdshow, but now I can't get any frames from the avi file. AVIStreamGetFrameOpen fails, which I think means it can't find the codec to uncompress the video.
I can open the avi in Windows Media Player ok, gSpot reports that it uses the ffdshow decoder, but I can't get my app to work.
Anyone know what's happening here?
|
|
|
|
|
Hello
Media Player is playing your file using DirectShow, but you are trying to play it using Vide for Windows. It's not the same. The list of supported codecs can differ for DX and VfW.
May be uninstalling ffdshow, you've uninstalled VfW version of the codes, or may be it was unregistered somewhere.
With best regards,
Andrew
|
|
|
|
|
I've managed to get the vfw codec enabled ( didn't realise there were Configuration options you could set ), I can get the first frame of the avi ( index 0 ), when I attempt to get the second frame ( index 1 ), my program gets an exception.
Any ideas what's going on now?
|
|
|
|
|
Hello, Thomas
To say the truth I don't know what is the problem now. May be there is something wrong with VfW. You know, it's very tricky. It's much better to use DX if it is possible. It's hard say what is the problem without the code.
By the way. I was using VfW too. You can look at my article at CodeProject "Motion Detection Algorithms". But it was written on C# and all VfW functions was interoped and then I've created two classes: AVIReader and AVIWriter. If you are familiar with C# you can try my library. If it will work with your file, I can send you the code of it in C#.
With best regards,
Andrew
|
|
|
|
|
I am starting to learn c++, and have managed to get hold of a copy of Visual stutio 6. I looked into .net and found that if somebody does not have the .net environment, the apps will not work. Is an MFC app compiled with all the necessary classes to run under its own steam, or does it rely on other files? In other words, if I create an MFC app, will it run on a standard install of win 98,2000, xp. I know mfc adds a little overhead to the finnished app, but at this stage my apps will be tiny anyway.
Regards
Paul
|
|
|
|
|
Stirfie wrote:
...and have managed to get hold of a copy of Visual stutio 6.
How much is it being sold for these days?
Stirfie wrote:
In other words, if I create an MFC app, will it run on a standard install of win 98,2000, xp.
Most likely it will. The two main files that are required are mfc42.dll and msvcrt.dll, both of which are probably on the target machine.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
DavidCrow wrote:
How much is it being sold for these days?
Less than 2 US dollar at Nehru place, New delhi, India.....
http://www.priyank.in/
|
|
|
|
|
Priyank Bolia wrote:
Less than 2 US dollar at Nehru place, New delhi, India.....
Priacy , what about CD Borrowing from Friend
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
No, I borrow from my company, and about my friends, they borrow from others who ultimately get from the same source "The great Nehru Place". And by the way, if you have the original 800US$ edition of VS.NET, please lend me the CDs .;)
http://www.priyank.in/
|
|
|
|
|
Priyank Bolia wrote:
if you have the original 800US$ edition of VS.NET, please lend me the CDs
If I do that, My Company certainly going to ............ me
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Stirfie wrote:
if somebody does not have the .net environment, the apps will not work
The .net runtime is redistributable free of charge with your app. other main interest is that large part of .net is open standard and supported on other platforms also. And .net runtime will comes with the OS, now-a-days or in near future......I guess so.
http://www.priyank.in/
|
|
|
|
|
.NET will probably NEVER come with Windows 98...
|
|
|
|
|
Blake Miller wrote:
.NET will probably NEVER come with Windows 98...
Ya, I also think so, but the point is WIN98 is 7 years old OS, and technology changes every day. I am talking about future releases of MS OS.
http://www.priyank.in/
|
|
|
|
|
Stirfie wrote:
if I create an MFC app, will it run on a standard install of win 98,2000, xp.
My apps are tested on Windows NT 4.0 to Windows Server 2003, provided I distribute mfc*.dll and msvcrt.dll with the app, as Mr. David says. Or you link MFC as static library in the project options.
http://www.priyank.in/
|
|
|
|
|
Is intellisense helpful for u?
What's the good one you think?
|
|
|
|
|