Click here to Skip to main content
15,894,539 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: if is someone who can help me? PLZ!!!!!! Pin
Chris Losinger7-Aug-06 1:19
professionalChris Losinger7-Aug-06 1:19 
AnswerRe: if is someone who can help me? PLZ!!!!!! Pin
Christian Graus7-Aug-06 1:29
protectorChristian Graus7-Aug-06 1:29 
AnswerRe: if is someone who can help me? PLZ!!!!!! Pin
PlayByTheRules7-Aug-06 1:46
PlayByTheRules7-Aug-06 1:46 
AnswerRe: if is someone who can help me? PLZ!!!!!! Pin
David Crow7-Aug-06 3:07
David Crow7-Aug-06 3:07 
Question.inl files Pin
SteamEngine7-Aug-06 0:53
SteamEngine7-Aug-06 0:53 
AnswerRe: .inl files Pin
Link26007-Aug-06 1:04
Link26007-Aug-06 1:04 
AnswerRe: .inl files Pin
Programm3r7-Aug-06 1:04
Programm3r7-Aug-06 1:04 
QuestionUsing CxImageLib Pin
Kiran Pinjala7-Aug-06 0:38
Kiran Pinjala7-Aug-06 0:38 
I am using CxImage class. My code which prints a text file to a tiff file is

char * fileSrc="g:\\src.txt";<br />
char * fileDest = "g:\\dest.tiff";<br />
FILE *fp1,*fp2;<br />
fp1 = fopen(fileSrc,"r");<br />
fp2 = fopen(fileDest,"w+b");<br />
CxImage image(1024, 1024, 8, CXIMAGE_FORMAT_TIF);<br />
RGBQUAD c={255,255,255,255};<br />
HDC hdc = ::GetWindowDC(NULL);<br />
<br />
while((ch[0] = fgetc(fp1))!= EOF)<br />
{<br />
    if(ch[0] == '\n' || ch[0] =='\r')<br />
    {<br />
        x=10;<br />
        y+=10;<br />
    }<br />
    x+=10;<br />
    ch[1]='\0';<br />
    image.DrawString(hdc, x, y, ch,c, "Arial");<br />
}<br />
<br />
::ReleaseDC(NULL,hdc);<br />
int i = image.Encode(fp2, CXIMAGE_FORMAT_TIF);<br />
str.Format("image Encode Result- %d",i);<br />
m_List.InsertString(-1,str);<br />
<br />
fclose(fp1);<br />
fclose(fp2);


Every thing is going right except the main thing. What i am getting in tiff file is a total black image and nothing else.
How can i get the right image. Please help.

KIRAN PINJARLA

AnswerRe: Using CxImageLib Pin
Programm3r7-Aug-06 0:40
Programm3r7-Aug-06 0:40 
GeneralRe: Using CxImageLib Pin
Kiran Pinjala7-Aug-06 0:50
Kiran Pinjala7-Aug-06 0:50 
GeneralRe: Using CxImageLib Pin
Programm3r7-Aug-06 0:59
Programm3r7-Aug-06 0:59 
AnswerRe: Using CxImageLib Pin
Viorel.7-Aug-06 1:33
Viorel.7-Aug-06 1:33 
GeneralRe: Using CxImageLib Pin
Kiran Pinjala7-Aug-06 2:05
Kiran Pinjala7-Aug-06 2:05 
GeneralRe: Using CxImageLib Pin
Viorel.7-Aug-06 2:46
Viorel.7-Aug-06 2:46 
GeneralRe: Using CxImageLib Pin
Kiran Pinjala7-Aug-06 2:53
Kiran Pinjala7-Aug-06 2:53 
GeneralRe: Using CxImageLib Pin
Viorel.7-Aug-06 3:00
Viorel.7-Aug-06 3:00 
GeneralRe: Using CxImageLib Pin
Kiran Pinjala7-Aug-06 2:47
Kiran Pinjala7-Aug-06 2:47 
GeneralRe: Using CxImageLib Pin
Viorel.7-Aug-06 3:12
Viorel.7-Aug-06 3:12 
QuestionHow to launch Microsoft Word Pin
Wim Engberts7-Aug-06 0:03
Wim Engberts7-Aug-06 0:03 
AnswerRe: How to launch Microsoft Word Pin
Rage7-Aug-06 0:24
professionalRage7-Aug-06 0:24 
AnswerRe: How to launch Microsoft Word Pin
Hamid_RT7-Aug-06 2:29
Hamid_RT7-Aug-06 2:29 
AnswerRe: How to launch Microsoft Word Pin
georgekjolly7-Aug-06 20:02
georgekjolly7-Aug-06 20:02 
QuestionA Question about void! Pin
Abhishek Shekhar6-Aug-06 23:48
Abhishek Shekhar6-Aug-06 23:48 
AnswerRe: A Question about void! Pin
Programm3r6-Aug-06 23:59
Programm3r6-Aug-06 23:59 
AnswerRe: A Question about void! Pin
Zac Howland7-Aug-06 5:27
Zac Howland7-Aug-06 5:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.