Click here to Skip to main content
15,949,686 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Is it "ok" to get array length this way Pin
gethomast2-Jun-09 2:28
gethomast2-Jun-09 2:28 
QuestionMDI without FileNew message at startup Pin
transoft1-Jun-09 9:09
transoft1-Jun-09 9:09 
AnswerRe: MDI without FileNew message at startup Pin
David Crow1-Jun-09 9:35
David Crow1-Jun-09 9:35 
Questionhelp Pin
ramina sen1-Jun-09 8:33
ramina sen1-Jun-09 8:33 
QuestionRe: help Pin
David Crow1-Jun-09 9:35
David Crow1-Jun-09 9:35 
AnswerRe: help Pin
Michael Schubert1-Jun-09 22:00
Michael Schubert1-Jun-09 22:00 
QuestionCView::OnFilePrintPreview Pin
Software20071-Jun-09 7:35
Software20071-Jun-09 7:35 
QuestionAdd a scrollbar when I StrechtBlt() an image? Pin
Episodio11-Jun-09 6:44
Episodio11-Jun-09 6:44 
I'm new in Visual C++

I've made an empty DIALOG where I load a floor layout (BMP resource) and then I draw on it a dot indicating my position (dot = dot.bmp as a resource as well)
I added a ZOOM button (boolean). If user presses it image would be zoomed-in tweaking STRECHTBLT

void CDisplayDlg::OnPaint()
{

     //Code to show floor layout
	HBITMAP	hBmpL1=::LoadBitmap(AfxGetResourceHandle(), 
                                           MAKEINTRESOURCE(IDB_DISPLAY_BITMAP));
	CRect rc;
	this->GetClientRect(&rc);
	HDC hdc1 = ::GetDC(this->m_hWnd);
	HDC hdcmem = ::CreateCompatibleDC(hdc1);
	::SelectObject(hdcmem,hBmpL1);

	if (zoom)      //  zoom = x1.7 (620 pixels into 364 pixels)
	{
    	    ::StretchBlt(hdc1, 0,0, 364, 64, hdcmem,0,0, 620, 109,SRCCOPY);
	}
	else     // we see full BMP (620 pixels resized to 205pixels)
	{
	    ::StretchBlt(hdc1, 0,0, 205, 37, hdcmem,0,0, 620, 109,SRCCOPY);
	}

// Then I show user location with dot.bmp
}


screencap: http://telefonica.net/web/episodio1/cap001.gif[^]

I dont know how to add horizontal scroll bar to my image when I zoom. If I add scrollbar to my whole dialog it doesn't do anything.


Thanks.
QuestionAfter response WM_DRAWITEM message , how to make a function that it is similar to CMemu::SetMenuItemBitmaps [modified] Pin
bdwzz1-Jun-09 5:53
bdwzz1-Jun-09 5:53 
Questionthreading differences VC6 v VS2005 Pin
Chris Losinger1-Jun-09 4:29
professionalChris Losinger1-Jun-09 4:29 
AnswerRe: threading differences VC6 v VS2005 Pin
Luc Pattyn1-Jun-09 4:52
sitebuilderLuc Pattyn1-Jun-09 4:52 
GeneralRe: threading differences VC6 v VS2005 Pin
Chris Losinger1-Jun-09 5:10
professionalChris Losinger1-Jun-09 5:10 
GeneralRe: threading differences VC6 v VS2005 Pin
Luc Pattyn1-Jun-09 5:49
sitebuilderLuc Pattyn1-Jun-09 5:49 
GeneralRe: threading differences VC6 v VS2005 Pin
Chris Losinger1-Jun-09 6:15
professionalChris Losinger1-Jun-09 6:15 
GeneralRe: threading differences VC6 v VS2005 Pin
Randor 1-Jun-09 7:14
professional Randor 1-Jun-09 7:14 
GeneralRe: threading differences VC6 v VS2005 Pin
ZelionThunder2-Jun-09 17:43
ZelionThunder2-Jun-09 17:43 
GeneralRe: threading differences VC6 v VS2005 Pin
Luc Pattyn1-Jun-09 6:03
sitebuilderLuc Pattyn1-Jun-09 6:03 
GeneralRe: threading differences VC6 v VS2005 Pin
Chris Losinger1-Jun-09 6:16
professionalChris Losinger1-Jun-09 6:16 
AnswerRe: threading differences VC6 v VS2005 Pin
Joe Woodbury1-Jun-09 7:50
professionalJoe Woodbury1-Jun-09 7:50 
GeneralRe: threading differences VC6 v VS2005 Pin
Chris Losinger1-Jun-09 7:53
professionalChris Losinger1-Jun-09 7:53 
QuestionGadjet integration with IE toolbar? Pin
ritz12341-Jun-09 4:16
ritz12341-Jun-09 4:16 
QuestionIn Window forms application C++ Pin
wael_r1-Jun-09 3:33
wael_r1-Jun-09 3:33 
AnswerRe: In Window forms application C++ Pin
David Crow1-Jun-09 3:45
David Crow1-Jun-09 3:45 
AnswerRe: In Window forms application C++ Pin
fanronghua1-Jun-09 19:25
fanronghua1-Jun-09 19:25 
QuestionTyping in Unicode language Pin
Benjamin Bruno1-Jun-09 3:32
Benjamin Bruno1-Jun-09 3: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.