Click here to Skip to main content
15,908,618 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to close form Pin
Geert van Horrik3-Feb-05 1:57
Geert van Horrik3-Feb-05 1:57 
GeneralRe: How to close form Pin
Anonymous6-Feb-05 0:35
Anonymous6-Feb-05 0:35 
GeneralImage flickers when Invalidate() is called. Pin
jazzkiller2-Feb-05 19:30
jazzkiller2-Feb-05 19:30 
GeneralRe: Image flickers when Invalidate() is called. Pin
Member 9009872-Feb-05 20:33
Member 9009872-Feb-05 20:33 
GeneralRe: Image flickers when Invalidate() is called. Pin
Christopher Lloyd3-Feb-05 1:16
Christopher Lloyd3-Feb-05 1:16 
GeneralRe: Image flickers when Invalidate() is called. Pin
jazzkiller3-Feb-05 6:11
jazzkiller3-Feb-05 6:11 
GeneralRe: Image flickers when Invalidate() is called. Pin
Christopher Lloyd3-Feb-05 7:14
Christopher Lloyd3-Feb-05 7:14 
GeneralRe: Image flickers when Invalidate() is called. Pin
jazzkiller3-Feb-05 10:05
jazzkiller3-Feb-05 10:05 
This is all in my OnPaint() of a CChildView:

CPaintDC dc(this); // device context for painting
CDC* pDC = &dc; // Convert to context device pointer
HDC hdc = pDC->GetSafeHdc();

// Prepare Header for image
BITMAPINFO *m_pBitmapInfo;
m_pBitmapInfo = (BITMAPINFO*)new char[sizeof(BITMAPINFO) + sizeof(RGBQUAD)*256];

// Load header
m_pBitmapInfo->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
m_pBitmapInfo->bmiHeader.biWidth = ImX;
m_pBitmapInfo->bmiHeader.biHeight = -ImY;
m_pBitmapInfo->bmiHeader.biPlanes = 1;
m_pBitmapInfo->bmiHeader.biBitCount = 8;
m_pBitmapInfo->bmiHeader.biCompression = BI_RGB;
m_pBitmapInfo->bmiHeader.biSizeImage = 0;
m_pBitmapInfo->bmiHeader.biXPelsPerMeter = 0;
m_pBitmapInfo->bmiHeader.biYPelsPerMeter = 0;
m_pBitmapInfo->bmiHeader.biClrUsed = 256;
m_pBitmapInfo->bmiHeader.biClrImportant = 0;

int i;
for ( i = 0; i < 256; i++ )
{
m_pBitmapInfo->bmiColors[i].rgbBlue = i;
m_pBitmapInfo->bmiColors[i].rgbGreen = i;
m_pBitmapInfo->bmiColors[i].rgbRed = i;
m_pBitmapInfo->bmiColors[i].rgbReserved = 0;
}

// Stretch pixels out to screen
StretchDIBits(hdc,
xCord,yCord,ImX,ImY,
0,0,ImX,ImY,
img, //------->>> Pointer to array of bits, a CChildView variable member.
m_pBitmapInfo,
DIB_RGB_COLORS,
SRCCOPY);
GeneralRe: Image flickers when Invalidate() is called. Pin
Christopher Lloyd3-Feb-05 10:29
Christopher Lloyd3-Feb-05 10:29 
GeneralGET BITMAP Pin
kedar.dave2-Feb-05 19:17
kedar.dave2-Feb-05 19:17 
QuestionHow to change the scan code while posting WM_KEYDOWN and WM_KEYUP messages? Pin
ledallam2-Feb-05 17:59
ledallam2-Feb-05 17:59 
AnswerRe: How to change the scan code while posting WM_KEYDOWN and WM_KEYUP messages? Pin
Christopher Lloyd3-Feb-05 1:23
Christopher Lloyd3-Feb-05 1:23 
GeneralRe: How to change the scan code while posting WM_KEYDOWN and WM_KEYUP messages? Pin
Blake Miller3-Feb-05 6:03
Blake Miller3-Feb-05 6:03 
QuestionHow to corelate VC++ data to EXCElL sheet Pin
Member 9009872-Feb-05 17:56
Member 9009872-Feb-05 17:56 
AnswerRe: How to corelate VC++ data to EXCElL sheet Pin
tigron2-Feb-05 18:28
tigron2-Feb-05 18:28 
AnswerRe: How to corelate VC++ data to EXCElL sheet Pin
David Crow3-Feb-05 3:12
David Crow3-Feb-05 3:12 
GeneralThreaded Concept Question Pin
LighthouseJ2-Feb-05 16:53
LighthouseJ2-Feb-05 16:53 
GeneralRe: Threaded Concept Question Pin
LighthouseJ2-Feb-05 18:13
LighthouseJ2-Feb-05 18:13 
GeneralRe: Threaded Concept Question Pin
rwestgraham2-Feb-05 19:13
rwestgraham2-Feb-05 19:13 
GeneralRe: Threaded Concept Question Pin
LighthouseJ3-Feb-05 2:34
LighthouseJ3-Feb-05 2:34 
GeneralRe: Threaded Concept Question Pin
Blake Miller3-Feb-05 6:18
Blake Miller3-Feb-05 6:18 
GeneralDetecting fullscreen apps Pin
Anonymous2-Feb-05 16:51
Anonymous2-Feb-05 16:51 
GeneralTired of this problem Pin
pc_dev2-Feb-05 16:42
pc_dev2-Feb-05 16:42 
GeneralMFC help PLEASE!! Pin
messin182-Feb-05 14:19
messin182-Feb-05 14:19 
GeneralRe: MFC help PLEASE!! Pin
Bob Ciora2-Feb-05 14:31
Bob Ciora2-Feb-05 14:31 

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.