Click here to Skip to main content
15,889,335 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRGB to 5.6.5 translation? Pin
Erik24-Sep-00 10:33
Erik24-Sep-00 10:33 
AnswerRe: RGB to 5.6.5 translation? Pin
Feng Yuan25-Sep-00 16:10
Feng Yuan25-Sep-00 16:10 
GeneralRe: RGB to 5.6.5 translation? Pin
Erik25-Sep-00 21:32
Erik25-Sep-00 21:32 
QuestionTear-off tabs? Pin
James Corrie23-Sep-00 13:37
sussJames Corrie23-Sep-00 13:37 
AnswerI have some code, but it isn't fineshed. Pin
David Wulff25-Sep-00 5:39
David Wulff25-Sep-00 5:39 
GeneralNo Subject Pin
Anonymous23-Sep-00 13:35
Anonymous23-Sep-00 13:35 
GeneralKeyboard hooks and sending keystrokes! Pin
Mustafa Demirhan23-Sep-00 10:58
Mustafa Demirhan23-Sep-00 10:58 
GeneralStretching Bitmap Problem Pin
mirsad23-Sep-00 3:39
mirsad23-Sep-00 3:39 
Hello,

I'm trying to stretch a bitmap that is in memory using StretchBlt();. Here is what I'm doing and it isn't working:

HBITMAP hBmp = dibSect.GetSafeHandle();
CDC MemDC, srcMemDC;
CBitmap Bitmap;
if(!srcMemDC.CreateCompatibleDC(NULL)) return -1;
if(!MemDC.CreateCompatibleDC(NULL)) return -1; if(hBmp != NULL) Bitmap.Attach(hBmp); else return -1;

MemDC.SelectObject(hBmp);
MemDC.SetStretchBltMode(COLORONCOLOR);
if(MemDC.StretchBlt(0, 0, 32, 32, &srcMemDC, 0, 0, bmiHeader.biWidth, bmiHeader.biHeight, SRCCOPY) == 0) return -1;
Pos = m_ImageList->Add(MemDC.GetCurrentBitmap(), RGB(0,0,0) );

MemDC.DeleteDC();
srcMemDC.DeleteDC();
GeneralRe: Stretching Bitmap Problem Pin
Feng Yuan25-Sep-00 16:08
Feng Yuan25-Sep-00 16:08 
GeneralProgress Bar (PumpMessages() function problem?) Pin
Jon22-Sep-00 15:54
Jon22-Sep-00 15:54 
GeneralRe: Progress Bar (PumpMessages() function problem?) Pin
Sam Hobbs23-Sep-00 9:00
Sam Hobbs23-Sep-00 9:00 
GeneralRe: Progress Bar (PumpMessages() function problem?) Pin
Jon23-Sep-00 17:40
Jon23-Sep-00 17:40 
GeneralRe: Progress Bar (PumpMessages() function problem?) Pin
Sam Hobbs24-Sep-00 14:43
Sam Hobbs24-Sep-00 14:43 
GeneralRe: Progress Bar (PumpMessages() function problem?) Pin
Jon24-Sep-00 15:31
Jon24-Sep-00 15:31 
GeneralCXTabCtrl and accessing Data in CDocument Pin
Brad Chase22-Sep-00 11:11
Brad Chase22-Sep-00 11:11 
Questioncommon files registry settings???? Pin
trey22-Sep-00 9:28
trey22-Sep-00 9:28 
QuestionSlider in a Tootbar Queastion? Pin
Member 204122-Sep-00 7:22
Member 204122-Sep-00 7:22 
GeneralStretching? Resize. Pin
Geon M.22-Sep-00 6:37
sussGeon M.22-Sep-00 6:37 
GeneralRe: Stretching? Resize. Pin
rial23-Sep-00 5:35
rial23-Sep-00 5:35 
QuestionHow can I open a file without typing in the full path? Pin
Erich Ruth22-Sep-00 6:37
Erich Ruth22-Sep-00 6:37 
AnswerRe: How can I open a file without typing in the full path? Pin
Paolo Messina22-Sep-00 7:21
professionalPaolo Messina22-Sep-00 7:21 
QuestionHow can I convert 12345679 to 123,456,789.00? Pin
danielle22-Sep-00 5:01
danielle22-Sep-00 5:01 
AnswerRe: How can I convert 12345679 to 123,456,789.00? Pin
Michael Dunn22-Sep-00 8:26
sitebuilderMichael Dunn22-Sep-00 8:26 
QuestionDevice Handling in C++? Pin
Rizwan Majeed22-Sep-00 1:23
professionalRizwan Majeed22-Sep-00 1:23 
AnswerRe: Device Handling in C++? Pin
Sam Hobbs24-Sep-00 14:46
Sam Hobbs24-Sep-00 14:46 

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.