|
CPallini wrote: This is working for me, why don't you use non-MFC CString ?
Oops, sorry that I've use the wrong way. I used the char buffer instead CString.
CPallini wrote: Well, my e-mail address is available on my profile. But you really don't need it: if you have a programming question please use CP forums.
Sorry if I make any trouble to you. Why I'm ask it because I'm fail to explain my question to you. You are right. I have to much deal with forum.
I appreciate your help all the time...
Eranga
|
|
|
|
|
I need to write a voice over ip module applied between 2 hosts for a local network using vc++? Is there anybody can provide me some information or guide or sample on it? I need to solve it within 2 weeks and i don't have any idea yet. In fact i am not really clear on how VoIP function as well.
Sun
modified on Tuesday, December 11, 2007 11:06:57 AM
|
|
|
|
|
Then the first thing you have to do is to search for info about the VoIP and read. If you don't even understand what you will try to do... it will be pretty difficult for you to programm it.
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?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Think about the tasks and how to handle each one:
get digitized voice from user
transmit data to other host
receive data from other host
output digitized voice to user
Judy
|
|
|
|
|
Hi All
I need help in initialization list/constructor in abstraction
I have abstract base class -
class ICloth
{
ICloth();
...........
}
class CMyCloth:public ICloth
{
CMyCloth(EColor color, ESize size,EStatus status,EType type,EQuality
quality);
...........
}
class CHighTechCloth:public CMyCloth
{
public:
CHighTechCloth();
...................
}
/////
now in main I try to create CHighTechCloth object, what do I do wrong?
CHighTechCloth* pMyNewCloth = new
CHighTechCloth():ICloth(ICloth::EC_RED,
ICloth::CS_SMALL,
ICloth::CST_NEWCLOTH,
ICloth::CT_EYEGLASSES,
ICloth::EQ_LOW)
|
|
|
|
|
You simply cannot do that.
You have either to provide a default constructor for class CMyCloth (and you've lost the 'per instance members initialization feature')
or a compliant (to class CMyCloth 's one) constructor for CHighTechCloth class , for instance:
class CHighTechCloth:public CMyCloth
{
public:
CHighTechCloth(EColor color,
ESize size,
EStatus status,
EType type,
EQuality quality):
CMyCloth( color, size, status, type, quality)
{}
...
}
BTW compiler error messages usually give meaningful hints.
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.
|
|
|
|
|
my error message was: error C2143: syntax error : missing ';' before ':'
I guess I tried to do the compliant , just wasn't sure how.
I will try it
thanks!!!
|
|
|
|
|
taly wrote: my error message was: error C2143: syntax error : missing ';' before ':'
Well, I have to say that message isn't so illuminating.
taly wrote: I will try it
Good luck!
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.
|
|
|
|
|
Hi...I am working on the MDS 5.0(MFC).In an application i have to use more than 255 ocx. But because of the limitation of VC++ i can not use more than 255 ocx in a single dialog. Is there any solution so than i can use the ocx as per my requirment.
|
|
|
|
|
vineet p singh wrote: But because of the limitation of VC++ i can not use more than 255 ocx in a single dialog.
Really, I'm curious: how did you find that?
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.
|
|
|
|
|
Hello,
I have a variable called hwnd which stores a handle to one of the windows created by other process. Is there any way to get notified when the title of the window identified by hwnd changes? Can this be done by hooks or without them? If yes how?
thanks in advance
|
|
|
|
|
Giorgi Dalakishvili wrote: Is there any way to get notified when the title of the window identified by hwnd changes
I think with hook it might be possible. Install a message hook and look for the WM_SETTEXT message.
|
|
|
|
|
my Code is
CString sValue;
fldSource.Value() = _wtof(sValue);
Getting this error
error C2065: '_wtof' : undeclared identifier
Plz help me,
I added headers
#include <stdlib.h><code></code>
|
|
|
|
|
try the strtod() function intead of _wtof.
|
|
|
|
|
Naveen.R wrote: try the strtod() function intead of _wtof.
perhaps wcstod or, better, _tcstod .
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.
|
|
|
|
|
CPallini wrote: perhaps wcstod or, better, _tcstod.
ya actually I mean that..
thanks for pointing
|
|
|
|
|
Sir,
I have to convert sValue , which is CString type.
I have to convert that value into double .
My code is
CString svalue;
|
|
|
|
|
for instance:
CString sValue;
double dValue;
sValue = _T("3.14159");
dValue = _tstof(sValue);
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.
|
|
|
|
|
Thank you , for kind reply, i will do that
|
|
|
|
|
Hi Friends.
I am Santhosh, I am doing a project. I have a path like "C\\program files\...".
I will give that path in CFileDialog. All the Files in the CFileDialog should be selected. Then i will Unicode it.
Thanks and Regards.
SANTHOSH V
|
|
|
|
|
Take a look to FindFirstFile and similars to list the files.
BTW there is more than one message in forum with this thema. And most with very good answers, maybe you save your time and the time of people that already answered these questions cheking it
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?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
santhoshv84 wrote: I will give that path in CFileDialog. All the Files in the CFileDialog should be selected.
You can get the folder path calling CFileDialog::GetFolderPath and then use CFileFind class (see [^]) and finally
santhoshv84 wrote: Then i will Unicode it.
??? ???
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.
|
|
|
|
|
Hello everyone!
I've been coding in C for a long time. Now I' starting to get into C++. Well, my last 2 projects which I started in C++ I had to convert to C because I couldn't figure out how to use classes.
Take for example my current situation: There is a Dialog class, which holds all of the GUI functionality of my program. The Dialog class contains an object of type Client, which holds all of the networking functionality. Well, Client wants to interact with a GUI control inside Dialog. But that's not possible because C++ doesn't allow Client to know anything about Dialog.
So how would I solve that? If you can answer, I will thank you for life.
Thanks in advance!
Windows Calculator told me I will die at 28.
|
|
|
|
|
Well, one way is the following:
- Change Client class constructor to accept a Dialog class reference. Store the passed reference as member of Client class
- Make Dialog class public methods to allow access to relevant class data. (a brutal alternative to this step is declaring Client class friend of Dialog class ).
For instance:
// Client
class Client
{
Dialog & m_dlg;
public:
Client( Dialog & dialog):m_dlg(dialog){}
...
}
class Dialog
{
public:
setLabelText(LPCTSTR szText)
{
...
}
...
}
and then, somewhere in your code:
Dialog dlg;
...
Client client(dlg);
...
and, finally, somewhere in Client code:
m_dlg.setLabelText(_T("packet received"));
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.
|
|
|
|
|
Yes, but Dialog needs Client too... They both need each other, and with the include guards that's not possible. And if I remove the include guards I get infinite error messages by the compiler...
Any more ideas? Thanks!
Windows Calculator told me I will die at 28.
|
|
|
|