Click here to Skip to main content
15,902,874 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Transparent Window Pin
Rajesh R Subramanian29-Feb-08 1:52
professionalRajesh R Subramanian29-Feb-08 1:52 
GeneralRe: Transparent Window Pin
Gary R. Wheeler1-Mar-08 3:48
Gary R. Wheeler1-Mar-08 3:48 
QuestionRe: Transparent Window Pin
Rajkumar R29-Feb-08 2:47
Rajkumar R29-Feb-08 2:47 
GeneralDirectshow filter crashes in thumbnail view Pin
mTahir29-Feb-08 0:45
mTahir29-Feb-08 0:45 
GeneralRe: Directshow filter crashes in thumbnail view Pin
Cedric Moonen29-Feb-08 0:58
Cedric Moonen29-Feb-08 0:58 
GeneralRe: Directshow filter crashes in thumbnail view Pin
Rajkumar R29-Feb-08 2:07
Rajkumar R29-Feb-08 2:07 
GeneralRe: Directshow filter crashes in thumbnail view Pin
mTahir2-Mar-08 20:03
mTahir2-Mar-08 20:03 
GeneralA query in bitmap routine Pin
jossion29-Feb-08 0:00
jossion29-Feb-08 0:00 
Below is the code snippet I wrote for displaying pixel values onto the screen in MFC. The pixel values are stored in buffer disp_frame. But nothing appears on screen. Could anyone debug this code.


void CBluetooth_decoderDlg::OnTimer(UINT nIDEvent)
{
// TODO: Add your message handler code here and/or call default
int p=0,i=0,j=0,q=0;

// extern int disp_frame[50][144][176];

///////////////////////
BITMAPINFOHEADER bmi;
BITMAPINFO bm;
RGBQUAD rgbarray[256];


bmi.biSize = sizeof(BITMAPINFOHEADER);
bmi.biWidth = 176;
bmi.biHeight = 144;
bmi.biPlanes = 1;
bmi.biBitCount = 8;



bmi.biCompression = BI_RGB;
bmi.biSizeImage = 0;
bmi.biXPelsPerMeter = 0;
bmi.biYPelsPerMeter = 0;
bmi.biClrUsed = 0;
bmi.biClrImportant = 0;

bm.bmiHeader = bmi;

for (int color_index = 0; color_index < 256; color_index++)
{
rgbarray[color_index].rgbBlue = i;
rgbarray[color_index].rgbGreen = i;
rgbarray[color_index].rgbRed = i;
rgbarray[color_index].rgbReserved = 0;
}
bm.bmiColors[1] = rgbarray[0];


/////////////////////

CRect rcClient;
GetClientRect(rcClient); // See Note 1
rcClient.right=176;
rcClient.bottom=144;



CDC MemDC,*pDC;
CBitmap MemBitmap,*drawmem;

pDC = this->GetDC(); // Get Current DC

MemDC.CreateCompatibleDC(pDC);


CreateDIBSection(MemDC,bm,DIB_RGB_COLORS,disp_frame,NULL,0);
CBitmap *pOldBitmap =MemDC.SelectObject(&MemBitmap);

pDC->BitBlt(150,100,176,144,&MemDC,0,0,SRCCOPY);

MemDC.SelectObject(pOldBitmap);


ReleaseDC(pDC);


}
GeneralRe: A query in bitmap routine Pin
CPallini29-Feb-08 0:18
mveCPallini29-Feb-08 0:18 
GeneralRe: A query in bitmap routine(CDC versus HDC) Pin
jossion4-Mar-08 1:43
jossion4-Mar-08 1:43 
QuestionRe: A query in bitmap routine(CDC versus HDC) Pin
CPallini4-Mar-08 2:08
mveCPallini4-Mar-08 2:08 
GeneralRe: A query in bitmap routine(CDC versus HDC) Pin
jossion4-Mar-08 19:01
jossion4-Mar-08 19:01 
GeneralRe: A query in bitmap routine(CDC versus HDC) Pin
CPallini4-Mar-08 21:35
mveCPallini4-Mar-08 21:35 
QuestionHow to flash the taskbar icon of a certain frame ? Pin
Ahmed Charfeddine28-Feb-08 23:59
Ahmed Charfeddine28-Feb-08 23:59 
GeneralRe: How to flash the taskbar icon of a certain frame ? Pin
Rajesh R Subramanian29-Feb-08 0:02
professionalRajesh R Subramanian29-Feb-08 0:02 
GeneralRe: How to flash the taskbar icon of a certain frame ? Pin
Ahmed Charfeddine29-Feb-08 3:36
Ahmed Charfeddine29-Feb-08 3:36 
GeneralRe: How to flash the taskbar icon of a certain frame ? Pin
Rajesh R Subramanian29-Feb-08 3:44
professionalRajesh R Subramanian29-Feb-08 3:44 
QuestionCan't find the win32 C/C++ equivalents of the VB functions SelStart, SelLength, and SelText Pin
glyfyx28-Feb-08 22:48
glyfyx28-Feb-08 22:48 
GeneralRe: Can't find the win32 C/C++ equivalents of the VB functions SelStart, SelLength, and SelText Pin
CPallini28-Feb-08 23:04
mveCPallini28-Feb-08 23:04 
GeneralRe: Can't find the win32 C/C++ equivalents of the VB functions SelStart, SelLength, and SelText Pin
glyfyx6-Mar-08 9:20
glyfyx6-Mar-08 9:20 
AnswerRe: Can't find the win32 C/C++ equivalents of the VB functions SelStart, SelLength, and SelText Pin
JohnCz4-Mar-08 13:03
JohnCz4-Mar-08 13:03 
GeneralRe: Can't find the win32 C/C++ equivalents of the VB functions SelStart, SelLength, and SelText Pin
glyfyx6-Mar-08 9:19
glyfyx6-Mar-08 9:19 
GeneralRe: Can't find the win32 C/C++ equivalents of the VB functions SelStart, SelLength, and SelText Pin
JohnCz6-Mar-08 17:30
JohnCz6-Mar-08 17:30 
Generalinsert Picture Pin
bhat28-Feb-08 21:57
bhat28-Feb-08 21:57 
GeneralRe: insert Picture Pin
Maxwell Chen28-Feb-08 22:25
Maxwell Chen28-Feb-08 22:25 

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.