|
Hi Jitendra
Thanks so much for clarifying my qn. Wanted to reply to you immediately but could not login to this site (
I have realised that when I use a COM dll loaded into my App and wait for Data to receive on my socket (though it is multithreaded, I am using this from VB script of my app), my app hangs until data is recieved.
I am now trying to use the Async Method. Could you please help me in this regard?
I have generated a COM dll using the ATL COM APP wizard. I inserted a Full control that actually exposes interfaces.
I have then defined my own Class, say MySocket derived publicly from AsyncSocket. I now want to use this dll to get notification when there is data to be read, asynchronously.
In my interface implementation,
I created an instance of MySocket. How do I get notified of the event?
Can you email me ur id, so I could send my code to you for better understanding?
My email id is shekar_raja@indiatimes.com
This is very critical to me, please take time for this.
Thanks heaps in advance....
Cheers
Raja
|
|
|
|
|
Hi Friends,
Is there any way to install office 2000 developer on named instance?
VikramS
|
|
|
|
|
a character string can be implemented as a linked list of characters.I have to write a C++ class called "Newstring" that uses linked lists to implement the following string operations (in all examples, string1 and string2 are of type Newstring):
string1.concatenate(string2)
concatenates string2 onto the end of string1
string1.concatenate(ch)
concatenates the single character ch to end of string1
string1.display()
displays string1 on standard output (cout)
string1.length()
returns length of string1
string1.substring(string2)
returns 1(true)if string2 is a substring of string1
and 0 (false) otherwise
In implementing this class, i have to write additional, private methods to assist the others and a program to test the class. This is an exercise not a test and it has me confused really bad.They say its a full programming exercise,what does that mean?I am new at this kind of thing ,please help if you can .
Thanks
main( )
{
StringType str1, str2;
char word;
cin>>word;
StringType str3(word);
str2 = str3;
~str3;
str2.Length();
cin>>str1;
Concatanate(str1, str2);
str2.Display();
if (str1 == str2)
cout<<"SAME";
else
cout<<"DIFFERENT";
}
i have an idea how to do it but haven't had any experience with classes.
|
|
|
|
|
Try posting the code you have already, and we'll be glad to point out where you're going wrong. It seems like a terrible idea to me, why would you do such a thing, unless you had a string you wanted to be optimised for insertions, but NOT optimised for reading the actual value it contains ?
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
None of this makes any sense. You're inputting a character, not a string, and you're not showing the code that matters. This is the code to use the class, not the code that IS the class.
If your teacher expects you to write a linked list, and you don't know what a class is, then either you've not been attending class, or the teacher sucks. Your Concatenate method should be a member of the class, it really should be an operator +, but that's obviously the next lesson.
Also
pedabber wrote:
cin>>str1;
won't work unless you write iostream handlers for your class, which is a logical idea, but perhaps above the level your teacher expects.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
you're a tough bugger christian
i'd have lead him down the garden path for a while first*chortle*
bryce
---
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
|
|
|
|
|
I am trying to create a file that has a filename followed by a CR then I want to create the rest in basically straight hex values. I am using the file streams currently in console mode for greatest portability. With the File IO Stream when I set the values to ios::hex the output looks like plain hex numbers. The data type I am sending to the file is currently unsigned int. I just want to send out the information in a pure binary format, that should not be readable in a text editor, but would require a hex editor to verify the numbers. What am I missing? This is driving me crazy.
Thank you for any assistance.
Leo T. Smith
|
|
|
|
|
You can create a file with CreateFile() . Use WriteFile() to write to the file.
If you are using MFC, check out the CFile class.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I need to find the current mouse cursor position in screen coordinates, even if it is not in the client area of my window-- or any window I own for that matter.
Seems like there should be a simple API call to get this, but I cant find it. Any ideas?
|
|
|
|
|
GetCursorPos?
"It was when I found out I could make mistakes that I knew I was on to something."
-Ornette Coleman
"Philosophy is a study that lets us be unhappy more intelligently."
-Anon.
|
|
|
|
|
GetCursorPos
and make sure you do ScreenToClient or ClientToScreen conovertion.
Sonork 100.41263:Anthony_Yio
Life is about experiencing ...
|
|
|
|
|
Hi all,
could anyone tell me how to write on the area before the panes of the status bar? That area where the word 'Ready' is placed. Thanks,
Ralf.
ralf.riedel@usm.edu
|
|
|
|
|
Just try using this member function of CFrameWnd:
CFrameWnd::SetMessageText
From MSDN:
Call this function to place a string in the status-bar pane that has an ID of 0. This is typically the leftmost, and longest, pane of the status bar
|
|
|
|
|
Hi all,
could anyone tell me how to write on the area before the panes of the status bar? That area where the word 'Ready' is placed. Thanks,
Ralf.
|
|
|
|
|
Hi,
I have created one simple ActiveX control which extends the properties of Button. I have added OnClick() event while building an ActiveX control.
I have successfully create the ActiveX control.
But, then to test the ActiveX control , I have build simple dialog-based application and insert my custom-built ActiveX control. I m able to get the properties of ActiveX control.
But, the problem is that i unable to get the OnClick event of ActiveX control.
The event is not even visible in MessageMap of ClassWizard.
Pls help me
|
|
|
|
|
Hi Chauhan,
For what you said, sounds like you didn't implement the connection point for that event, does your control support connection points?
If you did implemented it, where did you put the call to the FireClick() function?, did you check that code is been call?
Fabian
|
|
|
|
|
Hi Fabian,
Thanks for reply.
Actually I m very new to this topic , I have just read the code from Book and try to implement it.
No, I haven't implemented connection point for the event.
How can I do that? Please provide me some code snippet or suggest me some useful links from where I get the help.
|
|
|
|
|
|
Is using sscanf with structs harmful
Say i have two structs
struct {
int a ;
int b;
}A;
struct {
char c;
int d;
};B
void main()
{
struct A obj1;
struct B obj2;
string fileString;
.
.
sscanf(fileString.c_str(),"%d",&obj1.a);
sscanf(fileString.c_str(),"%d",&obj2.d);
}
Is there a bug in this ? Do i have to do some type of casting ?
}
|
|
|
|
|
I would write:
sscanf(fileString.c_str(),"%s",&obj1.a);
sscanf(fileString.c_str(),"%s",&obj2.d);
instead of:
sscanf(fileString.c_str(),"%d",&obj1.a);
sscanf(fileString.c_str(),"%d",&obj2.d);
and changing int's into strings.
You can't put a string into an int with no castring.
Written by: Rafael Fernández López.
void life ( bool me, bool her )
{
if ( her )
{
me = true ;
}
else
{
me = false ;
} }
|
|
|
|
|
Your code is fine.
Although I think 'void main' is deprecated. And you could consider giving A and B an 'initialise from string' type constructor, so that the struct/class takes responsibility for its initialisation.
Paul
|
|
|
|
|
Anyone can tell me a website that explains how to create a visual control for visual c++ from 0 ??? any kind of control.... Or an article into this site, but I couldn't find anyone that explains how to create it.
Thank you so much.
Written by: Rafael Fernández López.
void life ( bool me, bool her )
{
if ( her )
{
me = true ;
}
else
{
me = false ;
} }
|
|
|
|
|
Rafael Fernández López wrote:
...how to create a visual control for visual c++ from 0
What does this mean?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
sorry my english is not very good, i'm from spain. from the beggining, with no parent class, is more or less what i want to say. but with owner draw and so on... thanks !!
Written by: Rafael Fernández López.
void life ( bool me, bool her )
{
if ( her )
{
me = true ;
}
else
{
me = false ;
} }
|
|
|
|
|
Just a guess, but do any of the articles here explain how to create the control you are interested in?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|