Type: Posts; User: torfil
Search took 0.02 seconds.
November 10th, 2005, 02:07 PM
Because 480/768 is zero, when you're dealing with integers. Convert them to float before doing the division. Like this:
float iPorcentage = ((float)iDrawedHeight)/(float)iScreenHeight;
October 30th, 2005, 09:11 PM
GetDlgItem is a member of CWnd. Are you sure you're calling it from a non-static method of a class derived from CWnd?
If not, then you're calling the 2 parameter version of GetDlgItem, which takes...
October 25th, 2005, 10:57 PM
I think fonts are part of the theme, so it will use those instead of the one you pass.
To remove a theme from a window, call
SetWindowTheme(hwnd, L"", L"");
where hwnd is the hwnd of your...
October 24th, 2005, 08:01 PM
In the registry, you can specify a particular debugger to get invoked when an application that isn't currently being debugged crashes.
google for the "AEDebug" regkey. You could probably set the...
October 24th, 2005, 07:53 PM
A system-wide freeze, to me, really points to a driver problem - something that's running in kernel mode.. I don't know what a "CAC DPT4 card" is, but who wrote the driver for it?
I guess attaching...
October 21st, 2005, 09:00 PM
Presumably if you think it can be made more stable, you know what the problems with it are? If not.... sounds like homework to me...
The error checking is incorrect/incomplete, and there is...
October 17th, 2005, 09:37 AM
Oops, I kind of posted a bad example above. I didn't realize CScrollView was actually an MFC class!
Ok, well pretend its actually my own class, with pure virtual methods on it.
October 16th, 2005, 03:01 PM
CScrollView which inherits from CView
- it add some virtual methods.
CEditScrollView whith inherits from CScrollView
- it implements those virtual methods.
October 16th, 2005, 02:44 PM
This may seem like a really stupid question... but how do I create a help file for my app?
I've looked through MSDN, and there are lots of docs offering useful tips on how to organize your help,...
October 15th, 2005, 03:21 PM
Give your dialog's hwnd to the thread. When the worker thread ends, have it post a message to your dialog to tell it that it's done.
Make your own message, e.g.
#define WM_MYTHREADENDED WM_USER...
October 14th, 2005, 02:40 AM
Actually, PreCreateWindow doesn't work so well, because if I increase the size, MFC starts putting these things off the MDI area, and the user has to move them completely back on (e.g. the bottom is...
October 14th, 2005, 02:37 AM
Well, both things work.
ActivateFrame appears to be called only once, even if I switch between mdi children, maximize, restore, etc...
But I've decided to take the PreCreateWindow route...
October 14th, 2005, 12:15 AM
Ok, right as I hit "Submit", I realized I could just do a ShowWindow myself.
October 14th, 2005, 12:13 AM
I have lengthy action that has a progress dialog. The dialog itself initiates the action: it spawns a worker thread and communicates with it using events.
The problem is, if in OnInitDialog, I...
October 13th, 2005, 02:09 PM
Thanks guys... I'll try out these methods and see which one works out (and rate accordingly :-) )
October 12th, 2005, 04:09 PM
When you define a document template in an MDI app, you specify the menu resource that gets used for the main frame.
I have a bunch (~ 5) different document types that my application can load....
October 12th, 2005, 04:03 PM
I would like to make my MDI child frames come up at a larger size. Is there an easy way to do this? How does MFC determine the default size?
Actually, even better might be to have them come up...
October 10th, 2005, 01:18 PM
It looks like your buffer is 16 characters long, and m_a, m_b, m_c and m_d all have values the ascii character '0'. So it's behaving as expected.
Your buffer isn't null-terminated, so if you...
October 3rd, 2005, 06:41 PM
The compiler error you're getting means that the function where that code exists is not a method on a CWnd class. Are you sure you added your function it to the class definition?
October 3rd, 2005, 12:16 AM
The option to do so is not available in the properties for a static in VC++.
I have to manually edit the .rc file, and only *then* does the option appear.
Is there a way to avoid having to...
September 29th, 2005, 03:58 PM
I don't know how you're sizing it, but comboboxes are weird, in that the size you give them is the size of the box itself plus the dropdown height. So if they are sized only big enough for the box...
September 28th, 2005, 10:37 PM
Do you mean WM_CLOSE, instead of WM_DESTROY?
September 28th, 2005, 09:28 PM
Well, I think you will see the values change all the time if you stepped through code. For example, the return value of a function is placed in the eax register. So it will change after every...
September 28th, 2005, 07:23 PM
Hmm... but that value will change millions (billions?) of times a second just executing regular code.
Maybe you're interested in if it changes at just one particular spot in the code?
September 28th, 2005, 03:18 PM
What do you need to do that for?
And what "script" are you talking about?
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.