Click here to Skip to main content
15,913,239 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Is there some APIs for get the force of click? Pin
Rajesh R Subramanian17-Mar-11 18:18
professionalRajesh R Subramanian17-Mar-11 18:18 
GeneralRe: Is there some APIs for get the force of click? Pin
whiteclouds17-Mar-11 22:53
whiteclouds17-Mar-11 22:53 
JokeRe: Is there some APIs for get the force of click? Pin
Rajesh R Subramanian17-Mar-11 6:25
professionalRajesh R Subramanian17-Mar-11 6:25 
QuestionRe: Is there some APIs for get the force of click? Pin
CPallini16-Mar-11 22:55
mveCPallini16-Mar-11 22:55 
AnswerRe: Is there some APIs for get the force of click? Pin
Albert Holguin17-Mar-11 4:14
professionalAlbert Holguin17-Mar-11 4:14 
AnswerRe: Is there some APIs for get the force of click? Pin
Rajesh R Subramanian17-Mar-11 5:54
professionalRajesh R Subramanian17-Mar-11 5:54 
AnswerRe: Is there some APIs for get the force of click? Pin
ThatsAlok16-Mar-11 23:46
ThatsAlok16-Mar-11 23:46 
QuestionDIBSection Pin
Kaaib16-Mar-11 9:34
Kaaib16-Mar-11 9:34 
Hi. I have been reading articles, messages and anything I can find but I still
cannot get a DIBSection to work. Can anyone tell me what I am doing wrong or point
me to an article that explains how to use one.
This code as written works,it paints the window red. But when I use the two commented lines instead of CreateCompatibleBitmap I get nothing. The handle returned by CreateDIBSection seems wrong, when I hover the mouse over it debug says it is unused.
Any help at all would be great. Thanks in advance.


void CChildView::OnDibtstTest(){
CRect r;
GetClientRect(&r);
BITMAPINFO *pbmInfo = new BITMAPINFO;
memset(pbmInfo,0,sizeof(BITMAPINFO));
pbmInfo->bmiHeader.biSize=sizeof(BITMAPINFOHEADER);
pbmInfo->bmiHeader.biWidth=r.right;
pbmInfo->bmiHeader.biHeight=r.bottom;
pbmInfo->bmiHeader.biPlanes=1;
pbmInfo->bmiHeader.biBitCount=32;
pbmInfo->bmiHeader.biSizeImage=r.right*r.bottom*4;
void *pImg;
CDC *pDc=GetDC();
CDC *pmDc = new CDC;
pmDc->CreateCompatibleDC(pDc);
CBitmap *pcBm = new CBitmap;
// HBITMAP hBm = CreateDIBSection(pDc->m_hDC,pbmInfo,DIB_RGB_COLORS,&pImg,NULL,0);
// pcBm->FromHandle(hBm);
pcBm->CreateCompatibleBitmap(pDc,r.right,r.bottom);
pmDc->SelectObject(pcBm);
CBrush br(RGB(255,0,0));
pmDc->SelectObject(&br);
pmDc->Rectangle(0,0,r.right,r.bottom);
pDc->BitBlt(0,0,r.right,r.bottom,pmDc,0,0,SRCCOPY);
delete pbmInfo;
delete pmDc;
delete pcBm;
}
AnswerRe: DIBSection Pin
Code-o-mat16-Mar-11 12:30
Code-o-mat16-Mar-11 12:30 
GeneralRe: DIBSection Pin
ThatsAlok16-Mar-11 23:47
ThatsAlok16-Mar-11 23:47 
JokeRe: DIBSection Pin
Code-o-mat16-Mar-11 23:50
Code-o-mat16-Mar-11 23:50 
GeneralRe: DIBSection Pin
Kaaib16-Mar-11 23:50
Kaaib16-Mar-11 23:50 
GeneralRe: DIBSection Pin
Code-o-mat17-Mar-11 4:38
Code-o-mat17-Mar-11 4:38 
QuestionHow to set Member variable as extern variable [modified] Pin
Jokcy16-Mar-11 4:36
Jokcy16-Mar-11 4:36 
AnswerRe: How to set Member variable as extern variable Pin
David Crow16-Mar-11 5:26
David Crow16-Mar-11 5:26 
GeneralRe: How to set Member variable as extern variable Pin
Jokcy16-Mar-11 14:43
Jokcy16-Mar-11 14:43 
GeneralRe: How to set Member variable as extern variable Pin
Jokcy16-Mar-11 14:47
Jokcy16-Mar-11 14:47 
GeneralRe: How to set Member variable as extern variable Pin
Ozer Karaagac16-Mar-11 14:55
professionalOzer Karaagac16-Mar-11 14:55 
GeneralRe: How to set Member variable as extern variable Pin
Albert Holguin16-Mar-11 15:16
professionalAlbert Holguin16-Mar-11 15:16 
GeneralRe: How to set Member variable as extern variable Pin
Ozer Karaagac16-Mar-11 15:41
professionalOzer Karaagac16-Mar-11 15:41 
GeneralRe: How to set Member variable as extern variable Pin
Albert Holguin16-Mar-11 16:20
professionalAlbert Holguin16-Mar-11 16:20 
GeneralRe: How to set Member variable as extern variable Pin
Ozer Karaagac16-Mar-11 16:45
professionalOzer Karaagac16-Mar-11 16:45 
GeneralRe: How to set Member variable as extern variable Pin
Albert Holguin16-Mar-11 16:51
professionalAlbert Holguin16-Mar-11 16:51 
GeneralRe: How to set Member variable as extern variable Pin
Jokcy16-Mar-11 17:16
Jokcy16-Mar-11 17:16 
GeneralRe: How to set Member variable as extern variable Pin
Jokcy16-Mar-11 15:25
Jokcy16-Mar-11 15: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.