|
No, that was just additional information. What I'm attempting to make is a series of messageboxes none of which are able to be moved from their centered spot and they need to be very large in size.
|
|
|
|
|
gamefreak2291 wrote: What I'm attempting to make is a series of messageboxes none of which are able to be moved from their centered spot and they need to be very large in size.
You can do that with your own, not the built-in variety.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
can you possibly help me start this process, I haven't taken a programming class yet and I won't for around another year now so I'm trying to get a very large headstart..
|
|
|
|
|
Do you know how to create a dialog-based application?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
Possibly, but the terminology doesn't ring any bells
|
|
|
|
|
See here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
you're not by any chance just turned 18 in february?
|
|
|
|
|
I don't know what that has to do with anything, but yes i did just turn 18 in february.
|
|
|
|
|
Greetings fellows!
I once again ask for you help:
I have some .dat files, which are sequences of bits (files are around 15 MBs in size). Every 10 bits there is a 0 (separator). Before anything else, I would like to make a text file out of the dat one, and every bit in the original file to have a character correspondent in the text file (so I can actually read the bits with , say, notepad).
What I`ve tried so far (without success):
BYTE buffer[100];
char buffer2[5000];
long index;
DWORD dwRead;
do {
dwRead = readFile.Read(buffer, 100);
for (index=0;index<dwread;index++)>
buffer2[index]= buffer[index]
writeFile.Write(buffer2, dwRead);
}
while (dwRead > 0);
I know it`s goofy and that formatting these bits should be done easily using some unknown (to me) function. Could u please point me the direction?
Thanks again
shpid3r
|
|
|
|
|
shpid3r wrote: so I can actually read the bits
It seems very possible you think a "bit" is a "byte". It isn't. If you want to see the bytes I suggest you use an already existing application that can display the raw byte values. There are several free ones and of course Visual Studio does this as well.
good luck
|
|
|
|
|
I am not thinking of bits as bytes, though it might sound like that.
I would rather transform every bit into a byte (in order to observe them easier).
The next step will be to format data (eliminate the 0 - separator and use the remaining bits to form values. If the first bit after the 0 - separator is 1, the value will be negative, and all the 2 complement policy. Therefore I need to be able to manipulate data at the bit-level.
Thanks for you insight!
|
|
|
|
|
shpid3r wrote: I am not thinking of bits as bytes, though it might sound like that.
I would rather transform every bit into a byte (in order to observe them easier).
shpid3r wrote: Could u please point me the direction?
I don't know what you mean since you gave no indication what you don't know how to do.
Each bit is only a 1 or 0 so all you have to do is determine which then write the character to the file. Of course there are other ways like using a C++ function to generate a string using a radix of 2 and then write the string to the file but that will only work on byte boundaries.
|
|
|
|
|
ok let me zoom out a little:
I have the sequence of bits:
0 101010101 0 101010101 0 101010101 0 10101010 0 ...
First I have to strip the lone 0's.
With the remainder bits I have to form numbers, and then write them (the obtained values) into a file.
As there are 9 bits used for every value, I will have to format these numbers on 16 bits (so to meet the byte boundaries). The first bit is important, as it gives the sign information (positive or negative).
It is obvious that the suggestion to test bits and write characters of 0 or 1 is the simplest approach, but it won`t help me further ahead... Sorry for not providing a complete explanation (so far)
|
|
|
|
|
What do you mean with sequence of bits (is your record size 10 bits, i.e. leading '0' plus 9 data bits, so that 8 of your records fit in 10 bytes?)?
And if you record has fixed size, what is the purpose of the leading '0' (the 'delimiter')?
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]
|
|
|
|
|
Greetings Pallini (and thanks again for your interest, you seem invaluable to this community)
Uhm... the hypothesis with one 0 every 10 bits was given to me by my superiors. I raised the question that you`ve raised (why one 0 every 10 bits if we know that every value is encoded in 10 bits) but they didn`t know the answer, just that "this is how it is".
I have tried observing the sequence of bits, but every editor I come across interprets and displays values in Hex format (I know the basics but I am not comfortable working with it, it takes me lots of more time than binary, especially on this data set)
Though, at a first glance, at least the beginning of the file does not follow this rule. I have uploaded a file for you if you have time to check it for yourself.
http://www.dump.ro/fisiere/100-dat/104015/o5tzJNoMT65asCMx
before going ahead working on this, I wish I see the bits and from there to decide what to do next. I am going to take the "test bit by bit and write chars into a file" and come back when going to conversion
10x for you help
|
|
|
|
|
The following silly program represents the first N bytes of your file as a binary string. I can't find the patterns you've described, anyway... I good luck!
#define N 80
void main()
{
int i;
int k;
int count;
char c;
FILE * fp = fopen("100.dat", "rb");
if ( !fp) return;
i=0;
for (i=0; i<N; i++)
{
unsigned char b = fgetc(fp);
for (k=0; k<8; k++)
{
c = b & 0x80 ? '1' : '0';
b <<= 1;
printf("%c",c);
}
i++;
}
fclose(fp);
}
BTW with such a 'detailed specification' of the file format what is expected from you? I would throw to your superiors a big chunk of random data...
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]
|
|
|
|
|
Hi There.
I am trying to get a caption of a windows control using below code... But its fatching only a set of square boxes (Carriage return).
TCHAR buf[512];
::SendMessage(pWaitingProcessCompleteWnd6, WM_GETTEXT, 0 , (LPARAM)buf);
I have checked the address of pWaitingProcessCompleteWnd6 using spy++, its pointing to the right control.
Please help.
Thanks
PanB
|
|
|
|
|
PankajB wrote: But its fatching only a set of square boxes (Carriage return).
How are you verifying this?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
How about using GetWindowText[^] instead?
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
From his previous bizarre post (where he's searching for a control by it's caption), I think this particular control is owned by a different process, which makes GetWindowText() unusable.
Of course, I'm only assuming things.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Rajesh R Subramanian wrote: From his previous bizarre post (where he's searching for a control by it's caption), I think this particular control is owned by a different process
Ahh, I missed that one.
You're probably right Rajesh.
Rajesh R Subramanian wrote: Of course, I'm only assuming things.
Yeah, that's usually 50% of the job trying to put together a useful answer depending on the lack of information in the posts....
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Roger Stoltz wrote: Yeah, that's usually 50% of the job trying to put together a useful answer depending on the lack of information in the posts.... Wink
[Sylverster Stallone tone] Well, it's tough answering questions here. They give me a war that I cannot believe in. [/Sylverster Stallone tone]
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Rajesh R Subramanian wrote: Sylverster Stallone tone
Hey man, you're too young to remember Sly.
--Carlo Rocky Rambo.
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]
|
|
|
|
|
There you go, changing your middle name again.
Warm regards,
Rajesh "Neo" Subramanian.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Actually, you can use GetWindowText on windows which belong to a different process.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|