Click here to Skip to main content
15,941,828 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
here is my code I hope you tell me what is wrong with it?
void CFilmsView::OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView)
{
// TODO: Add your specialized code here and/or call the base class

CDaoRecordView::OnActivateView(bActivate, pActivateView, pDeactiveView);
//CPaintDC dc(this);
CClientDC dc(this);
HBITMAP bmpHandle = (HBITMAP)LoadImage(NULL,strPictureName,IMAGE_BITMAP,
0,0,LR_COPYFROMRESOURCE);
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);

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.

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 
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 

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.