|
http://www.codeproject.com/tools/imageviewer.asp[^]
I wrote this tool to help solve problems like you are having. With this tool I could check that LoadImage() actually loaded the image the way I wanted it loaded, I could check every bitmap manipulation immediately after it was done etc.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
yes your article But I think its a good article well done Arends
|
|
|
|
|
First of all i dont understand why are you using a BitBlt and StretchBlt in your drwing code.. shouldn't you be using one of them. Anyways your logic.
By the way if you only want to display the bitmap on the dialog try removing the LR_CREATEDIBSECTION flag from LoadImage call. This will create a DDB compatible with your Display and u dont have to worry about the palette and other petty issues :P.. just select it and BitBlt or StretchBlt it
Peace!
|
|
|
|
|
|
hi
can anyone please tell me how can we override the expansion and collapsing of the tree control when we double click an item in a tree
my basic aim is to display the tree contents below a parent tree item whenever the parent item is double clicked.
regards
partho
|
|
|
|
|
partho5 wrote: expansion and collapsing of the tree control when we double click an item in a tree
Subclassing is a possible solution to this problem. You can Derive a class from CTreeCtrl and then override the methods in the derived class.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
thanks for the reply anshuman
i have already derived a class mytree from ctreectrl ..but i need to disable the expand and collapsing of the tree item whenever i double click a parent item.
so for example whenever i double click a root, the root should never collapse untill i click on the button (+ left of the node)
|
|
|
|
|
I've developed a bho.dll and it works fine with internet explorer.
I know maxthon/myie are also IE-cored browser and the bho.dll should be loaded into them automatically.
But to my surprise they don't load it at all.
How to solve this problem?
thanks!
|
|
|
|
|
Is C++ is 100% OOP language?
If yes, Justify
If not, why
|
|
|
|
|
what do you want to know exactly ?
C++ inherits from C, so, no, not 100% OO. but what is a language 100% OO finally ?
|
|
|
|
|
I would say it's closer to 40% maybe 60% if using MFC.
|
|
|
|
|
waldermort wrote: would say it's closer to 40% maybe 60% if using MFC.
That doesn't make really sense. A language doesn't becomes more object-oriented if you use a specific library. And what if you used wxWidget instead ? MFC are juste wrapper classes around the WIN32 API. What if you would have written these classes yourself ?
|
|
|
|
|
anilFirst wrote:
Is C++ is 100% OOP language?
AFAIK,C++ is not 100% OOPS.
anilFirst wrote: If not, why
A language is OOPS if it encompasses all the four laws:
1) Encapsulation: Binding of data and member functions in one unit.
2) Polymorphism: One thing taking many forms.(Overloading etc).
3) Inheritence: Extending functionalities of classes.
4) Abstraction: Hiding of functionalities.
But in C++ there is a friend function, using which you can not only access the variable's value you can also modify it that even from outside the class. Thus violating Encapsulation.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
_AnShUmAn_ wrote: But in C++ there is a friend function, using which you can not only access the variable's value you can also modify it that even from outside the class. Thus violating Encapsulation.
This is not true. The explanation is written here :
http://www.parashift.com/c++-faq-lite/friends.html#faq-14.2[^]
To answer the original question: No, C++ is not 100% OO, simply because it remains compatible with C. It's a sickness that does seem to be defeatable, that people insist on regarding C++ as an extension of C and therefor being totaly OK with producing crazy mix code that is bad in both worlds. I believe, that one can write 100% OO in C++, but i really can't proof that. Does anyone know of a certain problem that requires a non OO-workaround in C++ ?
|
|
|
|
|
Mr.Brainley wrote: The explanation is written here
Thanks for that lovely article.
Actually what's written in the books are the very basics that could go wrong (Just like this one ditched me) when you grow up in this world.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Mr.Brainley wrote: Does anyone know of a certain problem that requires a non OO-workaround in C++ ?
main()
|
|
|
|
|
See, that's my problem. Too often I don't see the obvious ...
|
|
|
|
|
why should this be a problem ??
codito ergo sum
|
|
|
|
|
main() isn't the member of a class, it's a global function, which doesn't fit with the OO paradigm
|
|
|
|
|
you can easely change the entry point of a program through the compiler option /ENTRY:function. See help[^]
How to do this:
class MyApplication
{
int __stdcall Run(int argc, _TCHAR* argv[]);
};
int __stdcall MyApplication::Run(int argc, _TCHAR* argv[])
{
return 0;
} Then change the entry point in the property settings of the project from blank (default) to MyApplication::Run. This way the program only excist out of one class embedding the entry point.
codito ergo sum
|
|
|
|
|
Mr.Brainley wrote: I believe, that one can write 100% OO in C++, but i really can't proof that.
You can write pure OO code in C++, but why would you want to? OOD/OOP is overkill (and actually doesn't fit well) for many things, which is why generic programming is also a strong feature in C++.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
C++ is a blend of OO, functional, and generic programming. It is basically a catch-all language that you can do anything with.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
anilFirst wrote: Is C++ is 100% OOP language?
See here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
The notion of 'object oriented' is a moving target.
Here[^] is an interesting little article that discusses the different views held by some languages that support 'object oriented' programming.
The article is a response to an essay by Paul Graham[^]. His essays make good reading and while you're at it, browse his site. I think most people will find it interesting -- whether you agree with his views or not. His writing can be thought provoking, or at very least provocative.
Later,
Dan
Be clear about the difference between your role as a programmer and as a tester. The tester in you must be suspicious, uncompromising, hostile, and compulsively obsessed with destroying, utterly destroying, the programmer's software.
------------
Boris Beizer
|
|
|
|
|
C++ supports multiple programming padigrams; Object Oriented programming is just one of the supported padigrams. Others include generic programming. What do you mean by "100% Object Oriented"? It provides support for most OO concepts but does not force you to use them.
Steve
|
|
|
|