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

C / C++ / MFC

 
QuestionExceptions after building for Release, but building for Debug mode is OK? Pin
jerry1211a18-May-04 11:12
jerry1211a18-May-04 11:12 
AnswerRe: Exceptions after building for Release, but building for Debug mode is OK? Pin
Marcus Spitzmiller18-May-04 12:53
Marcus Spitzmiller18-May-04 12:53 
GeneralRe: Exceptions after building for Release, but building for Debug mode is OK? Pin
jerry1211a18-May-04 14:27
jerry1211a18-May-04 14:27 
GeneralRe: Exceptions after building for Release, but building for Debug mode is OK? Pin
Marcus Spitzmiller19-May-04 4:43
Marcus Spitzmiller19-May-04 4:43 
AnswerRe: Exceptions after building for Release, but building for Debug mode is OK? Pin
David Crow19-May-04 4:11
David Crow19-May-04 4:11 
GeneralSplitter with a Form and a Document Pin
Charlie Curtis18-May-04 10:03
Charlie Curtis18-May-04 10:03 
QuestionCan anyone help me understand this code better? Pin
BrockVnm18-May-04 9:57
BrockVnm18-May-04 9:57 
AnswerRe: Can anyone help me understand this code better? Pin
Christian Graus18-May-04 11:29
protectorChristian Graus18-May-04 11:29 
BrockVnm wrote:
CClientDC dc(this);

This creates a device context out of the current window. A DC is what you draw on.

Your app is obviously Doc/View, because OnPrepareDC is a function in the CView class. It's generally called by the framework before the OnPaint method.

DPToLP converts an array of points from co-ordinates in device units, into co-ordinates in logical units.

The net result is that this guy is an idiot. He's grabbing the device context and mangling with it in order to work out the point that the mouse is over, relative to the window instead of the screen. The CWnd class has methods to do this directly ( ScreenToClient and ClientToScreen, from memory ).


Christian

I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
GeneralRe: Can anyone help me understand this code better? Pin
Ryan Binns18-May-04 18:39
Ryan Binns18-May-04 18:39 
Generali need to get the chat text of msm messanger Pin
Member 96792618-May-04 9:28
Member 96792618-May-04 9:28 
GeneralRe: i need to get the chat text of msm messanger Pin
Member 42102519-May-04 10:35
Member 42102519-May-04 10:35 
GeneralSerial Port Communication in WinXP (or NT/2000) Pin
AnotherProgrammer18-May-04 8:52
AnotherProgrammer18-May-04 8:52 
GeneralRe: Serial Port Communication in WinXP (or NT/2000) Pin
Antti Keskinen18-May-04 9:07
Antti Keskinen18-May-04 9:07 
GeneralRe: Serial Port Communication in WinXP (or NT/2000) Pin
AnotherProgrammer18-May-04 9:56
AnotherProgrammer18-May-04 9:56 
GeneralRe: Serial Port Communication in WinXP (or NT/2000) Pin
Antti Keskinen18-May-04 20:40
Antti Keskinen18-May-04 20:40 
GeneralRe: Serial Port Communication in WinXP (or NT/2000) Pin
closecall18-May-04 15:07
closecall18-May-04 15:07 
GeneralRe: Serial Port Communication in WinXP (or NT/2000) Pin
valikac18-May-04 16:51
valikac18-May-04 16:51 
GeneralHelp needed urgent! Pin
ben218-May-04 7:13
ben218-May-04 7:13 
GeneralRe: Help needed urgent! Pin
David Crow18-May-04 7:17
David Crow18-May-04 7:17 
GeneralRe: Help needed urgent! Pin
ben218-May-04 7:32
ben218-May-04 7:32 
GeneralRe: Help needed urgent! Pin
David Crow18-May-04 7:45
David Crow18-May-04 7:45 
Questionhow to change window icon Pin
vividtang18-May-04 7:01
vividtang18-May-04 7:01 
AnswerRe: how to change window icon Pin
David Crow18-May-04 7:15
David Crow18-May-04 7:15 
GeneralRe: how to change window icon Pin
vividtang18-May-04 7:19
vividtang18-May-04 7:19 
GeneralRe: how to change window icon Pin
David Crow18-May-04 7:21
David Crow18-May-04 7:21 

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.