Click here to Skip to main content
16,005,206 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Dll protection Pin
Hamid_RT16-Mar-07 0:40
Hamid_RT16-Mar-07 0:40 
GeneralRe: Dll protection Pin
Rajesh R Subramanian16-Mar-07 1:00
professionalRajesh R Subramanian16-Mar-07 1:00 
GeneralRe: Dll protection Pin
Hamid_RT16-Mar-07 1:13
Hamid_RT16-Mar-07 1:13 
AnswerRe: Dll protection Pin
Roger Stoltz16-Mar-07 0:47
Roger Stoltz16-Mar-07 0:47 
AnswerRe: Dll protection Pin
ThatsAlok16-Mar-07 1:09
ThatsAlok16-Mar-07 1:09 
GeneralClickety Police - Link not working! Pin
Rajesh R Subramanian16-Mar-07 1:20
professionalRajesh R Subramanian16-Mar-07 1:20 
GeneralRe: Clickety Police - Link not working! Pin
ThatsAlok16-Mar-07 1:42
ThatsAlok16-Mar-07 1:42 
QuestionHow can i set icon and caption on my window's titlebar? Pin
amitmistry_petlad 16-Mar-07 0:25
amitmistry_petlad 16-Mar-07 0:25 
For ABOUTBOX in my applicaion.

I have use IDD_DIALOGBAR as about box in that dialogbar. I have set the following property.
Border:Thin
Center:True
Style :Overlapped
most of things are false.


the code is below
whenuser click on hyperlink it call from here
case IDC_STATIC_ABOUT:<br />
           //Display About dialog box.<br />
           DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWndStatic, About);<br />
           break;<br />


// Message handler for about box.
INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
	UNREFERENCED_PARAMETER(lParam);
	HDC hdc;
	//HDC memDC;
	HBRUSH hBrush = NULL;
	RECT rc;
	PAINTSTRUCT ps;
	//HBITMAP hBmpAbout;
	switch (message)
	{
	case WM_INITDIALOG:
		return (INT_PTR)TRUE;
	case WM_PAINT:
		//Fill the PAINTSTRUCT structure with information about painting and return the handle to the display device context.
		hdc = BeginPaint(hDlg,&ps);
		//Retrieves the coordinates of windows Client area.
		GetClientRect(hDlg, &rc);
		//Create a logical brush with specified color to paint the window.
		hBrush = CreateSolidBrush(RGB(69,13,24));
		//Fill the client area with above color.
		FillRect(hdc, &rc, hBrush);
		//End of painting in this window.
		EndPaint(hDlg, &ps);
		//Delete the logical brush.
		DeleteObject(hBrush);
		break;
	case WM_CTLCOLORSTATIC:
		//Color all static controls.
		//Create a logical brush with specified color
		hBrush = CreateSolidBrush(RGB(69,13,24));
		//Set text color as white.
		SetTextColor((HDC)wParam,RGB(255,255,255));		
		//Do not change the background.
		SetBkMode((HDC)wParam,TRANSPARENT);
		//Returning this brush will change the color of static controls to specified color
		return (LRESULT) hBrush;
	case WM_COMMAND:
		if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
		{
			//Delete the hBrush object.
			DeleteObject(hBrush);
			//Close the about window.
			EndDialog(hDlg, LOWORD(wParam));
			return (INT_PTR)TRUE;
		}
		break;
	}
	if(hBrush != NULL)
		DeleteObject(hBrush);
	return (INT_PTR)FALSE;
}




Now how can i set the icon/logo of my company with titlebar I also want titlebar,
can any one give me the idea for that?






Amit Mistry - petlad -Gujarat-India

AnswerRe: How can i set icon and caption on my window's titlebar? Pin
David Crow16-Mar-07 2:55
David Crow16-Mar-07 2:55 
JokeRe: How can i set icon and caption on my window's titlebar? Pin
prasad_som16-Mar-07 2:58
prasad_som16-Mar-07 2:58 
AnswerRe: How can i set icon and caption on my window's titlebar? Pin
prasad_som16-Mar-07 2:56
prasad_som16-Mar-07 2:56 
QuestionBitmapButton Controls - please help me Pin
deeps_cute15-Mar-07 23:24
deeps_cute15-Mar-07 23:24 
AnswerRe: BitmapButton Controls - please help me Pin
toxcct15-Mar-07 23:30
toxcct15-Mar-07 23:30 
GeneralRe: BitmapButton Controls - please help me Pin
deeps_cute15-Mar-07 23:33
deeps_cute15-Mar-07 23:33 
GeneralRe: BitmapButton Controls - please help me Pin
toxcct15-Mar-07 23:39
toxcct15-Mar-07 23:39 
GeneralRe: BitmapButton Controls - please help me Pin
deeps_cute16-Mar-07 0:13
deeps_cute16-Mar-07 0:13 
GeneralRe: BitmapButton Controls - please help me Pin
toxcct16-Mar-07 0:17
toxcct16-Mar-07 0:17 
QuestionRe: BitmapButton Controls - please help me Pin
prasad_som16-Mar-07 0:22
prasad_som16-Mar-07 0:22 
AnswerRe: BitmapButton Controls - please help me Pin
Paresh Chitte15-Mar-07 23:35
Paresh Chitte15-Mar-07 23:35 
AnswerRe: BitmapButton Controls - please help me Pin
prasad_som15-Mar-07 23:37
prasad_som15-Mar-07 23:37 
AnswerRe: BitmapButton Controls - please help me Pin
Hamid_RT16-Mar-07 0:52
Hamid_RT16-Mar-07 0:52 
GeneralRe: BitmapButton Controls - Thank u Pin
deeps_cute16-Mar-07 1:47
deeps_cute16-Mar-07 1:47 
GeneralRe: BitmapButton Controls - Thank u Pin
Hamid_RT16-Mar-07 7:14
Hamid_RT16-Mar-07 7:14 
QuestionObject Dump Pin
_808615-Mar-07 23:19
_808615-Mar-07 23:19 
AnswerRe: Object Dump Pin
toxcct15-Mar-07 23:22
toxcct15-Mar-07 23:22 

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.