Click here to Skip to main content
15,881,248 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Drawing lines, shapes on bitmaps Pin
Game-point15-Sep-09 19:54
Game-point15-Sep-09 19:54 
GeneralRe: Drawing lines, shapes on bitmaps Pin
«_Superman_»15-Sep-09 19:59
professional«_Superman_»15-Sep-09 19:59 
GeneralRe: Drawing lines, shapes on bitmaps Pin
Game-point15-Sep-09 20:05
Game-point15-Sep-09 20:05 
GeneralRe: Drawing lines, shapes on bitmaps Pin
Naveen15-Sep-09 20:16
Naveen15-Sep-09 20:16 
GeneralRe: Drawing lines, shapes on bitmaps Pin
Game-point15-Sep-09 20:36
Game-point15-Sep-09 20:36 
GeneralRe: Drawing lines, shapes on bitmaps Pin
Naveen15-Sep-09 20:39
Naveen15-Sep-09 20:39 
GeneralRe: Drawing lines, shapes on bitmaps Pin
Game-point15-Sep-09 20:42
Game-point15-Sep-09 20:42 
GeneralRe: Drawing lines, shapes on bitmaps Pin
Naveen15-Sep-09 21:00
Naveen15-Sep-09 21:00 
try the below code. If everthing goes fine, it will draw a rectangle on the top left portion of the image;

HDC pDC=::GetDC(0);
HDC TmpDC=CreateCompatibleDC(pDC);
CImage _image;
_image.Load(_T("//read.tif"));
int width=_image.GetWidth();
int height=_image.GetHeight();
HGDIOBJ TmpObj2 = SelectObject(TmpDC,(HGDIOBJ)(HBITMAP)_image);			
Rectangle(TmpDC, 0,0, width/2, height/2 );
SelectObject(TmpDC,TmpObj2);
ReleaseDC(pDC);



GeneralRe: Drawing lines, shapes on bitmaps Pin
Game-point15-Sep-09 21:33
Game-point15-Sep-09 21:33 
GeneralRe: Drawing lines, shapes on bitmaps Pin
Naveen15-Sep-09 21:35
Naveen15-Sep-09 21:35 
GeneralRe: Drawing lines, shapes on bitmaps Pin
Game-point15-Sep-09 21:51
Game-point15-Sep-09 21:51 
GeneralRe: Drawing lines, shapes on bitmaps Pin
Naveen15-Sep-09 21:52
Naveen15-Sep-09 21:52 
GeneralRe: Drawing lines, shapes on bitmaps Pin
Game-point15-Sep-09 21:58
Game-point15-Sep-09 21:58 
GeneralRe: Drawing lines, shapes on bitmaps Pin
Naveen15-Sep-09 22:07
Naveen15-Sep-09 22:07 
GeneralRe: Drawing lines, shapes on bitmaps Pin
Game-point15-Sep-09 22:19
Game-point15-Sep-09 22:19 
GeneralRe: Drawing lines, shapes on bitmaps Pin
Naveen15-Sep-09 22:22
Naveen15-Sep-09 22:22 
GeneralRe: Drawing lines, shapes on bitmaps Pin
Game-point15-Sep-09 22:32
Game-point15-Sep-09 22:32 
GeneralRe: Drawing lines, shapes on bitmaps Pin
Naveen15-Sep-09 22:36
Naveen15-Sep-09 22:36 
GeneralRe: Drawing lines, shapes on bitmaps Pin
Game-point15-Sep-09 23:39
Game-point15-Sep-09 23:39 
GeneralRe: Drawing lines, shapes on bitmaps Pin
Naveen15-Sep-09 23:45
Naveen15-Sep-09 23:45 
GeneralRe: Drawing lines, shapes on bitmaps Pin
Game-point15-Sep-09 23:51
Game-point15-Sep-09 23:51 
AnswerRe: Drawing lines, shapes on bitmaps - use Image Viewer Pin
Iain Clarke, Warrior Programmer15-Sep-09 21:17
Iain Clarke, Warrior Programmer15-Sep-09 21:17 
QuestionUse CEdit control in VC2005 Pin
liu3p15-Sep-09 17:13
liu3p15-Sep-09 17:13 
AnswerRe: Use CEdit control in VC2005 Pin
Naveen15-Sep-09 17:46
Naveen15-Sep-09 17:46 
GeneralRe: Use CEdit control in VC2005 Pin
«_Superman_»15-Sep-09 19:35
professional«_Superman_»15-Sep-09 19:35 

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.