|
I would use floor(), as it might be less confusing than casting twice.
--
Marcus Kwok
|
|
|
|
|
Sorry, I'm afraid I have not made myself quite clear about the problem.
I do not want to truncate the double and assign it back to a double.
I have a program with lots of warnings about double to int assignments, and I want to gracefully get rid of these warnings, without modifying the default program behavior. As I have explained, my efforts so far (with casting and using round(x)) have been fruitless.
|
|
|
|
|
What about something like:
double d;<br />
int i;<br />
<br />
<br />
<br />
i = static_cast<int>(d);
--
Marcus Kwok
|
|
|
|
|
Hi,
I have a derived CFormView called CMyView. In this class there are DECLARE_DYNCREATE and IMPLEMENT_DYNCREATE Macros.
In my CMainFrame i have a Message Handler to catch a menu click.
void CMainFrame::OnFileMyview()
{
if ( m_pClass != NULL)
{
m_pClass = RUNTIME_CLASS(CMyView);
m_pMyView = (CMyView*)m_pClass->CreateObject("CMyView");
}
}
How do i get my CMyView to display in my window.
Thanks
Gary
|
|
|
|
|
|
Hi,
I would like to draw a transparent ellipse with the border RED
For that I have set the CPen and I have done : pdc->SelectObject(pen)
But with the brush ( CBrush ) in order to put : pdc->SelectObject(brush) , I don't wanna set any color...only transparent...cause this ellipse is going to be drawn on an existing draw that I want to keep
Help please!!!
Thanks
|
|
|
|
|
Try:
pdc->SelectStockObject( NULL_BRUSH );
Larry J. Siddens
|
|
|
|
|
My employer wants me to take a Brainbench Visual C++ test . The fact is that I have been coding for the most part using mFC. Just to see where I was placed , i took the test and scored a dismal 2.71 . The bar set by my employer is 4.0 . I would like to get information on preparation material for the test .
Thanks
|
|
|
|
|
I took that same test and scored about the same as you. I apparently don't know what I am doing, or the test is not a good indicator of what I do know.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Generally in a work environment , one gets to work on a limited area and the focus is on using the easiest framework to get the job done asap .The test covers all the areas under Visual C++ from device Contexts , OLE ,Active X , COM and general Win 32 stuff .
Why would my boss care if I used MFC or Win32 .
Employers should realize this .
Engineering is the effort !
|
|
|
|
|
act_x wrote:
Generally in a work environment , one gets to work on a limited area and the focus is on using the easiest framework to get the job done asap .The test covers all the areas under Visual C++ from device Contexts , OLE ,Active X , COM and general Win 32 stuff .
I knew all of that going into it. I just took the test for fun and because it was free.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
did you get to use CP (and/or google) like you would obviouslly do in _real_ life?
~Nitron.
ññòòïðïðB A start
|
|
|
|
|
I'm starting to work with stacks and binary search trees, I wanted to know with regard to stacks, where are new nodes added and existing nodes removed?
|
|
|
|
|
Think of a stack as that thing you used in the high school cafeteria that held the trays. When you needed a tray, you took the one from the top. When a tray was put back on, it was added to the top. Google for FIFO.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Wouldn't FIFO (first in, first out) be a queue? I think you meant to say LIFO (last in, first out) since the last thing you "push" onto the stack will be the first thing that you "pop" off of the stack.
--
Marcus Kwok
|
|
|
|
|
ricecake wrote:
Wouldn't FIFO (first in, first out) be a queue? I think you meant to say LIFO...
Yep, thanks. I can't believe I suggested that.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hi guys
I want to do a Modal dialog that when do the oninitdialog, start a proces drawing a progress ctrl.
But the problem is that the process starts but nothing is drawn.
Any suggestion?
Maybe a timer in oninitdialog that launches later the process and the progresCtrl?
Best Regards
Doc
|
|
|
|
|
doctorpi wrote:
But the problem is that the process starts but nothing is drawn.
You'll need to create another thread to do this work in. With only one message pump, it is too busy with the processing that paint messages are not being processed and the UI is nonresponsive. Read here.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
|
Hi Guys,
I have an app which requires multiple long-term timers (eg an event to be triggered at 12.45 on Jan 12th 2006). I've used SetTimer/KillTimer for short-term timers but this doesn't seem right for the long-term stuff. What's the best way of dealing with this without wasting CPU time on it?
Thanks for any advice,
Simon
|
|
|
|
|
How about creating a scheduled task?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
srev wrote:
best way of dealing with this without wasting CPU time on it?
Don't know if this the best way, but you could suspend your process for the duration of the resolution of interest and check if your event has occured.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi all,
I would like to insert a set of records in csv format as a VC++ 6.0 resource.
At the moment the only way I founded is to insert the values in the String Table but the values I need to insert are more than 300 so manually entering the values is a difficult and long task
I used the insert custom resource but I don't kno how to retrieve values.
Please help me.
|
|
|
|
|
Put the CSV "records" in a file and insert that file as a RT_RCDATA resource type.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|