Click here to Skip to main content
15,887,746 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How can stretch an Image horizontally? Pin
Le@rner2-Dec-09 19:54
Le@rner2-Dec-09 19:54 
GeneralRe: How can stretch an Image horizontally? Pin
«_Superman_»2-Dec-09 19:55
professional«_Superman_»2-Dec-09 19:55 
GeneralRe: How can stretch an Image horizontally? Pin
Le@rner2-Dec-09 20:03
Le@rner2-Dec-09 20:03 
GeneralRe: How can stretch an Image horizontally? Pin
«_Superman_»2-Dec-09 20:06
professional«_Superman_»2-Dec-09 20:06 
GeneralRe: How can stretch an Image horizontally? Pin
Le@rner2-Dec-09 22:04
Le@rner2-Dec-09 22:04 
QuestionRe: How can stretch an Image horizontally? Pin
David Crow3-Dec-09 3:11
David Crow3-Dec-09 3:11 
GeneralRe: How can stretch an Image horizontally? Pin
«_Superman_»3-Dec-09 5:13
professional«_Superman_»3-Dec-09 5:13 
GeneralRe: How can stretch an Image horizontally? Pin
Le@rner3-Dec-09 18:05
Le@rner3-Dec-09 18:05 
CDC* dc=this->GetDC();
HDC memdc;
this->GetClientRect(&rect);
CBitmap bitmap;
bitmap.LoadBitmapA(IDB_HEADER);
BITMAP bm;
bitmap.GetBitmap(&bm);
int w = bm.bmWidth;
int h = bm.bmHeight;
memdc=::CreateCompatibleDC(dc->m_hDC);
::SelectObject(memdc,bitmap);
StretchBlt(dc->m_hDC,0,0,rect.Width(),50,memdc,0,0,w,h,SRCCOPY);
CString Title="";
m_Banner.GetWindowTextA(Title);
dc->SelectObject(m_Banner.GetFont());
dc->SetBkMode(TRANSPARENT);
dc->DrawText(Title, rect, DT_CENTER | DT_WORDBREAK);


i do like this.

To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.

GeneralRe: How can stretch an Image horizontally? Pin
Le@rner6-Dec-09 23:38
Le@rner6-Dec-09 23:38 
QuestionPrinting Unicode Characters Pin
Benjamin Bruno2-Dec-09 19:27
Benjamin Bruno2-Dec-09 19:27 
AnswerRe: Printing Unicode Characters Pin
«_Superman_»2-Dec-09 19:38
professional«_Superman_»2-Dec-09 19:38 
GeneralRe: Printing Unicode Characters Pin
Benjamin Bruno2-Dec-09 20:26
Benjamin Bruno2-Dec-09 20:26 
QuestionRecover last saved data Pin
sonualex2-Dec-09 18:29
sonualex2-Dec-09 18:29 
AnswerRe: Recover last saved data Pin
Rajesh R Subramanian2-Dec-09 18:52
professionalRajesh R Subramanian2-Dec-09 18:52 
QuestionRe: Recover last saved data Pin
David Crow3-Dec-09 3:13
David Crow3-Dec-09 3:13 
AnswerRe: Recover last saved data Pin
sonualex7-Dec-09 19:49
sonualex7-Dec-09 19:49 
AnswerRe: Recover last saved data Pin
David Crow8-Dec-09 3:29
David Crow8-Dec-09 3:29 
GeneralRe: Recover last saved data Pin
sonualex8-Dec-09 19:33
sonualex8-Dec-09 19:33 
QuestionRe: Recover last saved data Pin
David Crow9-Dec-09 2:10
David Crow9-Dec-09 2:10 
AnswerRe: Recover last saved data Pin
sonualex14-Dec-09 0:45
sonualex14-Dec-09 0:45 
AnswerRe: Recover last saved data Pin
David Crow15-Dec-09 4:48
David Crow15-Dec-09 4:48 
QuestionSetWindowTitle Header File Pin
002comp2-Dec-09 18:10
002comp2-Dec-09 18:10 
AnswerRe: SetWindowTitle Header File Pin
KingsGambit2-Dec-09 18:19
KingsGambit2-Dec-09 18:19 
GeneralRe: SetWindowTitle Header File [modified] Pin
002comp2-Dec-09 18:34
002comp2-Dec-09 18:34 
GeneralRe: SetWindowTitle Header File Pin
Madhu Nair2-Dec-09 18:43
Madhu Nair2-Dec-09 18:43 

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.