|
It's ugly... check out the C# forum
led mike
|
|
|
|
|
to avoid using up all your GDI memory, you should be able to convert each frame to a DIB fairly quickly (use GetDIBits), then delete the HBITMAP. the DIBs will live in non-GDI memory, so you won't hit the out of memory limit (well, maybe eventually, but it should be a lot larger than 145 frames).
|
|
|
|
|
I wanted to display a sequence of numbers in an Edit box just like a timer or a stop watch.Below is my code
void CEditDlg::OnButtonOK()
{ UpdateData();
for(double i=0;i<=25;i++){
m_d1=i; //m_d1 is the name of the variable of edit box
UpdateData(false);
Sleep(10);
}
}
the above code gives me an output of 25 whereas i want a sequence of numbers to be displayed b/w 0-25.how do i go abt it???
Sam
|
|
|
|
|
You can use GetDlgItem(IDC_OF_TEXTBOX)->SetWindowText(m_putStringHere); instead...
-Houari
|
|
|
|
|
SamPrem wrote: Sleep(10);
You have ket delay of 10 ms. Thats the reson, you are able to recognize last character displayed. Your code is setting text 0-25 to edit box. But, you are not able to see i, because it happens in very short time. May be, you can try setting dealy of 2 sec(2000ms).
|
|
|
|
|
SamPrem wrote: how do i go abt it???
No need to call UpdateData() .
Change your for loop variable to an int , as a double makes no sense for what you are doing.
Change m_d1 from a CString to CEdit instead.
Update the edit control with m_d1.ReplaceSel() instead.
Using a different 'sleep' value is irrelevant.
SamPrem wrote: the above code gives me an output of 25
Of course it does, since you are overwriting the contents of the edit control each time through the for loop.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
In your for loop, you use the UpdataData (and that's OK), then sleep, but stay in the loop.
The UpdateData actually updates the data, and posts a message for the window to update, however, the message can't be processed until you leave this loop - that's why you only see the last number.
You can modify your code as follows to see each value. (and as noted, your loop control variable should be an int instead of a double).
void CEditDlg::OnButtonOK()
{ UpdateData();
for(int i=0;i<=25;i++){
m_d1=i;
UpdateData(false);
GetDlgItem(IDC_YOUR_EDIT_BOX_ID)->UpdateWindow();
Sleep(10);
}
}
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
|
IMediaSeeking is a COM interface. You can query the filter graph manager to obtain a pointer
to the interface (saves you the trouble of finding a certain pin to get the interface on!):
IMediaSeeking *pSeeking = 0;
hr = pGraphMgr->QueryInterface(IID_IMediaSeeking, reinterpret_cast<void**>(&pSeeking));
Note that not all filters support seeking. See Seeking the Filter Graph[^]
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
Actually I found out that I can not use seeking for the AVC decoder (by using GetCapabilities). So, I think maybe it is possible to use seeking directly to the demux filter. Is it possible?
-Houari
|
|
|
|
|
houari_id wrote: I think maybe it is possible to use seeking directly to the demux filter. Is it possible?
Have you tried to obtain the IMediaSeeking interface from the filter?
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
Hi
Could any one please tell what api I should call to display chm help files ?
Regards
The Best Religion is Science.
Once you understand it, you will know God.
|
|
|
|
|
Zainu wrote: Could any one please tell what api I should call to display chm help files ?
Have you tried ShellExecute() ?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
Hi All,
Is there any way to generate DTD of XML file using VC++?
Any APIs?
Thanks.
--------------------------------------
Sorry, if u have read weird question..
|
|
|
|
|
|
|
|
I would be inclined to use:
void CMyClass::OnUnload()
{
CInternetSession m_Inet;
CFtpConnection* pConnection = NULL;
try
{
pConnection = m_Inet.GetFtpConnection(sServer, m_sUsername, m_sPassword));
...
}
catch (CInternetException e)
{
TCHAR szCause[255];
e.GetErrorMessage(szCause, sizeof(szCause));
AfxMessageBox(szCause, MB_ICONERROR);
}
if (pConnection != NULL)
pConnection->Close();
delete pConnection;
}
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
(Thanks for your answer.)
"CInternetSession m_Inet;" is declared as a class member but not initialized.
The "AfxMessageBox()" declared in the "catch" statement is not displayed.
The "GetFtpConnection()" function displays the following error messsage:
"220 NET+OS 6.3 FTP server ready"
"530 Not logged in"
and then it makes my function exit.
When I set some breakpoints with VS6, the debugger does not stop on them.
The end of my function is never reached!
Any more ideas, please?
Pascal
Thanks and regards
Pascal
|
|
|
|
|
Pascal Pinchauret-Lamothe wrote: "CInternetSession m_Inet;" is declared as a class member
Which would seem problematic since you also have one declared in the OnUnload() method.
Pascal Pinchauret-Lamothe wrote: The "GetFtpConnection()" function displays the following error messsage:
Where? In a window, or at a command prompt?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
i have to create windows explorer style mfc application. like file right click and windows right click how to do this. i am having a listcontrol to display files.
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
Do you want to show popup menu on the listctrl
|
|
|
|
|
Your answer was provided (twice) here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|