|
My favorite is Christian Graus[^] Check in the STL part of the link for his article on STLs.
|
|
|
|
|
Hi everybody,
i realized already a drag&drop of text from out a CListCtrl into a MS Word Document.
I used COleDropSource, COleDataSource, CSharedFile and CArchive
How does it work with bitmap?
Copy a bitmap into the clipboard via OpenClipboard & SetClipboardData works fine.
But it stores only the bitmap into the clipboard. No Drag&Drop possibility.
So i need to work with COleDropSource and COleDataSource, right?
Does is work via .WriteObject or WriteClass ?
Big thanks for help
|
|
|
|
|
Why does the below code throw exception in parent class?
#include <iostream><br />
<br />
using namespace std;<br />
<br />
class A<br />
{<br />
};<br />
<br />
class B : public A<br />
{<br />
};<br />
<br />
int main()<br />
{<br />
B b;<br />
<br />
try<br />
{<br />
throw b;<br />
}<br />
catch (A& ea)<br />
{<br />
cout << "Caught an instance of A" << endl;<br />
}<br />
catch (B& eb)<br />
{<br />
cout << "Caught an instance of B" << endl;<br />
}<br />
return 0;<br />
}
|
|
|
|
|
if you are using VC++ IDE (dont know about other ide's )you will get some warning when you compile.
that warning will make it clear why it is gettign thrown in parent class.
Try changing the sequence of catch block you will undestand the reason yourself.
|
|
|
|
|
As an additional note, you shoud aim towards catching constant references.
Failure is not an option - it's built right in.
|
|
|
|
|
the rule is: when you are catching exceptions you need to order the catch clauses from most derived to base!!!
simply change the order of the catch handlers searching for exception b first then a!!!
since class b is derived from class a it makes sense what you are seeing.
Yours Truly, The One and Only!
|
|
|
|
|
But why is it so? Is it a rule or is there some inbuild logic in doing so?
|
|
|
|
|
it seems you don't understand C++ basic OOP principles?
simple answer: your class b IS A class a, now do you know why?;P
Yours Truly, The One and Only!
|
|
|
|
|
There is a button inside a dialog say D1.
When we click on it, it should show a list box below it.
Here there is a problem.
If the dialog D1 is small then the list box appears only till the bottom of the dialog.Rest of the list box is not shown. This is because the list box is a child of the button or dialog D1.
How can we show the whole list box even when the bottom of the list box is greater than the bottom of the dialog?
Can we have a popup listbox just like popup dialog?
|
|
|
|
|
You can resize your Dialog to add space to be filled with the listbox.
Or you can add the listbox in the resource editor to your diaog D1, but when D1 is shown, you resize it to not show the lower part with the Listbox.
Fore these things, please refer to this article[^].
Failure is not an option - it's built right in.
|
|
|
|
|
Thanks a lot for your concern.
But i don't want to change the dialog size. The dialog size should be fixed.
The button and Listbox together should work similar to a combo box.
So the Listbox here should extend below the dialog as in the case of listbox of a combo box.
I am planning put the list box inside a popup dialog and invoke it on click of the button. But then i had to use a dialog resource only to show the listbox.
Please help me out if there is any alternative.
once again thanks a lot.
|
|
|
|
|
harsha u wrote: The button and Listbox together should work similar to a combo box.
Hmmm - OK.
In that case, I would think you should look up how the various combobox-articles[^] here on code project manage the drawing of their drop-down box. And learn how they do it.
This probably involves creating a borderless window, and maybe the listbox-ctrl itself is enough for that. Or maybe you need to draw a window yourself and place the listbox-ctrl on top of it.
But I never did a thing like that.
Failure is not an option - it's built right in.
|
|
|
|
|
harsha u wrote: How can we show the whole list box even when the bottom of the list box is greater than the bottom of the dialog?
Yes make this list box a child of the desktop window but read this[^] before proceeding.
You will also need SetCapture and ReleaseCapture to close your listbox to when clicked outside listbox area.
|
|
|
|
|
Hai...
i am developing application like chat. In this i have added font styles like(bold,Italic,underline and size.) if i chose some of the styles and typing in my richeditbox so the respective styles font s are coming. now i want to send the text with same style fonts in chat history richedit box.
but now it is sending without styles only.
how to do that...
|
|
|
|
|
I can't give you a solution but maybe an idea. Insteads of sending the message from richedit, send a struct. The struct contains a BYTE or WORD (depending on size) with flasgs of bold, underscored and so on, and the other member the message itself. Then on the other client you recieve the packet, create the font according to flags and show the message, freeing resources.
All this is because I'm not sure if the parameters of the CFont are sent, it should but...
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
|
I want to make a particular color of a Modeless Child dialog transparent.
I searched the net but everywhere the solution was for a WS_POPUP style child dialog. If i change the style of the dialog to WS_CHILD, then the transparency alogrithm stops working.
Can anybody help me with this issue...
Regards
Meenu
|
|
|
|
|
Use SetLayeredWindowAttributes.
|
|
|
|
|
Hi Aji,
I used that only but the problem is if my dialog style is WS_CHILD then its doesn't work.
If the style is WS_POPUP then it works..!
I want it to work in WS_CHILD style also...if u have any solution then please share.
Regards
|
|
|
|
|
Hi there,
Please guide me with various methods for consuming a Web Service in VC++ (native and Visual Studio 6 only -- VS2003 and 2005 does provide tools for generating proxy class but I am looking for a method from within VS 6.0)
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
did you have a look for using SOAP to consume Web Services?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Do you mean SOAP Toolkit available from Microsoft website? If yes, then they mention that it's been deprecated. Any thoughts?
modified 21-Apr-21 21:01pm.
|
|
|
|
|
For SOAP web services (what else could you mean?), gSOAP[^] works very good.
Failure is not an option - it's built right in.
|
|
|
|
|
Thanks. I'll download gSoap and give it a try
S o h a i l K a d i w a l a
To Err Is Human; to Debug, Divine
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Hi All,
I try to find WIN32 API that i can create environment variables in run-time.
All what i can find is function that create environment variables only that is local to the current process.
Someone can help me ?
Thanks for any help.
|
|
|
|