|
tom groezer wrote: it being a pointer to CWnd and point to CFrameWnd.
Even though the m_pMainWnd points to a CFrameWnd object, the CFrameWnd dont have a Create function with the same signature of CWnd::Create(). So no scope for virtual function call also
nave
|
|
|
|
|
I want to use CImage, which needs atlimage.h, but the problem is that I don't have this file on my computer (I use Visual Studio 6.0 on WinXP).
Do you know where can get the headers/libraries I need ?
|
|
|
|
|
I think you need at least Visual Studio Standard edition.
|
|
|
|
|
i am using visual studio 6.0
|
|
|
|
|
Why you didnt use of GDI+ ? anyway on the codeproject has an article I think its good for you its name is CXImage.
|
|
|
|
|
I agree with WhiteSky.
CImage uses GDI+ internally. You can use GDI+ directly. For CImage you'd need VS2003+ I believe.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I write a program to dectect a new arrival USB-FLASH DISK [U-DISK]! if this arrival U-DISK satify my condition ,I do nothing and let it work defaultly; otherwise, I call a function to disable this arrival U-DISK.
my solution is :
1. write a function to disable specified U-DISK;
2. write a function to judge wheather the arriaval U-DISK is I wantted;
3. realize WM_DEVICECHANGE event and in this event to call my function;
the functions above may work correctly; but when I add WM_DEVICECHANGE event, these function work unuseful.I just want to know:Can I disable a specified U-DISK in WM_DEVICECHANGE?
there cannot upload sample codes.if someone may solve this problem or have interest with it ,please contact me and I will give you my sample codes.
thanks a lot .
|
|
|
|
|
Hi.
I have created MDI derived from CFormview. When I File -> Open, a child window with this (first) view will open. This part is done. From there, user clicked on the modified menu say, View -> Graph. Then another child window will open with a different (second) view. This second view needs to be in CFormview as I will have control in it.
Any suggestion on how to implement this idea?
Thanks.
|
|
|
|
|
Do you want to make a CFormView ?
|
|
|
|
|
|
You can insert CFormview to your project after insert you have a dialog with it.Does it your answer or no?
|
|
|
|
|
|
Hey folks,
What's your favorite Math-Library (besides Math.h
I need a really good math-library which has FFT and SVD and a bunge of other stuff...
*I tried JAMA, which is not too bad, but has too few functions for me
*Matpack (surely a great Library but I only get errors when trying to compile)
(www.matpack.de - maybe someone can help me get this running)
*I even tried copying (well, more like typing from) "Numerical recipes in C" and even those ended in an endless loop when trying to do a svd.
any suggestions?
|
|
|
|
|
Have you tried the C libs from Matlab? A friend of mine is doing programming for matlab in C, so there should be something to include. But I can not tell you what, because I don't know it. I will ask him but, at least, you can try looking for it.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
I want to write a tool in VC++ that processes files and reports messages to the error and output windows within VS2005. I want to create my own tabs within the output window and make modifications to source files within the current project.
Could someone give me a pointer as to where to start reading up on the subject. Usual problem, I don't know what the subject name is so I can not find it in MSDN.
|
|
|
|
|
Anorexic Tribble wrote: I don't know what the subject name
Addin for Visual studio
nave
|
|
|
|
|
Is there an API for burning files to DVD in a similar way as IMAPI?
|
|
|
|
|
|
Hi all:
Visual Studio 2005 gave me an error warning: "Too many initializers" when I tried to compile my codes:
ifstream in(argv[1], ios_base::binary);
I really do not know why?
Can any one help?
Thank you
|
|
|
|
|
Do you have
#include <fstream>
using namespace std;
somewhere before that line of code?
If so, what is argv?
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi Mark:
Thank you. I forgot about #include<fstream>
Thank you again
|
|
|
|
|
Hi,
When I use
AVISaveOptions(*phFrameWnd, 0, 1, &m_pStream, m_aopts);
to bring up a dialog to choose Avi compressor options, got the following debug error:
First-chance exception in AviMaker.exe (DIVX.DLL): 0xC0000005: Access Violation
Do you know why? DivX codec 6.6 is installed.
|
|
|
|
|
If you continue after the first-chance exception does it run normally (meaning the exception was
caught and handled in the dll)??
If not...
What is m_aopts?
m_pStream points to a valid IAVIStream interface?
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Yes. The exception was possibly handled in the dll. I got the same violation in the AVIStreamSetFormat() but it returned AVIERR_OK. The real problem is the AVIStreamWrite(), which returned AVIERR_BADFORMAT.
The code is pasted. This problem happens for Divx 6.6.1 Codec. it works fine for others like Huffyuv. Any thought?
Thanks a lot,
--------Code sample--------
int CVideoWriter::SaveAviFrame(HWND *phFrameWnd, HBITMAP *phBitmap)
{
AVISTREAMINFO sAviStreamInfo;
HRESULT hResult;
DIBSECTION sDibSection;
int iSizeDIBSection;
AVICOMPRESSOPTIONS m_opts;
AVICOMPRESSOPTIONS *m_aopts[1];
iSizeDIBSection = GetObject((*phBitmap),sizeof(sDibSection),&sDibSection);
if (iSizeDIBSection != sizeof(DIBSECTION))
return OPERATION_ERROR;
if (m_pStream == NULL)
{
ZeroMemory(&sAviStreamInfo, sizeof(AVISTREAMINFO));
sAviStreamInfo.fccType = streamtypeVIDEO;
sAviStreamInfo.fccHandler = 0;
sAviStreamInfo.dwScale = m_dwPeriod;
sAviStreamInfo.dwRate = 1000;
sAviStreamInfo.dwQuality = -1;
sAviStreamInfo.dwSuggestedBufferSize = sDibSection.dsBmih.biSizeImage;
SetRect(&sAviStreamInfo.rcFrame, 0, 0, sDibSection.dsBmih.biWidth,
sDibSection.dsBmih.biHeight);
hResult = AVIFileCreateStream(m_pAviFile, &m_pStream, &sAviStreamInfo);
if (hResult != AVIERR_OK)
return OPERATION_ERROR;
}
if (!(*m_pbIsCompressionOptionDone))
{
ZeroMemory(&m_opts,sizeof(AVICOMPRESSOPTIONS));
m_aopts[0] = &m_opts;
BOOL bPressOk = (BOOL) AVISaveOptions(*phFrameWnd, 0, 1, &m_pStream,
(LPAVICOMPRESSOPTIONS *) m_aopts);
if (!bPressOk)
{
AVISaveOptionsFree(1,m_aopts);
(*m_pbIsCompressionOptionDone) = TRUE;
return OPERATION_CANCEL;
}
}
if (m_pCompressedStream == NULL)
{
m_opts.fccType = streamtypeVIDEO;
m_opts.dwFlags = AVICOMPRESSF_VALID;
hResult = AVIMakeCompressedStream(&m_pCompressedStream, m_pStream,
&m_opts, NULL);
if (hResult != AVIERR_OK)
return OPERATION_ERROR;
hResult = AVIStreamSetFormat(m_pCompressedStream, 0, &sDibSection.dsBmih,
sDibSection.dsBmih.biSize + sDibSection.dsBmih.biClrUsed*sizeof(RGBQUAD));
if (hResult != AVIERR_OK)
return OPERATION_ERROR;
}
if (!(*m_pbIsCompressionOptionDone))
{
AVISaveOptionsFree(1,m_aopts);
(*m_pbIsCompressionOptionDone) = TRUE;
}
hResult = AVIStreamWrite(m_pCompressedStream, m_iFrameNumber, 1,
sDibSection.dsBm.bmBits, sDibSection.dsBmih.biSizeImage, 0, NULL, NULL);
if (hResult != AVIERR_OK)
return OPERATION_ERROR;
return NO_ERROR;
}
|
|
|
|
|
I'm not seeing anything wrong in your code.
I am suspicious of this line before the AVIMakeCompressedStream() call:
m_opts.dwFlags = AVICOMPRESSF_VALID;
What is the value of m_opts.dwFlags BEFORE this line executes? It seems to me you may be erasing
important flags there.
Also, with the way you are getting a BITMAPINFOHADER, this call isn't necessarily good:
hResult = AVIStreamSetFormat(m_pCompressedStream, 0, &sDibSection.dsBmih,
sDibSection.dsBmih.biSize + sDibSection.dsBmih.biClrUsed*sizeof(RGBQUAD));
This should be
hResult = AVIStreamSetFormat(m_pCompressedStream, 0, &sDibSection.dsBmih, sizeof(BITMAPINFOHEADER));
since there won't be any color table in a DIBSECTION structure unless
sDibSection.dsBmih.biCompression is BI_BITFIELDS.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|