|
Thanks, very interesting indeed.
Hope is the negation of reality - Raistlin Majere
|
|
|
|
|
Hi,
I have a dialog based application, which should act as a CSocket server.
In short my need is, if some client is connected to the server, OnAccept of the CSocket should be directed to the dialog class member function.
I am not sure about the right method to do so.
Thanks in advance.
- NS -
|
|
|
|
|
You can store a CWnd*, HWND, or whatever is appropriate in your socket class and use
that to send messages to the window/dialog.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks for the replay. Is this the only way?
I tried to dervie my dialog class from CDialog and CSocket. But failed...
- NS -
|
|
|
|
|
Do you really need them to be together? Why not separate another class and make that one your CSocket derived class? If your concerned on the variables/objects you need in your dlg class, just pass the class pointer to the CSocket class.
|
|
|
|
|
My concern is that then there will be a mapping from csocket class to the dialog class. I like to avoid it.
- NS -
|
|
|
|
|
Why did the multiple inheritance fail?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
It shows compilation error.
There is some ambiguity problem since both are from CObject.
- NS -
|
|
|
|
|
I'm personally not a fan of CAsyncSocket and definitely not CSocket.
If you don't like adding a CWnd* or HWND to the socket class then it's
much easier to use the socket APIs directly.
A SOCKET member can be added to a window/dialog class and Using WSAAsyncSelect
you can get socket notifications directly in the window.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thank you.
I choose CSocket, because I dont have much knowledge in sockets. So for easiness I found CSocket is good.
I think I have to learn more to do better...
- NS -
|
|
|
|
|
Hi all
can someone help me?
I want to make a toolbar with nice icon (48x48 256 colours) but when i copy my icon, the visual c++ make my icon 16 coluors. Is possible to have icon with 256 coluors?
Thanks in advance
|
|
|
|
|
vasmvr wrote: when i copy my icon, the visual c++ make my icon 16 coluors.
You are probably placing an icon of 256 colors in to 16 color icon. If so you have to add a new icon of 256 colors. It is available in menu, Image > New Device Image.
- NS -
|
|
|
|
|
Thank you, but Where is menu, Image > New Device Image?
|
|
|
|
|
You just open the icon from resource. Could you?
- NS -
|
|
|
|
|
I can't see the menu image.....i'm using visual c++ 6.0.
|
|
|
|
|
ok... can you just show me the caption of the MSDEV?
eg..MyDlgTestApp - Microsoft Visual C++ - [MyDlgTestApp.rc - IDR_MAINFRAME (Icon)]
- NS -
|
|
|
|
|
MyApp - Microsoft Visual C++ - [MyApp.rc - IDR_MYAPP [Italian (Italy)](Bitmap)]
This is the caption
|
|
|
|
|
I undestand what you mean, but in this way i only import an Icon under Icon folder. I want this icon to the toolbar but if i copy to the toolbar it will change in 16 colours. or i do something wrong?
|
|
|
|
|
vasmvr wrote: want this icon to the toolbar but if i copy to the toolbar it will change in 16 colours.
I am not sure about how to directly use it...
But you can show higher color resolution icons in the toolbar by using an imagelist.
Sorry, I dont have a code sample to show you.
- NS -
|
|
|
|
|
Thanks, you mean to create a bitmap with all my icon and then extract each icon from it?
|
|
|
|
|
You can add icons directly to imagelist
- NS -
|
|
|
|
|
Thank u NS, finally i did. Thank you very much for your help.
-- modified at 3:09 Tuesday 4th September, 2007
|
|
|
|
|
Hi All,
1. We have created a dialog with unicode compilation. In this we have some text boxes or other controls where we don't want to allow to enter any non-english charaters.
Can there is some easy way to set the flag for CEdit, so that it won't allow to enter any non english characters. I don't want to override (MaskEdit) the CEdit. In MBCS build we are able to type only English chars. Non english is converted to ????.
How Windows is managing this Non unicode and unicode windows?
2. Is the support for _MBCS is removed from the Visual Studio 2005.
In non unicode (MBCS) build, in Visual Studio 98, we were able to type the unicode characters, but this seems not to be working with VS 2005
Indian Idol
|
|
|
|
|
You can filter all unwanted input out. You got to handle ENCHANGE Message of the EDIT Box.
Greetings from Germany
|
|
|
|
|
By default VS2005 new projects are set to UNICODE, you need to change this in the project settings for MBCS. The reason for you not being able to see non english characters is probably due to a local setting. Without seeing any code there is not much else I can say to help you.
|
|
|
|