|
Use PostQuitMessage(0); in case view initializatin is failed.
i.e
int CMyView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CView::OnCreate(lpCreateStruct) == -1)
return -1;
if (bFailed)
{
PostQuitMessage(0);
}
return 0;
}
|
|
|
|
|
Great thanks - that does the trick.
Tony
|
|
|
|
|
Hi all:
I've implemented the MSI package rendering through progress bar using MsiSetExternalUI. But it seems the installation process was divided into several rounds, this way the progress will reset several times, I was wondering is it possible to render it as a single coherent progress?
From 0 - 100%
Thanks
|
|
|
|
|
hi,
The error message that I got in my project is "fatal error C1083: Cannot open include file: 'stdafx.h': No such file or directory". But this stdafx.h file is included in the project.What can cause to occur of this error.
thanks
|
|
|
|
|
Try Rebuilding All the project.
Please refer this[^]
Regards,
Paresh.
|
|
|
|
|
Still I cannot solve the problem.Is there any other solutıon.
|
|
|
|
|
Check if directory containing stdafx.h is mentioned in tools-->options-->Additional include directories , if its not present in same direcotry as project file.
|
|
|
|
|
I have this code that does a linear search within two files, but it is too slow......
<br />
<br />
for(unsigned i=0;i<Standard.size();i++) <br />
{<br />
for(unsigned j=0;j<MyWords.size();j++) <br />
{<br />
string::size_type FoundAt=MyWords[i].find(Standard[j]);<br />
while( string::npos != FoundAt )<br />
{<br />
MyWords[i].replace( FoundAt, Standard[j].length(),Standard[j]+"/");<br />
FoundAt = MyWords[i].find( Standard[j], FoundAt + Standard[j].length() );<br />
}<br />
}<br />
}<br />
<br />
for(unsigned j=0;j<MyWords.size();j++) <br />
{<br />
WriteWord<<MyWords[j]<<endl;
}<br />
WriteWord.flush();
WriteWord.close(); */
return 0;<br />
}<br />
I want to change it into [I]binarysearch so it will perform faster, but the problem is I don't know how can I do that, I mean, if I change it to binarysearch the structure itself will have to be changed. I have the following questions that I can't solve so the binarysearch can be done:
1. Cut the sentences into words.
2. Compare first word of the sentences and see if matches, if match take second and so on till a phrase in my standard file is formed. Otherwise, discard word.
e.g. Lets say I have a sentences "This world is full of beauty!" and I have in my sorted array the phrase "full of beauty", I would like to take each word of the sentence to and compare it with my array like the following:
1. Take the word "This", since it doesn't match delete it
2. Take the word "world", since it doesn't match delete it.
3. and so on until "full", since "full" is part of my phrase "full of beauty" conserve it and take the next and compare it, and so on till I get the full phrase "full of beauty" then return that the phrase was found.
Hope someone can give me some hint, I really need to get this thing to work, and want to get it work myself but I really can't do. Thanks in advance to all.
Regards
Jing
|
|
|
|
|
Did you look at your posted code after you posted it. You need to read the CodeProject instructions for posting code.
stealwings wrote: I want to change it into [I]binarysearch
stealwings wrote: 2. Compare first word of the sentences and see if matches, if match take second and so on till a phrase in my standard file is formed. Otherwise, discard word.
Binary search is for "sorted" data. Sentences are generally not sorted.
led mike
|
|
|
|
|
Yes I know that BinarySearch is for sorted arrays,my array is sorted but is in a file. I have I sort array of phrases which I named as standard, it contains 400 phrases sorted in alphabetical order. Then I have another file that contains lets say 1000 sentences, I want to cut this sentences into words, then do the comparison.
e.g. in the sentences I there is the word "excellent" , I want to take that word, and look if there is any phrase in my array that begins with that word, if true take the next word, if false discard the word and take next one.
Lets say I have in my array "excellent job" and "excellent work" so I will have to check the next word to make sure which is the match. And if the word that follows "excellent" is not neither discard, if is any of both return true.
Now, I know that I should chop the sentences into words, compare and concatenate the words that match to form my phrase and then return a value. Then, how shall I chop the sentences into words and then concatenate them again to form a phrase?
|
|
|
|
|
stealwings wrote: Then, how shall I chop the sentences into words and then concatenate them again to form a phrase?
Yeah I don't know, your subject says "LinearSearch to BinarySearch". The question you just asked does not seem to have any connection to your subject.
led mike
|
|
|
|
|
Hi all,
I have a series of images.the images can be jpeg, bmp or any other. i have to create MPEG-1 file from this series of image. please tell me any algoritham or any other way to do this in VC++ and MFC.
Regards
Yudhisthira Attry
|
|
|
|
|
Decoding JPEG and encoding MPEG-1 is a long topic.
There's plenty of ways built-in to Windows to decode JPEG but for encoding MPEG there's none
because of licensing.
Maybe search Google for open-source/free MPEG-1 encoders - or maybe you can write your own
Mark
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
Hi all,
How can i send a Message from One Class to Another Class using
::SendMessage(...) Api.
I want to Send a Message.
(i.e)
In one.cpp file i want to Send a Message that message must Call Function in the Second.cpp file.
how can i pass a String Value to the Second File(second.cpp) from First File(one.cpp).
Please help me out.
Uday kiran
|
|
|
|
|
uday kiran janaswamy wrote: How can i send a Message from One Class to Another Class using
Send message is not used to send messages between classes but to send a message to a specific window. If your class is not managing a window, then you cannot send a message to it.
|
|
|
|
|
hi Cedric,
Please let me know how to send a message from One Window to Another Window.
Uday kiran
|
|
|
|
|
I think this[^] is what you are looking for.
|
|
|
|
|
uday kiran janaswamy wrote:
Please let me know how to send a message from One Window to Another Window.
IMHO please use WM_COPYDATA to String and othe complex data between two window .. example[^]
|
|
|
|
|
uday kiran janaswamy wrote: Please let me know how to send a message from One Window to Another Window.
Use SendMessage() or PostMessage() .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Dear David,
Thank you very much.
Uday kiran
|
|
|
|
|
Hi,
I'm creating an ActiveX control which will function like a combobox but instead dropdown a treeview (ie. CComboTree:COleControl). For stage one, i will only suppport the Dropdown style. I like to know how i can work out and set the maximum height of the combobox (ie. the editbox and button) to the current font height in the PreCreateWindow() function, just like a standard windows combobox does.
Thanks,
Lee
|
|
|
|
|
Hello Geeks,
We have AdRotator Control that can be used on Web Forms to display an Advertisement (Ad).
Is there any other similar control that can help me to display Advertisement on Windows form or Dialog box.
What I am trying to accomplish is something like this....
I want to get some info about an Ad from Server and store that info on my PC and then display that info in the form of Ad on dialog box. Also the Ad should rotate.
Can AdRotator Control which is used on Web Form can be used on Dialog box.
Or is there any other similar control that can display information which will keep rotating.
Thanks in advance.
|
|
|
|
|
Hi all..
Well, as in the subject: how can I control the frame rate of a video in DirectShow?
I am using DirectShow to play a video and blend a rectangle that moves along the video, which positions are stored in an array. I use SetTimer() to change the rectangle's position, but it seems that the timepoint in the timer doesn't match the frame rate of the video. So I'm thinking of controlling the frame rate of the video instead..
Thank you in advance...
-- modified at 7:20 Wednesday 21st March, 2007
-Houari
|
|
|
|
|
Hi,
I think you can use the FrameRate attribute to get the frame rate.
Siddharth
|
|
|
|
|
Hi
I know that function too... but it seems that it is not that easy to change the frame rate.
Perhaps I should change the question: how to control the frame rate using DirectShow?
thank you
-Houari
|
|
|
|