|
I am rather new to MFC and am currently trying to BS my way through it, but I am having a few problems.
First, I am wanting to create a control that is similar to what you would find in Windows Task Manager (multi-column, vertical scrolling, selectable and sortable) but I can't seem to find the control that will work. Is this a modified ListBox or is it a custom control. I tried searching for it but don't really know what I'm looking for.
Second, why doesn't my dialog use the theme of Windows. It does in the resource editor but not when run. I've tried googleing but again, I'm not really sure where I should be looking.
Any help is appreciated.
Thanks,
Dustin
|
|
|
|
|
|
Dustin Henry wrote: I am wanting to create a control that is similar to what you would find in Windows Task Manager (multi-column, vertical scrolling, selectable and sortable) but I can't seem to find the control that will work. Is this a modified ListBox or is it a custom control.
That's a List-View control: List-View Control Reference[^]
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
That looks to be exactly what I was looking for. Thanks for the help.
|
|
|
|
|
Dustin Henry wrote: Is this a modified ListBox or is it a custom control.
Using Spy++, you'll note that it is a window belonging to the "SysListView32" class.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I am creating propertysheet wizard application with customized title bar color. To customize i have removed system menu by using ModifyStyle( WS_SYSMENU, 0). Now again i want to have WS_SYSMenu. Can any one help me?
Thanks,
Rameshkanth
|
|
|
|
|
There is a Saying in this part of the world:
If anyone shouts 'Urgent' and it does not affect your affairs, Sit back Silently, and watch fools give urgent answers.
LateNightsInNewry
|
|
|
|
|
ksrameshkanth wrote: i have removed system menu by using ModifyStyle( WS_SYSMENU, 0)
You can add a windows style by using same function. Read its doucumentation carefully.
And you have not read posting guidelines for sure. Nobody here is bound to answer you. So, dont use words like [urgetn],[please help]. Thats the reason, you have not get answered properly yet.
|
|
|
|
|
prasad_som wrote: So, dont use words like...[please help].
That sounds polite enough to me.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: That sounds polite enough to me.
It is.
|
|
|
|
|
So then why would you state to not use such words?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
He was complaining about the use of the word urgent, not the help please
|
|
|
|
|
JudyL_FL wrote: He was complaining about the use of the word urgent, not the help please
How do you infer that from:
So, dont use words like [urgetn],[please help].
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I'd strong objection using word [urgent], though you find word [help please] polite, most of the time used by either commanding sense or begging sense, and doesnt seen as appropriate word.
My observation is that such posts are ignored even if its trivial as this one.
|
|
|
|
|
hi i am opening a web page on clicking a button now i have to get the event when the user closes the web page how to do this
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
How about OnQuit or WindowClosing ?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi do you mean the event in Internet Development SDK or tracking the close of browser from VC++ application?
Best Regards,
Suman
|
|
|
|
|
deeps_cute wrote: i i am opening a web page on clicking a button now i have to get the event when the user closes the web page how to do this
OnClose.!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
CSize sz=dc.GetTextExtent(m_strText);
CPoint pt;
pt.x=m_ptOrg.x+sz.cx;
pt.y=m_ptOrg.y;
SetCaretPos(pt);
dc.TextOut(m_ptOrg.x,m_ptOrg.y,m_strText);
If execute in this order,the result is correct,the caret show at the end of the text,but if TextOut first then SetCaretPos,the caret also show at the end of the text,but there is always an afterimage of the caret before the last letter,don`t know why
|
|
|
|
|
Maybe hide the caret when drawing then show it after.
CSize sz=dc.GetTextExtent(m_strText);
CPoint pt;
pt.x=m_ptOrg.x+sz.cx;
pt.y=m_ptOrg.y;
HideCaret();
SetCaretPos(pt);
dc.TextOut(m_ptOrg.x,m_ptOrg.y,m_strText);
ShowCaret();
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
Thanks,your methord can solve my problem,but i dont know why there is always a afterimage,can you explan it to me?
|
|
|
|
|
Probably two threads doing GDI drawing at the same time. Depending on how the system draws/blinks
the caret, it may get mixed with your drawing.
Here's what the documentation states:
"Whenever your application redraws a screen while processing a message other than WM_PAINT, it
must make the caret invisible by using the HideCaret function. When your application is finished
drawing, redisplay the caret by using the ShowCaret function. If your application processes the
WM_PAINT message, it is not necessary to hide and redisplay the caret, because this function does
this automatically."
Mark
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
Thank U very much for your help,now I hand understood ,thanks!
|
|
|
|
|
hi,
i'm using visual c++ 6.0 and i have an overflow problem
i have to detect overflows from double variables, but i
don't know how to make it using exceptions...
i want to detect overflows in my own functions (not for the math.h functions)
for example, in the factorial function there's an overflow at fact(171):
double fact(long i){
double result;
if (i<0){
result=0.0;
}else if(i==0){
result=1.0;
}else{
result=i;
while (i!=1){
i--;
result=result*i;
}
}
return result;
}
well, there's not a real problem above because i know that exist an overflow at fact(171), but unfortunately i usually don't know what input parameters cause overflow
can anyone help me?
Thanks.
|
|
|
|
|
Check out _fpclass() or _finite()
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|