|
|
Am not sure exactly what you mean but you might be looking for UrlGetParh[^].
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Leela: Fry, you're wasting your life sitting in front of that TV. You need to get out and see the real world.
Fry: But this is HDTV. It's got better resolution than the real world <
|
|
|
|
|
hello, i want to use finesse with C++, and i have installed fitnesse, but i don't know how to
install fitcpp in linux. can you help? thanks.
|
|
|
|
|
fitnesse ? finesse ?
what is that ? link ?
Watched code never compiles.
|
|
|
|
|
|
Well you have the link to the best place for an answer to your question. Use the documentation, tutorials, user group etc.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
in fact, the fitnesse is for java. so the information about c++ is little. i will look again.
thank you
|
|
|
|
|
No idea who's been throwing the 1 votes around here so have a 5 in consolation - I'd personally love to be able to try fitnesse with C++ development but being a lazy sod I've never given it a go as the docs for fitcpp were pretty dire 5 years ago. If you do find out how to install it please drop a link or describe the process here. Even if you can't get it going then the likes of me would still be interested in what's gone wrong.
Cheers,
Ash
PS: You've probably seen this already, but Alan Griffiths wrote an article on fitcpp back in 2004 for the ACCU[^]. It's crap at what you need to do to install fitcpp but goes into some detail about how to write tests and fixtures afterwards.
|
|
|
|
|
|
|
thanks, I'll have a look when I get a moment.
Cheers,
Ash
|
|
|
|
|
Hi,
I am using SelectObject() in my code but confused with the MSDN description.
CFont font;
font.CreateFont(-12, 0, 0, 0, 400, FALSE, TRUE, FALSE, ANSI_CHARSET, OUT_CHARACTER_PRECIS, CLIP_CHARACTER_PRECIS, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, _T("Courier New"));
CFont* oldFont = pdc->SelectObject(font);
pdc->TextOut(0, 0, str);
pdc->SelectObject(oldFont);
font.DeleteObject();
As per MSDN we should not use the object return by SelectObject because it is a temporary one.
But if we are restoring the old GDI object in the above way will it cause any problem
because the same dc can be used in some other place.
|
|
|
|
|
MSDN says:
This function may return a pointer to a temporary object. This temporary object is only valid during the processing of one Windows message.
So, it is ok to replace the selected object by the previous object like you did in your case.
|
|
|
|
|
Thanks for the reply. But if i want to use the same DC after this call wiil it be ok.
|
|
|
|
|
You can reuse the device-context how many times you want. The only thing you should be aware of is that:
- each time you select a GDI object (font, pen, brush, etc.) into a device-context you should restore the one that it held originally
- you should not save the pointers returned by
SelectObject to restore them later, because they could be temporary. To be more specific, the objects pointed could be destroyed during the idle-time of your application (i.e. inside the CWinApp::OnIdle ). This means that you should restore these objects before returning from the message handler on which you have called SelectObject
|
|
|
|
|
But if we restore the temporary pointer returned from SelectObject in the DC immediately, the DC may be having some dangling references after the current call. Means if we store the current DC for some other call there are chances of using incorrect memory.
|
|
|
|
|
ashtwin wrote: But if we restore the temporary pointer returned from SelectObject in the DC immediately, the DC may be having some dangling references after the current call.
I think you mean: "the device-context hold a pointer that could became invalid". Isn't it?
Don't worry about it: once you have selected back the original object inside the device-context, everything will works fine. What you cannot do is to store that pointer and use it explicitly later.
|
|
|
|
|
There is a difference. The temporary object is a temporary MFC object wrapping the underlying HGDIOBJECT. The gdi object the handle is pointing to is not temporary.
|
|
|
|
|
I understood. Thanks you all for your replies.
|
|
|
|
|
Hello,
I created an ActiveXDll on C# and set parameters of COM in its interface.
And now I need to integrate this ActiveXDll in my C++ Form.
So can you help me?
|
|
|
|
|
If you're using MFC , then Visual Studio may generate a wrapper C++ class for you.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hello,
When running MFC\C++ project in 2003 VC++.NET env, resource files are always out of date,
even though there are no changes made.
Whenever I hit F5, it gives me the "These project configuration(s) are out of date:"
msgbox.
When building again, I see that all sources are up to date except resources
In the output window I see:
all is "up-to-date"
then "compiling resources..
Linking.."
Can anyone know how to get rid of this annoying msgbox?
Thanks,
Dor
|
|
|
|
|
in win32, where will keep the all messages are generated by the window? and how do know this message is belongs to this window? and who will maintain the message queue? what happand in background? what is the code in c++? what are the methods are fallows in background?
Regards,
Srinivas
|
|
|
|
|
Every thread has its own message queue that is setup by the system into which it posts the messages. Now that you have a start, dig into MSDN.
|
|
|
|
|
bleedingfingers wrote: Every thread has its own message queue that is setup by the system into which it posts the messages.
That's not completely true, see The Old New Thing - In pursuit of the message queue.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|