Click here to Skip to main content
15,884,921 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to get the time taken by application Pin
David Crow7-Sep-05 7:32
David Crow7-Sep-05 7:32 
QuestionRe: How to get the time taken by application Pin
ThatsAlok7-Sep-05 19:01
ThatsAlok7-Sep-05 19:01 
AnswerRe: How to get the time taken by application Pin
David Crow8-Sep-05 2:12
David Crow8-Sep-05 2:12 
GeneralRe: How to get the time taken by application Pin
ThatsAlok8-Sep-05 17:59
ThatsAlok8-Sep-05 17:59 
QuestionPlease explain me the reason ??? Pin
Identity Undisclosed7-Sep-05 3:49
Identity Undisclosed7-Sep-05 3:49 
QuestionGetting and Setting Color of Toolbar Pin
Identity Undisclosed7-Sep-05 3:43
Identity Undisclosed7-Sep-05 3:43 
AnswerRe: Getting and Setting Color of Toolbar Pin
Mircea Puiu7-Sep-05 4:49
Mircea Puiu7-Sep-05 4:49 
QuestionHow to display icon on the screen??? Pin
eli150219797-Sep-05 3:24
eli150219797-Sep-05 3:24 
Hi,
In my app i need do draw a icon on a specific place(each time
on a different place).

I added the icon to my resources(it's ID is IDI_Target_ICON)
and I'm using this code(I want to display the targets on a thread) :
UINT ShowTargetsThread(LPVOID lpvoid)
{
	TargetsViewDlg *dlg = (TargetsViewDlg *)lpvoid;
	CDC *dc;
	CRect rect;
	int nX = 0 , nY = 0;
	HICON hIcon;
	HBRUSH hBrush = CreateSolidBrush(RGB(0, 0, 0));
		

	dc = dlg->m_TargetsViewBMP.GetDC();
	dlg->m_TargetsViewBMP.GetClientRect(&rect);
	//hIcon = (HICON)LoadImage(dlg->, MAKEINTRESOURCE(IDI_ON_ICON), IMAGE_ICON, 16, 16, LR_DEFAULTSIZE);


	for(int i = 0 ; i < 20 ; i++)
	{
		nX = (rect.right - rect.left) / 2;
		nY = rect.bottom - (i * 10);
		DrawIconEx((HDC)dc, nX , nY , hIcon, 16, 16, 0, (HBRUSH)hBrush, DI_IMAGE);

		Sleep(200);
	}
	return 1;
}


The problem is I don't know how to load the icon.

Anyone?

Regards,
EliD'Oh! | :doh:
AnswerRe: How to display icon on the screen??? Pin
Mircea Puiu7-Sep-05 4:53
Mircea Puiu7-Sep-05 4:53 
QuestionGetting Color of Control Pin
Identity Undisclosed7-Sep-05 1:59
Identity Undisclosed7-Sep-05 1:59 
AnswerRe: Getting Color of Control Pin
David Crow7-Sep-05 3:09
David Crow7-Sep-05 3:09 
GeneralRe: Getting Color of Control Pin
Identity Undisclosed7-Sep-05 3:40
Identity Undisclosed7-Sep-05 3:40 
GeneralRe: Getting Color of Control Pin
David Crow7-Sep-05 6:21
David Crow7-Sep-05 6:21 
QuestionActiveX control versioning Pin
Ahsan Askare7-Sep-05 1:35
Ahsan Askare7-Sep-05 1:35 
QuestionAlternate for file descriptor in .net Pin
AnkurGupta_19817-Sep-05 1:26
AnkurGupta_19817-Sep-05 1:26 
QuestionGuidelines on ActiveX with a web page Pin
Trollslayer7-Sep-05 1:16
mentorTrollslayer7-Sep-05 1:16 
QuestionRe: Guidelines on ActiveX with a web page Pin
dabs13-Oct-05 8:58
dabs13-Oct-05 8:58 
AnswerRe: Guidelines on ActiveX with a web page Pin
Trollslayer13-Oct-05 9:23
mentorTrollslayer13-Oct-05 9:23 
QuestionSet client rectangle Pin
johnnyXP7-Sep-05 0:35
johnnyXP7-Sep-05 0:35 
AnswerRe: Set client rectangle Pin
Bob Ciora7-Sep-05 0:53
Bob Ciora7-Sep-05 0:53 
AnswerRe: Set client rectangle Pin
David Crow7-Sep-05 3:11
David Crow7-Sep-05 3:11 
QuestionMS Word automation Pin
Ahsan Askare7-Sep-05 0:27
Ahsan Askare7-Sep-05 0:27 
QuestionToolbar Background Color Pin
Identity Undisclosed7-Sep-05 0:27
Identity Undisclosed7-Sep-05 0:27 
QuestionDraw icon next to edit control in combo box Pin
Skute7-Sep-05 0:15
Skute7-Sep-05 0:15 
Questionctrl-&gt;alt by hooking Pin
szeszike6-Sep-05 23:25
szeszike6-Sep-05 23:25 

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.