Click here to Skip to main content
16,008,075 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: what is the diff between String and string? Pin
Christian Graus27-Nov-03 10:37
protectorChristian Graus27-Nov-03 10:37 
GeneralIWebBrowser2->Stop(): annoying "click" Pin
peterchen27-Nov-03 10:06
peterchen27-Nov-03 10:06 
Generalclickable bitmap colour problems Pin
b_girl27-Nov-03 7:49
b_girl27-Nov-03 7:49 
GeneralRe: clickable bitmap colour problems Pin
Maximilien27-Nov-03 8:51
Maximilien27-Nov-03 8:51 
GeneralRe: clickable bitmap colour problems Pin
b_girl27-Nov-03 9:22
b_girl27-Nov-03 9:22 
GeneralRe: clickable bitmap colour problems Pin
Big Art27-Nov-03 9:21
Big Art27-Nov-03 9:21 
GeneralRe: clickable bitmap colour problems Pin
b_girl27-Nov-03 9:28
b_girl27-Nov-03 9:28 
GeneralRe: clickable bitmap colour problems Pin
Big Art27-Nov-03 10:49
Big Art27-Nov-03 10:49 
OK, if it were me and I just wanted to get this problem solved I would do one of the following:

Option 1) Compare on a range of RGB values. Example: allow a match of the RGB color provided in the txt file if the mouse pickuped a value within say 5 of each of the RGB values. In other words Hydrogen would be matched if the mouse picked up a R value between 51-5=46 and 51+5=56 and G and B was between 0 and 5.

or Option 2) (the preferred way)

Change your text file to include the percentages of the grid they occupy in the image and then pick up the mouse position on the window and convert it to percentage of the window width and height, then match the point in the rectange:

(Element Name, Element symbol, atomic no., x1,x2,y1,y2)
Example: text file would look like this:
Hydrogen,H,1,0,6,0,8
Helium,He,2,0,6,10,18
...
When you read in the txt file use the x1, x2.. for the coordinates in a CRect. Use CRect::PtInRect()to look for a match.

Art
GeneralRe: clickable bitmap colour problems Pin
b_girl2-Dec-03 8:47
b_girl2-Dec-03 8:47 
GeneralRe: clickable bitmap colour problems Pin
Mike Dimmick27-Nov-03 9:26
Mike Dimmick27-Nov-03 9:26 
GeneralCFileDialog - Reset the last configuration Pin
Denislef27-Nov-03 5:55
Denislef27-Nov-03 5:55 
GeneralActiveX Problem Pin
Java2C#27-Nov-03 5:14
Java2C#27-Nov-03 5:14 
QuestionMost optimized way to reverse a string? Pin
melwyn27-Nov-03 4:38
melwyn27-Nov-03 4:38 
AnswerRe: Most optimized way to reverse a string? Pin
Anonymous27-Nov-03 5:13
Anonymous27-Nov-03 5:13 
GeneralRe: Most optimized way to reverse a string? Pin
melwyn27-Nov-03 5:24
melwyn27-Nov-03 5:24 
AnswerRe: Most optimized way to reverse a string? Pin
Ian Darling27-Nov-03 5:37
Ian Darling27-Nov-03 5:37 
AnswerRe: Most optimized way to reverse a string? Pin
Mike Dimmick27-Nov-03 6:23
Mike Dimmick27-Nov-03 6:23 
GeneralRe: Most optimized way to reverse a string? Pin
Obliterator27-Nov-03 6:39
Obliterator27-Nov-03 6:39 
GeneralRe: Most optimized way to reverse a string? Pin
melwyn28-Nov-03 0:08
melwyn28-Nov-03 0:08 
AnswerRe: Most optimized way to reverse a string? Pin
фил4-Dec-03 21:57
фил4-Dec-03 21:57 
GeneralRe: Most optimized way to reverse a string? Pin
melwyn7-Dec-03 20:08
melwyn7-Dec-03 20:08 
Questionwitch message? Pin
willempipi27-Nov-03 4:33
willempipi27-Nov-03 4:33 
AnswerRe: witch message? Pin
Johnny ²27-Nov-03 4:54
Johnny ²27-Nov-03 4:54 
GeneralRe: witch message? Pin
willempipi27-Nov-03 5:45
willempipi27-Nov-03 5:45 
GeneralRe: witch message? Pin
Ravi Bhavnani27-Nov-03 6:58
professionalRavi Bhavnani27-Nov-03 6:58 

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.