Click here to Skip to main content
15,887,214 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Why "make"? Pin
Richard MacCutchan7-Feb-19 6:00
mveRichard MacCutchan7-Feb-19 6:00 
GeneralRe: Why "make"? Pin
k50547-Feb-19 7:07
mvek50547-Feb-19 7:07 
GeneralRe: Why "make"? Pin
leon de boer7-Feb-19 17:13
leon de boer7-Feb-19 17:13 
JokeRe: Why "make"? Pin
Richard MacCutchan7-Feb-19 22:19
mveRichard MacCutchan7-Feb-19 22:19 
GeneralRe: Why "make"? Pin
CPallini7-Feb-19 23:05
mveCPallini7-Feb-19 23:05 
GeneralRe: Why "make"? Pin
Dar Brett8-Feb-19 16:02
Dar Brett8-Feb-19 16:02 
GeneralRe: Why "make"? Pin
CPallini9-Feb-19 0:22
mveCPallini9-Feb-19 0:22 
Questionmemory device context coordinates Pin
Alexander Kindel6-Feb-19 12:12
Alexander Kindel6-Feb-19 12:12 
I'm working on a music notation program, where it needs to be possible to select any object, like a note or a clef, by clicking on the glyph. In order to determine whether a glyph has been clicked, I'm trying the approach of iterating through the drawable objects, rendering them each into a memory device context with a blank bitmap selected, mapping the mouse coordinates into this bitmap, and checking whether the pixel they map to is filled.

While I'm getting this system working, I'm rendering a rectangular frame with the dimensions of the memory device context's bitmap to the corner of the window, and rendering the bitmap itself into it using BitBlt in order to see what's going on. What I see surprises me. I thought that rendering a glyph into the memory device context using TextOutW with x = 0 and y = 0 would put the glyph's origin at the top left of the bitmap, like it does when rendering to a window in the most basic case. Instead, the glyph appears to the left but vertically centered in the frame. So...given that the bitmap handle I selected into the memory device context was created using CreateCompatibleBitmap with cx = w and cy = h, does TextOutW treat it as having a coordinate system where x ranges from 0 to w while y ranges from -h/2 to h/2? Is there somewhere on MSDN that discusses this?
AnswerRe: memory device context coordinates Pin
mo14926-Feb-19 13:30
mo14926-Feb-19 13:30 
GeneralRe: memory device context coordinates Pin
Alexander Kindel6-Feb-19 13:44
Alexander Kindel6-Feb-19 13:44 
AnswerRe: memory device context coordinates Pin
leon de boer6-Feb-19 15:55
leon de boer6-Feb-19 15:55 
GeneralRe: memory device context coordinates Pin
Alexander Kindel7-Feb-19 23:23
Alexander Kindel7-Feb-19 23:23 
GeneralRe: memory device context coordinates Pin
leon de boer8-Feb-19 21:43
leon de boer8-Feb-19 21:43 
AnswerRe: memory device context coordinates Pin
Alexander Kindel8-Feb-19 9:22
Alexander Kindel8-Feb-19 9:22 
QuestionMenu bar on title bar of application Pin
jung-kreidler6-Feb-19 2:23
jung-kreidler6-Feb-19 2:23 
QuestionChanged CMDIChildWnd to CMDIChildWndEx: does not show anything inside the frame Pin
Dansveen4-Feb-19 2:02
Dansveen4-Feb-19 2:02 
Question_findfirst and fopen very slow Pin
cristiapi31-Jan-19 1:13
cristiapi31-Jan-19 1:13 
QuestionRe: _findfirst and fopen very slow Pin
David Crow31-Jan-19 3:50
David Crow31-Jan-19 3:50 
AnswerRe: _findfirst and fopen very slow Pin
cristiapi31-Jan-19 3:58
cristiapi31-Jan-19 3:58 
QuestionRe: _findfirst and fopen very slow Pin
David Crow31-Jan-19 4:23
David Crow31-Jan-19 4:23 
AnswerRe: _findfirst and fopen very slow Pin
cristiapi31-Jan-19 5:34
cristiapi31-Jan-19 5:34 
QuestionRe: _findfirst and fopen very slow Pin
David Crow31-Jan-19 6:01
David Crow31-Jan-19 6:01 
AnswerRe: _findfirst and fopen very slow Pin
cristiapi31-Jan-19 6:07
cristiapi31-Jan-19 6:07 
GeneralRe: _findfirst and fopen very slow Pin
David Crow31-Jan-19 6:14
David Crow31-Jan-19 6:14 
QuestionRe: _findfirst and fopen very slow Pin
jeron131-Jan-19 4:58
jeron131-Jan-19 4: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.