Click here to Skip to main content
15,901,035 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
AnswerRe: Tree Control Pin
Varghese Paul M11-Jul-08 0:38
Varghese Paul M11-Jul-08 0:38 
GeneralRe: Tree Control Pin
john563211-Jul-08 0:43
john563211-Jul-08 0:43 
GeneralRe: Tree Control [modified] Pin
Varghese Paul M11-Jul-08 0:54
Varghese Paul M11-Jul-08 0:54 
GeneralRe: Tree Control Pin
Mark Salsbery11-Jul-08 5:48
Mark Salsbery11-Jul-08 5:48 
QuestionChanging bitmap of CBitmapButton Pin
AnithaSubramani10-Jul-08 23:49
AnithaSubramani10-Jul-08 23:49 
AnswerRe: Changing bitmap of CBitmapButton Pin
Varghese Paul M11-Jul-08 0:43
Varghese Paul M11-Jul-08 0:43 
GeneralRe: Changing bitmap of CBitmapButton Pin
AnithaSubramani11-Jul-08 1:21
AnithaSubramani11-Jul-08 1:21 
GeneralRe: Changing bitmap of CBitmapButton Pin
Varghese Paul M11-Jul-08 1:35
Varghese Paul M11-Jul-08 1:35 
GeneralRe: Changing bitmap of CBitmapButton Pin
AnithaSubramani11-Jul-08 2:51
AnithaSubramani11-Jul-08 2:51 
GeneralRe: Changing bitmap of CBitmapButton Pin
AnithaSubramani11-Jul-08 22:09
AnithaSubramani11-Jul-08 22:09 
Questionlistbox Pin
sanjayvenkat10-Jul-08 23:17
sanjayvenkat10-Jul-08 23:17 
AnswerRe: listbox Pin
CPallini10-Jul-08 23:37
mveCPallini10-Jul-08 23:37 
Questionget date from database using vc++ Pin
ani_ikram10-Jul-08 23:09
ani_ikram10-Jul-08 23:09 
Answer5th Repost please ignore!! [modified] Pin
SandipG 10-Jul-08 23:12
SandipG 10-Jul-08 23:12 
GeneralRe: 4th Repost please ignore!! Pin
KASR110-Jul-08 23:15
KASR110-Jul-08 23:15 

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.