|
Hi
i've some problem as i want to read BMP File data as 8*8 blocks
can any one help me
|
|
|
|
|
Are you using LoadImage() to read the .bmp file?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
No i want to deal with its data byte by byte
|
|
|
|
|
Open the file using CreateFile() . Read the bytes from the file using ReadFile() .
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
thnx a lot for your care but that wasn't wat i thoght
u may be miss under stand me
but thnx any way
|
|
|
|
|
Alinuxcs wrote: that wasn't wat i thoght
u may be miss under stand me
You wanted to process a .bmp file "byte by byte." What's wrong with:
HANDLE hFile;
DWORD dwBytesRead;
BYTE buff;
hFile = CreateFile("c:\\windows\\Coffee Bean.bmp", GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL);
do
{
ReadFile(hFile, &buff, 1, &dwBytesRead, NULL);
} while (dwBytesRead == 1);
CloseHandle(hFile);
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hi Alinuxcs,
Can you be more specific,do you need to load a bmp file
|
|
|
|
|
yes i want to load BMP file but not to view it in a form but to deal with its data byte by byte
|
|
|
|
|
any sample to create user true-type font?
I just want to create simple ones for my research.
A nice hyper tool for optimizing your Microsoft html-help contents.
A best image tool for Windows C++ programmers, don't miss it!.
Includeh10
|
|
|
|
|
Hi, I am trying to print a text file with WritePrinter, below is the code I did, I read the file to a buffer and send the buffer to print by WritePrinter, but the printer gets stop printing after the first letter, then i have to press the printer to release the page.
HOW COME IT DOES NOT WANT TO PRINT THE WHOLE TEXT, AND WHY DOES IT STOPS PRINTING.
ANY INFORMATION WILL BE GREATLY APPRECIATED.
void thebuffer(HANDLE hPrinter)
{
FILE * pFile;
long lSize;
char * buffer;
DWORD dwBytesWritten = 0;
pFile = fopen ( "reafile.txt" , "rb" );
if (pFile==NULL)
{cout<<"Can not open file"<
|
|
|
|
|
What is the value of lSize , z , and dwBytesWritten ?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
I have check that, the reafile.txt only had like 4words,
and lSize=16bytes and dwBytesWritten=16bytes and z=1.
This is what is bugging me, It seem like everything should work.
I came to notice that as I keep trying to print the paper just does not want to come out completely then I have to press a button on the printer to release the paper and from time to time the all the text comes out but from time to time only one Character.
Is there any reason that the printer does not release the paper. Do that problem happens because of the code?
Thank you for replying.
|
|
|
|
|
zaro333 wrote: Is there any reason that the printer does not release the paper.
Have you sent a FF character to the printer?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Sorry for the Delay, my professor wanted me to read a paper on superconductivity.
But the answear to your question, I do no think so, does the FF character does anything special?
|
|
|
|
|
zaro333 wrote: ...does the FF character does anything special?
It's a form feed character.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
|
How to know whether a font (say Times New Roman) is installed in a system?
|
|
|
|
|
Try EnumFontFamiliesEx() .
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Aryan S wrote: How to know whether a font (say Times New Roman) is installed in a system?
you can try EnumFonts too.. if you need only font name
|
|
|
|
|
hello,
I have an SDI with a view drived from CHtmlViw.I'm displaying a webpage and i want to draw a line over it. Could anyone tell me how i can do this...i want the line to persist even when a scroll down the page.
thanks..
|
|
|
|
|
Hi there,
I want to implement Mail sending option on my application (diaolog based in VC++ 6.0)
and i was wondering if you could give me some source code where you have implemented this.
I saw some examples from the articles but they are too complicated and have many options my app doesnt need so i need something more simple - just send a mail to an email adress which the user will enter.
Thanx
|
|
|
|
|
See here.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
|
Oliver Shikaloski wrote: I saw some examples from the articles but they are too complicated and have many options my app doesnt need so i need something more simple - just send a mail to an email adress which the user will enter.
try one of most simple one :-
http://www.codeproject.com/internet/csmtpconn.asp[^]
|
|
|
|
|
I suggest you use PJ Naughter's CSMTPConnection v1.36[^]
Good luck and keep the good coding! (best class i've met yet)
|
|
|
|