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

C / C++ / MFC

 
GeneralRe: Determine when I am connected on LAN Pin
pma3-Oct-03 8:51
pma3-Oct-03 8:51 
GeneralClickable Bitmap UI question Pin
b_girl3-Oct-03 3:58
b_girl3-Oct-03 3:58 
GeneralRe: Clickable Bitmap UI question Pin
Jason Henderson3-Oct-03 5:12
Jason Henderson3-Oct-03 5:12 
GeneralRe: Clickable Bitmap UI question Pin
b_girl3-Oct-03 5:37
b_girl3-Oct-03 5:37 
GeneralRe: Clickable Bitmap UI question Pin
Jason Henderson3-Oct-03 5:45
Jason Henderson3-Oct-03 5:45 
GeneralRe: Clickable Bitmap UI question Pin
b_girl3-Oct-03 5:57
b_girl3-Oct-03 5:57 
GeneralRe: Clickable Bitmap UI question Pin
Jason Henderson3-Oct-03 6:01
Jason Henderson3-Oct-03 6:01 
GeneralRe: Clickable Bitmap UI question Pin
b_girl3-Oct-03 6:40
b_girl3-Oct-03 6:40 
I'm doing something seriously wrong. No matter where I click on the bitmap, crColourAtPoint is ALWAYS set at 16777215. I don't understand why.

CBitmap TemplateBMP;
...
TemplateBMP.LoadBitmap(IDB_PERIODIC_TMPL);
...
POINT pt;
CDC *pDC = NULL;
CDC memDC;
COLORREF crColourAtPoint = 0;
CBitmap *hOldBMP = NULL;

//obtain the point where the click occurred on the bitmap
GetCursorPos(&pt);

m_periodicBitmap.ScreenToClient(&pt);
pDC = m_periodicBitmap.GetDC();
memDC.CreateCompatibleDC(pDC);
hOldBMP = memDC.SelectObject(&TemplateBMP);
crColourAtPoint = GetPixel(memDC.m_hDC, pt.x, pt.y);

CString colourString;
colourString.Format("Colour clicked: %d", crColourAtPoint);
AfxMessageBox(colourString);
GeneralRe: Clickable Bitmap UI question Pin
Jason Henderson3-Oct-03 6:44
Jason Henderson3-Oct-03 6:44 
GeneralRe: Clickable Bitmap UI question Pin
b_girl3-Oct-03 7:07
b_girl3-Oct-03 7:07 
GeneralRe: Clickable Bitmap UI question Pin
Terry O'Nolley3-Oct-03 8:57
Terry O'Nolley3-Oct-03 8:57 
GeneralRe: Clickable Bitmap UI question Pin
b_girl3-Oct-03 9:05
b_girl3-Oct-03 9:05 
QuestionHow to make a Dialog box Pop up on receiving a event Pin
Deepak Samuel3-Oct-03 3:12
Deepak Samuel3-Oct-03 3:12 
AnswerRe: How to make a Dialog box Pop up on receiving a event Pin
jmkhael3-Oct-03 3:18
jmkhael3-Oct-03 3:18 
AnswerRe: How to make a Dialog box Pop up on receiving a event Pin
David Crow3-Oct-03 7:22
David Crow3-Oct-03 7:22 
Generalconnect or disconnect ADSL Pin
Mnu3-Oct-03 2:01
Mnu3-Oct-03 2:01 
GeneralCouple question about Dialog in MFC Pin
NewHSKid3-Oct-03 1:35
NewHSKid3-Oct-03 1:35 
GeneralRe: Couple question about Dialog in MFC Pin
Jagadeesh VN3-Oct-03 1:58
Jagadeesh VN3-Oct-03 1:58 
GeneralB, I, U Pin
Florin Ochiana3-Oct-03 1:33
Florin Ochiana3-Oct-03 1:33 
GeneralRe: B, I, U Pin
Jagadeesh VN3-Oct-03 1:52
Jagadeesh VN3-Oct-03 1:52 
Generalhandling abnormal termination Pin
yourbuddy773-Oct-03 0:49
yourbuddy773-Oct-03 0:49 
GeneralRe: handling abnormal termination Pin
Anand Paranjpe3-Oct-03 1:19
Anand Paranjpe3-Oct-03 1:19 
GeneralCTreeCtrl and deleting items Pin
vprat2-Oct-03 22:57
vprat2-Oct-03 22:57 
GeneralRe: CTreeCtrl and deleting items Pin
Tibor Blazko2-Oct-03 23:50
Tibor Blazko2-Oct-03 23:50 
GeneralRe: CTreeCtrl and deleting items Pin
vprat2-Oct-03 23:59
vprat2-Oct-03 23:59 

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.