Click here to Skip to main content
15,912,578 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Creating a dialog from a COM dll Pin
Prakash Nadar13-Nov-03 0:19
Prakash Nadar13-Nov-03 0:19 
QuestionHow can I convert the JPEG files to thumbnails? Pin
ElizabethC12-Nov-03 12:57
ElizabethC12-Nov-03 12:57 
AnswerRe: How can I convert the JPEG files to thumbnails? Pin
Andrew Walker12-Nov-03 18:40
Andrew Walker12-Nov-03 18:40 
GeneralRe: How can I convert the JPEG files to thumbnails? Pin
ElizabethC13-Nov-03 6:09
ElizabethC13-Nov-03 6:09 
GeneralRe: How can I convert the JPEG files to thumbnails? Pin
Prakash Nadar13-Nov-03 16:08
Prakash Nadar13-Nov-03 16:08 
GeneralRe: How can I convert the JPEG files to thumbnails? Pin
ElizabethC17-Nov-03 5:57
ElizabethC17-Nov-03 5:57 
GeneralSendInput / keyb_event in a keyboard hook Pin
OddArne12-Nov-03 12:38
OddArne12-Nov-03 12:38 
Generalbmp save file question gdi+ Pin
ptharso12-Nov-03 11:05
ptharso12-Nov-03 11:05 
I'm need to resolve how to save a HBITMAP to jpeg file.

Someone try???????


// drawing somethings///////////////////////////////////
void CJanelaView::OnGravar() {

CClientDC dc(this); Graphics d(dc);

Pen blue (Color(255, 0, 0, 255));
Pen red (Color(255, 255, 0, 0));
Pen pen (Color(y, 0, 255,0));
Pen pen1 (Color(x, 255, 0, 255));
Pen pen2(Color(255, 255, 0, 255));

for (int x=0,int y=256; x<256; x+=15){ d.DrawLine(&blue,0,y,x,0); d.DrawLine(&red,256,x,y,256); y-=5; }
for (y = 0; y < 256; y++){ d.DrawLine(&pen, 0, y, 256, y); Sleep(20); }
for (x = 0; x < 256; x++){ d.DrawLine(&pen1, x, 100, x, 200); Sleep(20); }

d.DrawRectangle(&pen2,0,0,50,50); Image Im(L"lily.jpg", FALSE); d.DrawImage(&Im,50,50);

// saving the bitmap of screen view////////////////////////////////

HDC bloco = CreateCompatibleDC(dc);
HBITMAP tela = CreateCompatibleBitmap(dc,240,320);

if ( tela==0 || !SelectObject(bloco,tela) || !BitBlt(bloco,0,0,240,320,dc,0,0,SRCCOPY)) return ;

DeleteDC(bloco); DeleteDC(dc);

CLSID GifCodec;
GetCodecClsid(L"image/jpeg", &GifCodec);
tela.Save(L"wrk.jpg", &GifCodec, NULL); // an error occurs
}
//////////////////////////////////////////////////////////////////////////////
GeneralReceive vs ReceiveFrom... Pin
NewHSKid12-Nov-03 9:53
NewHSKid12-Nov-03 9:53 
GeneralRe: Receive vs ReceiveFrom... Pin
Alexander M.,13-Nov-03 8:11
Alexander M.,13-Nov-03 8:11 
GeneralRe: Receive vs ReceiveFrom... Pin
Steve S13-Nov-03 22:11
Steve S13-Nov-03 22:11 
GeneralRe: Receive vs ReceiveFrom... Pin
Alexander M.,13-Nov-03 22:56
Alexander M.,13-Nov-03 22:56 
GeneralRe: Receive vs ReceiveFrom... Pin
NewHSKid14-Nov-03 1:02
NewHSKid14-Nov-03 1:02 
GeneralNM_CLICK problems Pin
ns12-Nov-03 9:30
ns12-Nov-03 9:30 
GeneralRe: NM_CLICK problems Pin
Joaquín M López Muñoz12-Nov-03 10:18
Joaquín M López Muñoz12-Nov-03 10:18 
GeneralRe: NM_CLICK problems Pin
ns13-Nov-03 2:30
ns13-Nov-03 2:30 
GeneralRe: NM_CLICK problems Pin
David Crow12-Nov-03 10:55
David Crow12-Nov-03 10:55 
GeneralRe: NM_CLICK problems Pin
ns13-Nov-03 2:49
ns13-Nov-03 2:49 
GeneralCD-ROM Pin
Alexander M.,12-Nov-03 9:26
Alexander M.,12-Nov-03 9:26 
GeneralRe: CD-ROM Pin
Joaquín M López Muñoz12-Nov-03 10:22
Joaquín M López Muñoz12-Nov-03 10:22 
GeneralUnhandled Exception Pin
mcquilkenm12-Nov-03 7:27
mcquilkenm12-Nov-03 7:27 
GeneralRe: Unhandled Exception Pin
John M. Drescher12-Nov-03 8:35
John M. Drescher12-Nov-03 8:35 
GeneralLaunching mail client, open new message and add attachments Pin
Daniel 'Tak' M.12-Nov-03 7:23
Daniel 'Tak' M.12-Nov-03 7:23 
GeneralRe: Launching mail client, open new message and add attachments Pin
David Crow12-Nov-03 8:02
David Crow12-Nov-03 8:02 
GeneralRe: Launching mail client, open new message and add attachments Pin
Daniel 'Tak' M.12-Nov-03 8:21
Daniel 'Tak' M.12-Nov-03 8:21 

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.