Click here to Skip to main content
15,891,184 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Visual C++ and XML Pin
User 665818-Jan-04 2:29
User 665818-Jan-04 2:29 
GeneralRe: Visual C++ and XML Pin
Deian18-Jan-04 3:45
Deian18-Jan-04 3:45 
GeneralRe: Visual C++ and XML Pin
User 665818-Jan-04 4:07
User 665818-Jan-04 4:07 
GeneralRe: Visual C++ and XML Pin
Deian18-Jan-04 4:16
Deian18-Jan-04 4:16 
GeneralDevice Context Bits Pin
hadas-dvp17-Jan-04 21:42
hadas-dvp17-Jan-04 21:42 
GeneralRe: Device Context Bits Pin
SiddharthAtw18-Jan-04 21:53
SiddharthAtw18-Jan-04 21:53 
GeneralRe: Device Context Bits Pin
hadas-dvp18-Jan-04 22:32
hadas-dvp18-Jan-04 22:32 
Generaldraw image on dialog Pin
zecodela17-Jan-04 20:50
zecodela17-Jan-04 20:50 
hi,
i am drawing a image on dialog. i tried 2 methods but seems not work.

i do sth like this at OnPaint()
void CRlscoreDlg::OnPaint()
{
if (IsIconic())
{
}
else
{
// method 1
CPaintDC pdc(this);
Graphics graphics(pdc);
int showWidth = 240;
int showHeight = 180;
Bitmap b(L"c:\\335\\image.bmp");
Image *img = b.GetThumbnailImage(showWidth,showHeight, NULL,NULL);
graphics.DrawImage(img,10,10,showWidth,showHeight);
/*
// method 2
HWND hwndStill = NULL;
// IDC_STILL is the picture box
this->GetDlgItem( IDC_STILL, &hwndStill );
RECT rc;
::GetWindowRect( hwndStill, &rc );
long lStillWidth = rc.right - rc.left;
long lStillHeight = rc.bottom - rc.top;
HDC hdcStill = ::GetDC( hwndStill );
Graphics g(hdcStill);
g.DrawImage(bb,0,0,b.GetWidth(),b.GetHeight());
*/
CDialog::OnPaint();
}
}


in method 1, the image cant be shown on startup sometimes. but, after minimize and restore it, the image appear!

in method 2, the image just cant display!

any help? ah! i am using gdi+ but i dont think it the problem.

thanks,
jim
GeneralGetCurrentPosition Pin
Anonymous17-Jan-04 20:10
Anonymous17-Jan-04 20:10 
GeneralRe: GetCurrentPosition Pin
Michael Dunn18-Jan-04 6:58
sitebuilderMichael Dunn18-Jan-04 6:58 
GeneralRe: GetCurrentPosition Pin
фил21-Jan-04 4:57
фил21-Jan-04 4:57 
GeneralUsing cximage Pin
hurr1can317-Jan-04 19:59
hurr1can317-Jan-04 19:59 
GeneralProblems with AsyncSocket ( help help help ). Pin
conarius17-Jan-04 19:57
conarius17-Jan-04 19:57 
GeneralRe: Problems with AsyncSocket ( help help help ). Pin
Alexander M.,18-Jan-04 8:35
Alexander M.,18-Jan-04 8:35 
GeneralRe: Problems with AsyncSocket ( help help help ). Pin
Anonymous19-Jan-04 11:47
Anonymous19-Jan-04 11:47 
GeneralGetting Window Create Event Pin
Avya17-Jan-04 17:39
Avya17-Jan-04 17:39 
Generaladding files to the code Pin
Belaluchealias17-Jan-04 16:48
Belaluchealias17-Jan-04 16:48 
GeneralRe: adding files to the code Pin
Michael Dunn17-Jan-04 19:31
sitebuilderMichael Dunn17-Jan-04 19:31 
GeneralRe: adding files to the code Pin
Deian18-Jan-04 0:31
Deian18-Jan-04 0:31 
GeneralRe: adding files to the code Pin
Alexander M.,18-Jan-04 8:30
Alexander M.,18-Jan-04 8:30 
GeneralRe: adding files to the code Pin
Belaluchealias20-Jan-04 17:14
Belaluchealias20-Jan-04 17:14 
GeneralMultiLine CListCtrl Pin
bitpusher17-Jan-04 14:04
bitpusher17-Jan-04 14:04 
GeneralRe: MultiLine CListCtrl Pin
Mike Dimmick18-Jan-04 2:21
Mike Dimmick18-Jan-04 2:21 
GeneralOpen image file for processing; Pin
Bo Hunter17-Jan-04 13:47
Bo Hunter17-Jan-04 13:47 
GeneralRe: Open image file for processing; Pin
Alexander M.,18-Jan-04 8:32
Alexander M.,18-Jan-04 8:32 

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.