|
brahmma wrote: Clickety Police - Link not working!
too much police roaming here these days
|
|
|
|
|
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 />
DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWndStatic, About);<br />
break;<br />
INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
UNREFERENCED_PARAMETER(lParam);
HDC hdc;
HBRUSH hBrush = NULL;
RECT rc;
PAINTSTRUCT ps;
switch (message)
{
case WM_INITDIALOG:
return (INT_PTR)TRUE;
case WM_PAINT:
hdc = BeginPaint(hDlg,&ps);
GetClientRect(hDlg, &rc);
hBrush = CreateSolidBrush(RGB(69,13,24));
FillRect(hdc, &rc, hBrush);
EndPaint(hDlg, &ps);
DeleteObject(hBrush);
break;
case WM_CTLCOLORSTATIC:
hBrush = CreateSolidBrush(RGB(69,13,24));
SetTextColor((HDC)wParam,RGB(255,255,255));
SetBkMode((HDC)wParam,TRANSPARENT);
return (LRESULT) hBrush;
case WM_COMMAND:
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
{
DeleteObject(hBrush);
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
|
|
|
|
|
amitmistry_petlad wrote: 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?
Send the WM_SETICON and WM_SETTEXT messages.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
,need to refresh page quite often, especially , if you are around.
|
|
|
|
|
amitmistry_petlad wrote: 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?
Use WM_SETICON .
::SendMessage(m_hDlg, WM_SETICON, FALSE, (LPARAM)hIcon);
|
|
|
|
|
hi i am having four butoons with bitmap image on them. i have to change the image when mouse moves over it. i cant understand the mouse event and i dont know how to change the image. how to code this please help me
|
|
|
|
|
you have to override WM_MOUSEMOVE and check that the mouse is over your control. if so, then you set the bitmap exactly like you set the first one...
|
|
|
|
|
how we know that the mouse is over our control?
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
read This[^] article. you gonna learn with fun
|
|
|
|
|
k how we know that the mouse is over the button. can we check it using the button id?
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
deeps_cute wrote: k how we know that the mouse is over the button. can we check it using the button id?
sorry ? i don't get you question...
|
|
|
|
|
Would you mind reading these articles before querying ?
|
|
|
|
|
Use below API CBitmapButton::LoadBitmaps
CBitmapButton::LoadBitmaps <br />
<br />
BOOL LoadBitmaps( LPCTSTR lpszBitmapResource, LPCTSTR lpszBitmapResourceSel = NULL, LPCTSTR lpszBitmapResourceFocus = NULL, LPCTSTR lpszBitmapResourceDisabled = NULL );<br />
<br />
BOOL LoadBitmaps( UINT nIDBitmapResource, UINT nIDBitmapResourceSel = 0, UINT nIDBitmapResourceFocus = 0, UINT nIDBitmapResourceDisabled = 0 );
Regards,
Paresh.
|
|
|
|
|
deeps_cute wrote: i have to change the image when mouse moves over it.
You need to handle WM_MOUSEMOVE for this. At the same time you need to use TrackMouseEvent to caputre WM_MOUSELEAVE .
Refer this[^] article by Niek Albers.
|
|
|
|
|
|
thank you all its working well
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
You're welcome,again we could help a human ;P
|
|
|
|
|
What's an Object dump? what's it use? can someone say it simple words?
286? WOWW!
|
|
|
|
|
_8086 wrote: What's an Object dump
it's a raw "picture" of the memory occupied by the object...
|
|
|
|
|
To detect memory leaks right?? How do we find memory has been leaked?
286? WOWW!
|
|
|
|
|
_8086 wrote: To detect memory leaks right??
no, only to see how the memory is filled.
_8086 wrote: How do we find memory has been leaked?
with tools like Visual Leak Detector[^]
|
|
|
|
|
_8086 wrote: How do we find memory has been leaked
See here[^]
|
|
|
|
|
Using MFC "Object dump" usually refers to an object that inherits from CObject.
Dumping an object means calling CObject::Dump( CDumpContext& ) on that object. The dump function will write relevant information to the dumping context (usually a debug window) about the object's state, memory usage and whatever the developer that created the object thought could be useful.
The object dumping technique is not unique for MFC-CObject-derived objects. It's really about having a base class with a virtual function that can be called during debug sessions.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Thanks.
286? WOWW!
|
|
|
|
|
Please refer this[^]
Regards,
Paresh.
|
|
|
|