Click here to Skip to main content
16,007,126 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Spying Messages Pin
khan++24-Sep-05 0:10
khan++24-Sep-05 0:10 
QuestiononKeyDown() problem Pin
hamidreza_buddy23-Sep-05 22:55
hamidreza_buddy23-Sep-05 22:55 
AnswerRe: onkeydown() problem Pin
khan++23-Sep-05 23:10
khan++23-Sep-05 23:10 
GeneralRe: onkeydown() problem Pin
hamidreza_buddy23-Sep-05 23:31
hamidreza_buddy23-Sep-05 23:31 
QuestionScaling Bitmapp Pin
Anonymous23-Sep-05 22:35
Anonymous23-Sep-05 22:35 
AnswerRe: Scaling Bitmapp Pin
khan++23-Sep-05 22:58
khan++23-Sep-05 22:58 
AnswerRe: Scaling Bitmapp Pin
Achim Klein24-Sep-05 0:38
Achim Klein24-Sep-05 0:38 
GeneralRe: Scaling Bitmapp Pin
John R. Shaw24-Sep-05 9:16
John R. Shaw24-Sep-05 9:16 
Looks good! But you should eliminate all thoses unneeded news. The only new required by your code is that used to allocate zoomed. If any one of the news (except the first one) was to throw an exception, your code would leak memory.

If you modified the code to take another CBitmap argument to store the results, then you could elimimate all allocation. That way the user of the ZoomBitmap function would not need to know that they are responsible for deleting the returned pointer via delete, unles they had allocated it themselfs.

 Exmaple:
BOOL ZoomBitmap(Bitmap& zoomed, Bitmap& srcBitmap, const CRect& FitInto )
{...}<br>
void OnZoom()
{
CBitmap zoomed;
if( ZoomBitmap(zoomed,srcBitmap,FitInto) )
    // do some thing with zoomed
}


Oh well, just some minor observations...


INTP
Every thing is relative...
QuestionFile Search Pin
nvamshi23-Sep-05 21:04
nvamshi23-Sep-05 21:04 
AnswerRe: File Search Pin
khan++23-Sep-05 21:16
khan++23-Sep-05 21:16 
AnswerRe: File Search Pin
ThatsAlok23-Sep-05 21:28
ThatsAlok23-Sep-05 21:28 
Questionread buffer problem Pin
meiyueh23-Sep-05 20:38
meiyueh23-Sep-05 20:38 
AnswerRe: read buffer problem Pin
billiam90423-Sep-05 21:48
billiam90423-Sep-05 21:48 
QuestionInfo on KEY_EXECUTE and DeleteKeyEx Pin
reg-user23-Sep-05 20:11
sussreg-user23-Sep-05 20:11 
AnswerRe: Info on KEY_EXECUTE and DeleteKeyEx Pin
khan++23-Sep-05 20:55
khan++23-Sep-05 20:55 
GeneralRe: Info on KEY_EXECUTE and DeleteKeyEx Pin
reg-user23-Sep-05 21:06
sussreg-user23-Sep-05 21:06 
GeneralRe: Info on KEY_EXECUTE and DeleteKeyEx Pin
khan++23-Sep-05 21:13
khan++23-Sep-05 21:13 
QuestionDebugging in an activeX control Pin
aasstt23-Sep-05 19:41
aasstt23-Sep-05 19:41 
AnswerRe: Debugging in an activeX control Pin
khan++23-Sep-05 20:40
khan++23-Sep-05 20:40 
Questionglobal buffer or passing by reference? Pin
billiam90423-Sep-05 16:20
billiam90423-Sep-05 16:20 
AnswerRe: global buffer or passing by reference? Pin
khan++23-Sep-05 20:44
khan++23-Sep-05 20:44 
GeneralRe: global buffer or passing by reference? Pin
billiam90423-Sep-05 22:00
billiam90423-Sep-05 22:00 
GeneralRe: global buffer or passing by reference? Pin
khan++23-Sep-05 22:54
khan++23-Sep-05 22:54 
GeneralRe: global buffer or passing by reference? Pin
billiam90424-Sep-05 13:05
billiam90424-Sep-05 13:05 
GeneralRe: global buffer or passing by reference? Pin
Achim Klein25-Sep-05 5:31
Achim Klein25-Sep-05 5:31 

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.