|
I am not sure about that.... The filter resides is a local folder and not in windows subfolder and is a "debug build". I will try to move the filter inside the C:\windows\SysWOW64 and register again.
sdancer75
|
|
|
|
|
|
Finally Solved ! A tiny error at the CLSID declaration !
sdancer75
|
|
|
|
|
Can you please tell me what is the small fix from CLSID declaration?Even i am suffering with this class not registered problem
|
|
|
|
|
Not fix at all, just a typing error in my CLID declaration. What error do you get ?
sdancer75
|
|
|
|
|
Hello there,
If i call DeleteFile on a file that's pretty large, does the function wait until the entire file is deleted before returning?
Or does it return immediately? i.e., the control is passed to OS to complete the task of deletion and then return immediately?
For e.g., if i am deleteing 5 files inside a loop and 2 of them happen to be larger size, will it wait until each file is completely deleted before going to the next one?
If it doesn't, then there's a probability that when the next file is called by DeleteFile the previous one might still be in the process of deletion and it could fail.
Is there a possibility like that?
|
|
|
|
|
From the documentation I'm guessing that it will not return immediately, accurate return codes require the operation to complete. Yikes! Note to self...read the whole thing first! sorry.
modified 3-Jul-13 14:27pm.
|
|
|
|
|
As far as I know, the function returns immediately and the deletion occurs in the background. This is always true if the file is still opened (see DeleteFile[^] in the MSDN):
Quote: The DeleteFile function marks a file for deletion on close. Therefore, the file deletion does not occur until the last handle to the file is closed. Overall, there should be no significant difference in time for large and small files because the file data itself are left unchanged on the disk. Only the directory entries are touched.
|
|
|
|
|
Hello!!! I'm learning C language and trying to make a calculator. Here's the code:
#include <stdio.h>
int main()
{
int a, b, add, sub, mul;
float div;
char choice='y';
do {
printf("Enter any choice:\n1. Addition(a)\n2. Subtraction(b)\n3. Multiplication(c)\n4. Division(d)\n5. Exit(x)");
scanf("%c", &choice);
switch(choice)
{
case 'a':
{printf("Enter any two numbers:");
scanf("%d %d",&a, &b);
add = a + b;
printf("Sum: %d\n", add);
break;}
case 'b':
printf("Enter any two numbers:");
scanf("%d %d",&a, &b);
sub = a - b;
printf("Difference: %d\n", sub);
break;
case 'c':
printf("Enter any two numbers:");
scanf("%d %d",&a, &b);
mul = a * b;
printf("Product: %d\n", mul);
break;
case 'd':
printf("Enter any two numbers:");
scanf("%d %d",&a, &b);
div = a / b;
printf("Quotient: %f\n", div);
break;
case 'x':
break;
}
}while(choice!='x');
return 0;
}
The problem is that it is not looking very good. I'll be very thankful if anyone could help.
|
|
|
|
|
anasshad wrote: I'll be very thankful if anyone could help. I would suggest spending some time looking through the beginners section articles[^] for ideas and examples.
Use the best guess
|
|
|
|
|
Does it compile ?
Does it crash ?
Does it give wrong answer ?
Are you able to read numbers from the user ? (outside of this example?)
Have you tried debugging ?
Nihil obstat
|
|
|
|
|
For a calculator the probable way to have it look would be like the keypad on a calculator, but as you're just starting that's a bit of a jump. As a first step why not try a Window or Dialog with two Edit boxes for the numbers and buttons to select +, - etc. The articles here will help with that as already mentioned.
|
|
|
|
|
anasshad wrote: The problem is that it is not looking very good. Meaning what exactly?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Hi,
I have a slider control on a dialog box. I am playing a video file and slider moves according to the video elapsed. Suppose I have set the slider range to 100. Now till some point say 90, the slider moves to the point wherever I click the mouse. but at the last point in between some range say 90 - 100 (to the end of the slider), if I click the mouse button anywhere, slider jumps to the end.
I am using a TimeLine control where user can add more than 1 video (1, 2, 4, 8, 10 , 50 etc......), If I use only one video, slider moves as per the video progression.....Issue arises when I add more than 1 video and click on the start button, slider starts moving....Now when I drag the slider to any position or I click the mouse button anywhere on the slider control, slider thumb moves to that position and immediately jumps back to some other position. This is the Issue, I am facing.
Can anybody share some sample code where slider is moving with the video showing the progress of the video.
I want to implement a functionality similar to VLC player. Wherever user clicks the mouse, slider moves to that point.
Any help will be appreciated.
Regards,
Mbatra
modified 3-Jul-13 9:15am.
|
|
|
|
|
Derive you own class from CSliderCtrl and handle the left button down
(I have no merit, this is from a simple google search)
void MySlider::OnLButtonDown(UINT nFlags, CPoint point)
{
CSliderCtrl::OnLButtonDown(nFlags, point);
CRect rectClient, rectChannel;
GetClientRect(rectClient);
GetChannelRect(rectChannel);
int nPos = (GetRangeMax() - GetRangeMin())*(point.x - rectClient.left - rectChannel.left) / (rectChannel.right - rectChannel.left);
SetPos(nPos);
}
Nihil obstat
|
|
|
|
|
I have done this...its working ....
Please read below:
Hi,
I have a slider control on a dialog box. I am playing a video file and slider moves according to the video elapsed. Suppose I have set the slider range to 100. Now till some point say 90, the slider moves to the point wherever I click the mouse. but at the last point in between some range say 90 - 100 (to the end of the slider), if I click the mouse button anywhere, slider jumps to the end.
I am using a TimeLine control where user can add more than 1 video (1, 2, 4, 8, 10 , 50 etc......), If I use only one video, slider moves as per the video progression.....Issue arises when I add more than 1 video and click on the start button, slider starts moving....Now when I drag the slider to any position or I click the mouse button anywhere on the slider control, slider thumb moves to that position and immediately jumps back to some other position. This is the Issue, I am facing.
Can anybody share some sample code where slider is moving with the video showing the progress of the video.
I want to implement a functionality similar to VLC player. Wherever user clicks the mouse, slider moves to that point.
Any help will be appreciated.
Regards,
Mbatra
|
|
|
|
|
I want to customize the header of a listview, so in NM_CUSTOMDARW i have
Test = (LPNMLVCCUSTOMDARW)Lp <<lparam
(Test->nmcd.hdc) which for the listview without the header, i tried using
Test = (LPNMCUSTOMDARW)Lp <<lparam
and then
Test->hdr.hwndFrom
so
if(Test->hdr.hwndFrom == listview_getheader(LIST))
but it does not work, the listview_getheader(LIST) gives the right hwnd, but how about Test->hdr.hwndFrom, it seems i missed something...
|
|
|
|
|
JoneLe86 wrote:
Test = (LPNMCUSTOMDARW)Lp <<lparam What is Test and what is its value, and that of lp , after this statement?
Use the best guess
|
|
|
|
|
LPNMCUSTOMDARW Test = (LPNMCUSTOMDARW)lp
I was in the wrong way, Jochen Arndt explained that I should subclass the header first...
Thanks
|
|
|
|
|
|
hmm I wonder why Everything need to be subclassed, thanks for this information it did help....
|
|
|
|
|
The AviSplitter Filter's input pin, according to the MSDN is accepting the following mediatype
MEDIATYPE_Stream, <br />
MEDIASUBTYPE_Avi
While my own async filter is trying to connect with this filter in the method (located in amfilter.cpp file)
HRESULT CBasePin::TryMediaTypes(IPin *pReceivePin, __in_opt const CMediaType *pmt, IEnumMediaTypes *pEnum)
at the following statement that it supposed to receive the AVISplitter input pin, mediatype,
hr = pEnum->Next(1, (AM_MEDIA_TYPE**)&pMediaType,&ulMediaCount);
it retuns FALSE.
Why is that happens ?
sdancer75
|
|
|
|
|
|
Thanks,
It seems that AVISplitter does not suggest any mediatype but my mediatype fails at
hr = pReceivePin->ReceiveConnection((IPin *)this, pmt);
with error code 0x8004022f
Do you have any idea ?
Regards,
sdancer75
|
|
|
|
|
And what does that error code tell you?
Use the best guess
|
|
|
|