Re: [RESOLVED] stacking several PNG files under in a windows forms
Quote:
Originally Posted by
TheGreatCthulhu
[...] The form-related resource file is still there, but it's not normally used, nor there's a need for it to be used. It's collapsed under the form node in the project tree, so you barely even notice it - I guess it's reserved for the designer (I think that the IDE might use it when you work with some specific controls.)
The form-related .resx file is collapsed under the form node in C++/CLI as well. And it is not normally used insofar as there usually is no need for the developer to directly work with it in any way. But it is quite commonly used by the Designer: It holds references to form-related resources such as the background images of forms or buttons, as used over there in the moving button thread. It also holds information about objects placed on the Designer's tray (timers, for instance); at least their position on the tray.
Interesting. I haven't yet read the entire article but I've bookmarked it. Looks as if many of the forum celebrities haven't read it either. ;) ... or they simply agreed not to agree at some point.
Quote:
If [C++/CLI's] usefulness is limited, we have Microsoft to blame: generally, the support could be better, and especially so when it comes to the IDE.
I coudn't agree more.
Quote:
For example, you could probably create a WPF application using C++/CLI, but it would be cumbersome to code it without the support of the IDE. (bunch of stuff that needs to be set up, and XAML, all manually.)
I'm pretty certain this can be done. But hand-writing (as opposed to sometimes hand-editing for some fine tuning) XAML seems similar to hand-writing HTML or XML to me, and that's also something that practically isn't done anymore nowadays. Maybe someday someone will come up with a 3rd-party XAML editor that can be used with C++/CLI?
Quote:
Hm... After some digging, the docs say that C-style casts should be avoided in CLR projects.
I think I have read something like that too, but doesn't that pertain to native C++ as well?
Quote:
But, .NET events are essentially just a syntactic sugar for what is in its core the Observer pattern. [...]
Looks as if this could be the beginning of another interesting discussion, so I'll spawn a separate thread on it. I'll post the code containing the PentagramBox class I already mentioned there as a basis for discussion. The thread I wrote that for is almost a month ago and the homework is most likely already handed in.
EDIT: This is the spawned thread: http://www.codeguru.com/forum/showthread.php?t=510377
Re: [RESOLVED] stacking several PNG files under in a windows forms
Quite a long thread, but just a few final remarks...
Quote:
Originally Posted by
Eri523
Interesting. I haven't yet read the entire article but I've bookmarked it. Looks as if many of the forum celebrities haven't read it either. ;) ... or they simply agreed not to agree at some point.
Just wanted you to see the title - to back up my claim that Microsoft said it. I only skimmed through the article, it seems to mostly talk about basic .NET concepts, as applied to C++/CLI, nothing special.
Quote:
Originally Posted by
Eri523
I think I have read something like that too, but doesn't that pertain to native C++ as well?
Yeah, but I don't really buy it. I know this goes against the mainstream, but I think this guy has a point. Now, my opinion is not as radical as his, but the way I see it: while casting is to be avoided, it's sometimes necessary, and c-style casts are not dangerous in themselves, but the developers trying to pull stunts with them are.
It's like everything else - follow good programing practices, and don't fool around and then feel sorry about it later.
To quote that article:
Quote:
There’s another reason why C++ pundits scorn C-style cast -- the same cast expression may perform two conversions at once:
Code:
const unsigned int *lp; //ptr to const unsigned int
(int *) lp; //get rid of unsigned and const at once.
And I say: so what? If the programmer made a mistake here, that’s too bad. Then again, programmers make much more mistakes by confusing delete and delete[]. Besides, what if the programmer had truly meant to use two cast operations in one expression? Should the programming language twist his arm and force him to use two different cast expressions? Would that make the code clearer or safer in anyway? Perhaps the following example will convince you that it certainly wouldn’t:
Code:
reinterpret_cast <int *> (const_cast<unsigned int *>(lp))//instead of (int *) lp
So much for clarity and explicitness!
Bottom line: you can do dangerous stuff with C-style casts, but if you care for your code, why in the world would you do it?
(Note that the same author (i think) was a "believer" before.)
Re: [RESOLVED] stacking several PNG files under in a windows forms
Thank you for the answer,
I have resolved it in other way, but your advice about flicker issue was useful in other part i had pending to resolve D