|
What does it have to do with finding the character width? Can't you just call GetCursorPos()[^]?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
no because i need to find th x and y where the mouse clicked in order to mark the text to copy it.
|
|
|
|
|
susanne1 wrote: i need to find th x and y where the mouse clicked in order to mark the text to copy it.
Ugh... You need to find x and y? Ya know? That's *exactly* what GetCursorPos() does.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
CDC::GetTextExtent [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
This method gives me the width of the whole text, wht i exactly need, is the width in pixel for each charchter in the text.
|
|
|
|
|
Actually this method gives the width of the passed string, if you pass a single-character string then you get the width of such character.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
What are you trying to achieve exactly ? On what the user is supposed to click and what do you want to do in response ?
|
|
|
|
|
To get the character width you can use below sequence.
Firstly use GetCursorPos() to get the cursor point
and use HWND WindowFromPoint( POINT Point ) To get the handle and from that handle
use the below API in which the LPTEXTMETRIC haves the character width.
BOOL GetTextMetrics( HDC hdc, // handle to DC
LPTEXTMETRIC lptm // text metrics
);
i cannot understand whats your need to do such a step, well hope you are looking for the above
modified on Monday, July 13, 2009 4:46 AM
|
|
|
|
|
Hi Everyone,
Is it possible that when we burn any of the CD, it shouldn't get copied on any PC or it should not get Burned.if possible please send a sample.
Thanx in Advanced.
Shashi Bhushan
|
|
|
|
|
Read about it here - CD/DVD copy protection[^]
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Member 4603754 wrote: Urgent please
This clearly states you don't know forum guidelines, please read [^] carefully.
Member 4603754 wrote: Is it possible that when we burn any of the CD, it shouldn't get copied on any PC or it should not get Burned
?
Member 4603754 wrote: if possible please send a sample.
A sample CD?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Trying to get your question...
Are you asking about code which will burn CD on the fly means without copying it on HD?
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|
|
If I'm right, there's something called "Copyright protection" or copy protection. But that merely shows a message that the disc is copy-protected when someone makes a copy. You cannot prevent a disc from being copied. Any disc consists of merely data, not a running program which can decide what to do.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Hi
can any one help me how to segment a speech wave file based on shortpauses between the words in the wavefile,I need to parse the wave file for pause if I get it I will take the word content and make a new wave file and again parse the old one for next pause and make the new
file...
the difficulty I am facing is how to get the pause in a wave file.
thanks for help from any one,
regards
vamshi
|
|
|
|
|
what sound API are u using or how have u read in and stored the raw data?
i guess how i would do it would be to either do a raw data check to see if the current sound buffer had a series of zeros in it. this wont work if you have microphone data because of noise etc.
otherwise you could FFT analyse the buffer to see if there exsists a freq in the audiable spectrum range with a magnitude of X, where X is your tolerance of quiteness.
|
|
|
|
|
Thanks for giving me the hint I will make an r&d on FFT.
but how could I know the audible limit of the sound wave file as the header donot contain this info.
I didnot used any API ,I am provided with the wave files recorded from a
software in PCM,16000kHz,1 channel mono,16 bit sample unit.
thanks
|
|
|
|
|
Thanks for giving me the hint I will make an r&d on FFT.
but how could I know the audible limit of the sound wave file as the header donot contain this info.
I didnot used any API ,I am provided with the wave files recorded from a
software in PCM,16000kHz,1 channel mono,16 bit sample unit.
I am the same kittu_vamshi.some settings could destroy my old id
thanks
killabyte
|
|
|
|
|
even i require some guidance on this problem.
hope my question may give you some idea on how to achieve this.
iam able to read each sample in binary format from the wave file.
now can you let me know, if i can understand from the sample packet, if there is a silence or any audible wave form in that?
killabyte wrote: otherwise you could FFT analyse the buffer to see if there exsists a freq in the audiable spectrum range with a magnitude of X, where X is your tolerance of quiteness
can you explain this a bit clearly?
if FFT, is going to solve this problem for me,
then please give me some guidance and justification.
i remember, i wrote some algorithm to find FFT long long ago.
thank you.
--------------------------------------------
Suggestion to the members:
Please prefix your main thread subject with [SOLVED] if it is solved.
thanks.
chandu.
|
|
|
|
|
hmm where to begin... it really depends on your level of knowledge of DSP. i dont profess to be an expert but i have played around with matlab a fair bit mainly to analyse the data from a sensor i had and create a series of FIR filters accordingly.
i had assumed(DANGEROUS) that u will be reading in a file or streaming data in, and then analysing a small bit of this file/stream in a buffer.
so the raw data u have in the buffer is basically magnitude on the y axis and time on the x
(time is just the sample count normally).
once you have FFT'ed the buffer you now have a magnitude on the y axis and a freq on the x
you can then say if i dont have a magnitude of 'somevalue' in a freq range then i shall flag this as silence. and chop my file here.
this is a really simple overview, hope it helps.
|
|
|
|
|
really gives me some clue,
but still...
some more work around has to be done.
now, i have a sample, in an array of 2239 bytes for example.
(this sample is obtainied from the wav file by reading the bytespersample field from its header).
now, the concept of magnitude in connection with this binary is clearly not understood.
could you emphasise a bit more on this?
thanks again.
--------------------------------------------
Suggestion to the members:
Please prefix your main thread subject with [SOLVED] if it is solved.
thanks.
chandu.
|
|
|
|
|
ok it sounds like your reading in the whole file so doing an FFT on this wont enable you to determine a position of the silence. (because u have no time reference anymore, but if your buffer size was small enough chunk then you could).
if your dealing with PCM data ( i think you 3 are the same person?) then you could just parse through the array looking for a series of zero value +/- a tolerance ,remembering that zero might be different according to your encoding IE. if the data type is signed or unsigned the zero value or centre point will be different (8bit signed zero pt = 0, 8bit unsigned zero point = 128).
|
|
|
|
|
but i observed a fully silent wave file(a wave file which is recorded with no input audio), i did not find 0 s there.
killabyte wrote: ( i think you 3 are the same person?)
no both of us breaking our heads on the same task.
--------------------------------------------
Suggestion to the members:
Please prefix your main thread subject with [SOLVED] if it is solved.
thanks.
chandu.
|
|
|
|
|
chandu004 wrote: but i observed a fully silent wave file(a wave file which is recorded with no input audio), i did not find 0 s there.
so u had backround noise or you are using unsigned data encoding.
was the data obsevred about 32000?
|
|
|
|
|
thanks for your concern.
i will revise it once again and give you the correct details.
please give me some time.
--------------------------------------------
Suggestion to the members:
Please prefix your main thread subject with [SOLVED] if it is solved.
thanks.
chandu.
|
|
|
|
|
here is some information i can provide you.
I read the header of a wave file and is as follows.
bytes per sample-2
bytes per second-44100
samplesrate-22050
in the data chunk, the data is as follows
99 FE,97 FE,99 FE,97 FE,94 FE,95 FE,97 FE,97 FE,-----
means, 2 bytes per sample, so can you suggest something from here.
NOTE: this is from a file that is recorded by un plugging the audio jack, means, the file is fully silent.
--------------------------------------------
Suggestion to the members:
Please prefix your main thread subject with [SOLVED] if it is solved.
thanks.
chandu.
|
|
|
|