|
yeah...actually to represent it as in on X-Y plane if the inputs are the locations of a point...
|
|
|
|
|
For show value on the editbox you can use of SetWindowText .
|
|
|
|
|
713minchi wrote: I want to create a window...
If this window is to be created at runtime, use CreateWindow() .
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
Is that possible to use MCIWnd or any other Lib to play an avi file that is part of a bigger data file and the starting disk offset is known ?
For example I am trying to make this
copy /b text.txt+movie.avi final.dat /b
This creates a new binary file that is the joint of the files text.txt and movie.avi. I know that text.txt is 10 bytes long and in the 11th byte it starts the AVI movie. Is that possible to play it directly (without extracting it) within final.dat ?
Regards,
sdancer75
|
|
|
|
|
i think DirectShow can help you to do the same.
|
|
|
|
|
Hi,
I wanna make a serialization class in MFC, the class include CString,int,Images(GIF). I am wondering if MFC provides some kind of binary stream function for Images de-/serialization. For me, how to the serialize Images a headache problem. Could any one help me ...
Thanks ,
zran
zran
|
|
|
|
|
Will CArchive class helpful ?
Regards,
Paresh.
|
|
|
|
|
Thanks,
In my opinion CArchive only support TEXT Data like 'CString' 'char' 'int' etc. Images(GIF) is binary Data...
ps: I use vc++6
|
|
|
|
|
You can use CFile, but actually the CArchive can deal with what you need. At last... all data can be stored like BYTES, the content or the meaning of every byte depends on your serialize function and whatever order you use to write / read datas
You can send the value of a variable in int/double format, the content of a string, coordinates of CPoint about positions on the screen or about a graphic, (or about your question) values or RGB pixels with a fixed order (btw, a picture can be understood as a matrix of pixels with a value for the color in every position)
-- modified at 6:33 Tuesday 30th October, 2007
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?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
Nelek, Thanks for u advice.The key of the problem is how to deal with picture and binary stream. I used GDI+ Library and got the answer smoothly.
Part of code below:
///////////////begin/////////////////
if(ar.IsStoring()){
HGLOBAL m_hMem = GlobalAlloc(GMEM_MOVEABLE, 0);
IStream *pstm=NULL;
CreateStreamOnHGlobal(m_hMem, TRUE, &pstm);
CLSID clsid;
USES_CONVERSION;
GetCodecClsid(A2W("image/jpeg"), &clsid);
m_pImage->Save(pstm,&clsid,NULL);
if (pstm==NULL)
return;
LARGE_INTEGER liBeggining = { 0 };
pstm->Seek(liBeggining, STREAM_SEEK_SET, NULL);
DWORD wTemp=GlobalSize(m_hMem);
LPBYTE lpData = (LPBYTE)GlobalLock(m_hMem);
ar << wTemp;
ar.Write(lpData,wTemp);
pstm->Release();
GlobalUnlock(m_hMem);
}
else{
DWORD wTemp;
ar >> wTemp;
HGLOBAL m_hMem = GlobalAlloc(GMEM_FIXED, wTemp);
if (m_hMem == NULL)
return;
IStream *pstm=NULL;
CreateStreamOnHGlobal(m_hMem,FALSE,&pstm);
if (pstm==NULL)
return;
BYTE* pmem = (BYTE*)GlobalLock(m_hMem);
ar.Read(pmem,wTemp);
if (m_pImage) {
delete m_pImage;
m_pImage = NULL;
}
using namespace Gdiplus;
if (m_pImage!=NULL)
{
delete m_pImage;
m_pImage=NULL;
}
m_pImage = Image::FromStream(pstm, FALSE);
pstm->Release();
GlobalUnlock(m_hMem);
}
//////////////end//////////////////
In my application, i use a CWebBrowser control to display the content from a serialize file. There is a new question to me, how to load 'm_pImage'? Could you give me more suggestion, Thanks for anything...
|
|
|
|
|
Does LoadBitmap (...) dont work for you?
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?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Is there any way to create sample XML document dynamically using the xsd file?
Sumathi
|
|
|
|
|
Hi experts,
how to run a exe thorugh code.
|
|
|
|
|
You can use of ShellExecute or ShellExecuteEx or CreateProcess or WinExec .
|
|
|
|
|
I have a Reg.exe file in my projet folder .
Could you tell me what is wrong with it to run exe file.
CreateProcess(NULL , // No module name (use command line).
_T("Reg"), // Command line.
NULL, // Process handle not inheritable.
NULL, // Thread handle not inheritable.
FALSE, // Set handle inheritance to FALSE.
0, // No creation flags.
NULL, // Use parent's environment block.
NULL, // Use parent's starting directory.
NULL, // Pointer to STARTUPINFO structure.
NULL );
|
|
|
|
|
Try with this code
PROCESS_INFORMATION l_ProcessInfo;
STARTUPINFO l_StartupInfo;
ZeroMemory(&l_StartupInfo, sizeof(STARTUPINFO));
l_StartupInfo.cb = sizeof(STARTUPINFO);
l_StartupInfo.dwFlags = STARTF_USESHOWWINDOW;
l_StartupInfo.wShowWindow = SW_SHOWMAXIMIZED;
CreateProcess(NULL,
_T("e:\\123.exe"),
NULL,
NULL,
FALSE,
DETACHED_PROCESS,
NULL,
NULL,
&l_StartupInfo,
&l_ProcessInfo);
|
|
|
|
|
this code giving exception.
|
|
|
|
|
I dont have any compiler to test this code.
|
|
|
|
|
exception from getlasterror is:
"The requested lookup key was not found ini active activation context"
|
|
|
|
|
|
pther wrote: how to run a exe thorugh code.
By reading here.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
I have 2 Edit controls on a page which uses a same class/implementaion. If any value is changed in any one these Edit boxes, a Button gets enabled.
Now the problem is if i double click on the text to select the whole text and then press delete for the first control, the button is enabled. But for the second case, it is not enabled sometimes.
I defined a method OnChangedCtrlData() which handles this event. If the operation is performed for first control, this method is called but when it is done dor second time, the method is not called. This happens sometimes(not all the times)
Please help me in solving this issue.
|
|
|
|
|
can you post a sample code here?
|
|
|
|
|
Actually, i'm using Client specific SDK in which they defined their custom classes to implement the functionality.
So, even though i post a sample code u cant understand. If you please reply keeping in view MFC, i can corelate.
Thanks
|
|
|
|
|
Which notification message are you using?
- NS -
|
|
|
|