|
Thank You Roger Allen for the prompt reply. I have implemented it and is working well. But how do i get the selection rectangle remain there after i release the mouse button.
|
|
|
|
|
Rather than using CRectTracker, just use the function DrawFocusRect. It does not go away until either the area is repainted, or you call DrawFocusRect again to erase the rectangle.
onwards and upwards...
|
|
|
|
|
Hi everybody !
Can you tell me where I find resources(article,forum,sample,etc)about translation the application text to a different language ?
Thanks.
|
|
|
|
|
Hi all,
I'm trying to develop an application, that will get an avi file and preview the video, and, whenever needed, will write a part of video into one file (copy a clip from time x to y) and write corresponding audio data to separate file. Is there any other way to do this, than just building a preview graph and, whenever it's needed, adding (or maybe just linking/unlinking pins) some kind of splitter and two file writers? So I will be able to seek the stream? What filters I should use? I'd be very grateful for any tips..
|
|
|
|
|
I am using vfw and trying to allow the user to select the codec they want to use. After investigation I have found that some of the codecs on my machine are not valid for frame by frame rendering from a bitmap, ie MS H.263/261 ( appear to be for streaming compression ).
If I use AVISaveOptions, this lists all CODECS, but fails on AVIStreamSetFormat for some codecs as above.
If I use ICCompressorChoose, which takes a BITMAPINFOHEADER pointer and list those codecs that are valid for that type, I get a list of CODECS that work but this does not give me back enough info to setup the AVICOMPRESSOPTIONS for some of the codecs, I think this is to do with the lpFormat and lpParms parts.
How can I combine the limited list given by ICCompressorChoose and the AVICOMPRESSOPTIONS stuct populated by AVISaveOptions?
|
|
|
|
|
hiho@ll
1. i'm using a CStatic to move text left to right bounds of the static control
2. i can set the speed of the text movement through a float variable called n (move text n pixels)
my problem:
i'm using bitblt to copy the text (the whole area) to the screen
if the mouse cursor is above the static control i slow down text movement
if the movement is fast it dosen't flicker
but if the text movement is slow only the text begins to flicker!?
slow text movement is like, moving the text very few pixels in a direction during a bigger time interval (i mean like move it 0.3 pixels every 30 milliseconds)
i also looked at the article of Keith Rule lnk[^]
and maybe it's a problem with my eyes, but in Keith Rule's example the pixels flicker sometimes a little bit?
i think that's why my text flickers if it's too slow
what's interesting too, is that my background of the text which is a image doesn't flicker
i think because it's always the same, and the text changes it's position
anoyone knows a workaround?
hmm *thinking*
is there a way, to only draw the text, without overdraw it with the background to erase it?
i do:
1. draw background
2. draw text
3. bitblt
but programming a method which only erases the text will be too slow!?
thx@ll
|
|
|
|
|
I am using two dialogs derived from CFormView. These two
dialogs are mutually exclusive and I am unable to toggle between these two
dialogs at runtime. It would be nice if some one could tell me how to do it using menu options which can be checked or unchecked.
drai
|
|
|
|
|
|
I did try that out but I am unable to get anywhere near as
presently there are three views in my splitter window and one of the view
needs to switched with the fourth view.
Please help me out with the splitter window.
drai
|
|
|
|
|
Somebody know how can i send to other computer the user windows id because i don't know where is this information.
TACK.
|
|
|
|
|
Is GetUserName() what you are after?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi, I am new in c++ and i have done a program where i can show the files and directories of C:, for example and i have used FindFirstFile, FindNextFile and FindClose but now i don't want only show the files, i want keep these files in a package and send to other computer, but i only want to know how can i keep these files, no the communication.
Thank you very much. TACK
/Densitet
|
|
|
|
|
Add the filenames to a data structure of some sort, like a list or an array. Both of these are in the STL as well as MFC.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
This program show the files in Dos, but if i want that it shows the files in a List in a graphc interface, how can i do it, because i have create my interface but i can't wirte the files in the list.
Tack.
|
|
|
|
|
How the filenames are gathered is independent of whether you use a console or a GUI application. In either case, the FindFirstFile() /FindFirstFile() pair is used, or the CFileFind class if you are using MFC.
What type of control are you adding the filenames to (e.g., edit control, listbox, combobox, list control)? Each has its own method of "addition."
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Ok, i have to use CFileFind because i'm using MFC. I want to add the filenames in a listbox, you know what is the method?
Thanks.
|
|
|
|
|
See here.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
hai anybdy can help me.i have some keys that generated and stored in to text file. That key contain name and two dates like start date and end date.so now i want to compare the key with the given or enterd name is present in that txt file and if present compare the currentdate with dates given in the key.and give boolen like the current date exceed the end date or not? and start date less than the current date. can any body help me?
regards
shaanu
|
|
|
|
|
|
my date format is DD/MM/yyyy.can u help me?
shan
|
|
|
|
|
here is small code that compare current date with your stored date.
My date Format is YYYY-MM-DD , i Believe,you are smart Enough to modify the code according to your need.
BOOL <You Class>::FnCheckForValidDates(CString szEndDate)
{
<font color=#008000>
CTime TodayDate=CTime::GetCurrentTime();
int nYear,nMonth,nDay;
<font color=#008000>
<font color=#008000> nYear=_ttoi(szEndDate.Left(szEndDate.Find('-')));
<font color=#008000> szEndDate.Replace(szEndDate.Left(szEndDate.Find('-')),"");
<font color=#008000> szEndDate.TrimLeft('-');
<font color=#008000> nMonth=_ttoi(szEndDate.Left(szEndDate.Find('-')));
<font color=#008000> szEndDate.Replace(szEndDate.Left(szEndDate.Find('-')),"");
<font color=#008000> szEndDate.TrimLeft('-');
<font color=#008000> nDay=_ttoi(szEndDate);
<font color=#008000> <font color=#008000>
if(TodayDate.GetYear()>nYear)
return FALSE;
if(TodayDate.GetMonth()>nMonth)
return FALSE;
if(TodayDate.GetDay()>nDay)
return FALSE;
#ifdef MYDEBUG
AfxMessageBox("Returning True");
#endif
return TRUE;
}
[Vote One Here, Complete my Survey....]
Alok Gupta visit me at http://www.thisisalok.tk
"I Think Believe this Will Help"
|
|
|
|
|
Hi!
How is it possible to limit my edit control (MFC) to only accept two digits. Now it is possible to type in how many as you want. To get it to accept only numbers were no problems, is there any properties that I can set to get it to only accept two digits as well?
|
|
|
|
|
No, you will need to subclass your edit control.
It is not really complicated: with class wizard create a new MFC class and make it inherits from CEdit. Then override the OnChar() member function (response to the WM_CHAR event). In this function, if you don't want to add a new char in the edit control, don't call OnChar from the CEdit class. If the character can be displayed, then call CEdit::OnChar().
Hope this help
|
|
|
|
|
CEdit::SetLimitText
Cheers
Steen.
"To claim that computer games influence children is ridiculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
Hi there,
I fill a ListBox (AddString(str)) from a loop.
When ListBox become full the vertical scrollbar will be appeared.
But I want to do somthing to move the scroll to down in order to the last item become appeared always.
How can I do this?
This functionality is very simple when we use CListControl, because there is a method called Scroll(...) in CListControl class for this reason.
Thanks.
|
|
|
|