Click here to Skip to main content
15,925,723 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Convert CString to int or float Pin
Trupti Mehta14-Jul-08 1:04
Trupti Mehta14-Jul-08 1:04 
GeneralRe: Convert CString to int or float Pin
CPallini14-Jul-08 1:47
mveCPallini14-Jul-08 1:47 
GeneralRe: Convert CString to int or float Pin
Trupti Mehta14-Jul-08 3:35
Trupti Mehta14-Jul-08 3:35 
AnswerRe: Convert CString to int or float Pin
killabyte11-Jul-08 2:32
killabyte11-Jul-08 2:32 
GeneralOT Pin
CPallini11-Jul-08 2:53
mveCPallini11-Jul-08 2:53 
GeneralRe: OT Pin
killabyte11-Jul-08 2:57
killabyte11-Jul-08 2:57 
JokeRe: OT Pin
SandipG 11-Jul-08 3:07
SandipG 11-Jul-08 3:07 
QuestionRe: Convert CString to int or float Pin
David Crow11-Jul-08 2:55
David Crow11-Jul-08 2:55 
AnswerRe: Convert CString to int or float Pin
Mark Salsbery11-Jul-08 5:46
Mark Salsbery11-Jul-08 5:46 
QuestionCFile Vs CStdioFile Pin
nisha0000011-Jul-08 1:38
nisha0000011-Jul-08 1:38 
AnswerRe: CFile Vs CStdioFile Pin
CPallini11-Jul-08 1:49
mveCPallini11-Jul-08 1:49 
AnswerRe: CFile Vs CStdioFile Pin
Varghese Paul M11-Jul-08 1:50
Varghese Paul M11-Jul-08 1:50 
QuestionControl Panel Pin
shakils11-Jul-08 0:55
shakils11-Jul-08 0:55 
QuestionRe: Control Panel Pin
David Crow11-Jul-08 2:56
David Crow11-Jul-08 2:56 
AnswerRe: Control Panel Pin
shakils14-Jul-08 3:04
shakils14-Jul-08 3:04 
GeneralRe: Control Panel Pin
David Crow14-Jul-08 8:18
David Crow14-Jul-08 8:18 
GeneralRe: Control Panel Pin
shakils17-Jul-08 2:44
shakils17-Jul-08 2:44 
Questionload a bitmap to Picture Box from a path in database field Pin
Waguih11-Jul-08 0:37
Waguih11-Jul-08 0:37 
QuestionRe: load a bitmap to Picture Box from a path in database field Pin
Varghese Paul M11-Jul-08 0:50
Varghese Paul M11-Jul-08 0:50 
AnswerRe: load a bitmap to Picture Box from a path in database field Pin
Waguih12-Jul-08 3:21
Waguih12-Jul-08 3:21 
AnswerRe: load a bitmap to Picture Box from a path in database field Pin
Waguih12-Jul-08 3:32
Waguih12-Jul-08 3:32 
QuestionRe: load a bitmap to Picture Box from a path in database field Pin
CPallini11-Jul-08 0:54
mveCPallini11-Jul-08 0:54 
AnswerRe: load a bitmap to Picture Box from a path in database field Pin
Waguih12-Jul-08 3:37
Waguih12-Jul-08 3:37 
I gave the picture box a static control
the program fill all the Edit box aith the string variables I gave him but for the picture box he treated the field as a string not a file path here is my code hope you can tell me what is wrong with it
void CFilmsView::OnPaint()
{
strPictureName=m_pSet->m_P1;
strPictureName=("E:\\BMP\\Hany\\Jimy1.bmp");
CPaintDC dc(this); // device context for painting

// TODO: Add your message handler code here

// TODO: Add your control notification handler code here
HBITMAP bmpHandle = (HBITMAP)LoadImage(NULL,strPictureName,IMAGE_BITMAP,
0,0,LR_LOADFROMFILE);
LoadBitmap(0,strPictureName);
CBitmap bmpPicture;
CDC mdcPicture;
CBitmap *bmpFromHandle = bmpPicture.FromHandle(bmpHandle);

CRect rctPicture;
m_Picture1.GetWindowRect(&rctPicture);


mdcPicture.CreateCompatibleDC(&dc);
CBitmap * bmpPrevious = mdcPicture.SelectObject(bmpFromHandle);

ScreenToClient(&rctPicture);

dc.BitBlt(rctPicture.left, rctPicture.top,
rctPicture.Width(), rctPicture.Height(),
&mdcPicture, 0, 0, SRCCOPY);

dc.SelectObject(bmpPrevious);
DeleteObject(bmpHandle);
// Do not call CDaoRecordView::OnPaint() for painting messages
}

I am a Civil Engineer, graduated in 1969, I've a wide experience in quite many fields of civil engineering, aswellas in HR development, Quality assurance, planning and QC,
I've been employed by Consultant Offices, Contractor Companies,
I did services for both Public Sectors and Private Sectors,
I've been in charge in Projects located inside and outside Egypt,
I've dealt with both Arabic companies and American Companies.
All these movements have given me a great variety of experiences.

QuestionSetup & related for EVC application Pin
Trupti Mehta11-Jul-08 0:29
Trupti Mehta11-Jul-08 0:29 
QuestionTree Control Pin
john563210-Jul-08 23:58
john563210-Jul-08 23:58 

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.