Click here to Skip to main content
15,917,731 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: avoiding or skipping Divide by zero crashes Pin
Heng Xiangzhong10-Apr-14 1:01
Heng Xiangzhong10-Apr-14 1:01 
GeneralRe: avoiding or skipping Divide by zero crashes Pin
manoharbalu10-Apr-14 1:51
manoharbalu10-Apr-14 1:51 
GeneralRe: e: avoiding or skipping Divide by zero crashes Pin
Richard MacCutchan10-Apr-14 2:22
mveRichard MacCutchan10-Apr-14 2:22 
AnswerRe: avoiding or skipping Divide by zero showing junk values Pin
Munchies_Matt10-Apr-14 5:53
Munchies_Matt10-Apr-14 5:53 
AnswerRe: avoiding or skipping Divide by zero showing junk values Pin
User 5924111-Apr-14 19:07
User 5924111-Apr-14 19:07 
QuestionCDHtmlDialog: Changing HTML File Dynamically Pin
Don Guy9-Apr-14 11:31
Don Guy9-Apr-14 11:31 
QuestionSetWindowText() style question Pin
econy9-Apr-14 4:24
econy9-Apr-14 4:24 
AnswerRe: SetWindowText() style question Pin
jeron19-Apr-14 5:06
jeron19-Apr-14 5:06 
AnswerRe: SetWindowText() style question Pin
Maximilien9-Apr-14 8:30
Maximilien9-Apr-14 8:30 
GeneralRe: SetWindowText() style question Pin
econy9-Apr-14 10:11
econy9-Apr-14 10:11 
GeneralRe: SetWindowText() style question Pin
Richard MacCutchan9-Apr-14 23:21
mveRichard MacCutchan9-Apr-14 23:21 
AnswerRe: SetWindowText() style question Pin
leon de boer22-Apr-14 22:16
leon de boer22-Apr-14 22:16 
Questionhow to Convert MFC based Windows application to web application Pin
manoharbalu8-Apr-14 23:53
manoharbalu8-Apr-14 23:53 
AnswerRe: how to Convert MFC based Windows application to web application Pin
CPallini9-Apr-14 1:52
mveCPallini9-Apr-14 1:52 
AnswerRe: how to Convert MFC based Windows application to web application Pin
Munchies_Matt9-Apr-14 4:58
Munchies_Matt9-Apr-14 4:58 
AnswerRe: how to Convert MFC based Windows application to web application Pin
Richard MacCutchan9-Apr-14 6:24
mveRichard MacCutchan9-Apr-14 6:24 
GeneralRe: how to Convert MFC based Windows application to web application Pin
Munchies_Matt9-Apr-14 10:54
Munchies_Matt9-Apr-14 10:54 
Questionvisual c++ code to read number of characters in the string entered in a text box Pin
Member 107151068-Apr-14 16:14
Member 107151068-Apr-14 16:14 
AnswerRe: visual c++ code to read number of characters in the string entered in a text box Pin
David Crow8-Apr-14 16:48
David Crow8-Apr-14 16:48 
GeneralRe: visual c++ code to read number of characters in the string entered in a text box Pin
Munchies_Matt9-Apr-14 10:56
Munchies_Matt9-Apr-14 10:56 
AnswerRe: visual c++ code to read number of characters in the string entered in a text box Pin
leon de boer21-Apr-14 23:25
leon de boer21-Apr-14 23:25 
QuestionNeed help on MemDC , Drawtext() coding Pin
econy8-Apr-14 10:08
econy8-Apr-14 10:08 
JokeMessage Removed Pin
8-Apr-14 10:55
pasztorpisti8-Apr-14 10:55 
AnswerRe: Need help on MemDC , Drawtext() coding Pin
leon de boer22-Apr-14 21:30
leon de boer22-Apr-14 21:30 
GetClientRect returns the area of the drawable area inside the window. It will usually return something like 0,0,width,height in your rect structure

GetWindowRect returns the co-ordinates of the Window itself relative to the upper left of the screen so they will be rather large.

If you try to use GetWindowRect co-ordinates to draw on the window they will be way outside the right and bottom and the drawing wont be visible unless you drag the window right up to the top left off screen.

You need to use GetClientRect co-ordinates to draw with.

Looking at your code I am guessing this line is the problem if you have a position problem

dc.BitBlt(137,107,176,50,&memDC,rect.left,rect.top,SRCCOPY);


Are you sure that is right?
QuestionCDC exist or not question Pin
econy8-Apr-14 2:28
econy8-Apr-14 2:28 

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.