|
Dear All
Thanks for the information....
Here, in the above mentioned code, they have used thread. In the Client Program they call a User Message in OnAcceptMessage in both classes and start a TCPIP Thread, through where it send message to Server. Then Server checks for those messages and displays messages accordingly.
Here, instead of having thread I wish to Start a Server On Click Button and want to have a Client side which send messages to Server and Server performs just something on depending upon the message contents.....
If you r any having such idea or having an example of such kind of code please refer to me. Eagerly waiting for your help..........
Thanks once again to all in advance.....
Billar
|
|
|
|
|
I'm using the shockwave activex in my vc++ project but when I press keys into the editbox on the flash applet it loads, they don't show up. All that happens is I get a beep from my computer. However, it is recognizing when I press the arrow keys/tab etc, just not the main a-z 0-9 keys. It's definately not the applet, that works fine when I load it in explorer or from my old vb client. Any idea's?
|
|
|
|
|
int a:5;
I don't understand anything about this code.
Can u explain this code?
Please help me
Thanks...
|
|
|
|
|
From a long ago memory, its says to me that your declaring an integer which is 5 bits in size.
So you can have 31 to -32 as a possible range of values
Roger Allen - Sonork 100.10016
Strong Sad: I am sad I am flying
Who is your favorite Strong?
|
|
|
|
|
Is it possible to use VERSIONABLE_SCHEMA with a CObList derived class? I remember doing this long ago and now I can't remember just how I accomplished this.
right now I have
IMPLEMENT_SERIAL(CCharacter, CObList, 2 | VERSIONABLE_SCHEMA)
...
void CCharacter::Serialize(CArchive& ar)
{
CObject::Serialize(ar);
if (ar.IsStoring())
{
...
}
else
{
UINT schema = ar.GetObjectSchema()
...
}
}
The schema variable is some large number and not what I expected which is one? Should I be doing this another way or this code flawed?
Thanks!
|
|
|
|
|
You need to do this after getting schema
schema &= ~VERSIONABLE_SCHEMA;
since you OR it in the IMPLEMENT_SERIAL
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? - David Williams (Little Britain)
|
|
|
|
|
See this[^] series of articles if you'd like to implement robust general-purpose serialization yourself.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
how to make dll without mfc, but using "MFC Dll" in project wizard?
I just want to unlink it, cos i'm not using it
|
|
|
|
|
Why not a Win32 dll?
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
But win32 dll needs mfc too. In all cases i have to include afx.h(if not? i have lots of errors, but code of dll does't need it, it only for creation of dll)
|
|
|
|
|
does anyone found mfc class wizard in vc++ 7.0 (visual c++.net) like in vc 6.0?
|
|
|
|
|
From what I've read, they are vastly different. I've read very few positive comments about VS7's UI.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
The Visual Studio IDE is great. Is it different than older IDE's Yes. If it wasn't different then it wouldn't exist right? The Class Wizard in previous VC++ IDE's was OK at best.
IMHO just because you are used to something does not mean it is better than something else. If you don't like change your in the wrong line of work.
But, that just my opinion... I could be wrong.
|
|
|
|
|
I was also looking for the classwizard, to no avail. However there is still a way to accomplish everything you would like from the IDE. For instance, in the properties window, you can find the messages for a control and add a function for them from the control's property page. You might already know this, but I didn't and it took me a while to figure that one out, even how to change the id of the controls!!
If it's broken, I probably did it
bdiamond
|
|
|
|
|
when i run the following code in VC++ it gives "-1" as output.Why?
main()
{
printf("%d");
}
|
|
|
|
|
printf("%d");
You need a value associated with the format specifier:
printf("%d", x);
x would be some object in your code to be displayed in decimal format.
|
|
|
|
|
MSDN:
"The printf function formats and prints a series of characters and values to the standard output stream, stdout. If arguments follow the format string, the format string must contain specifications that determine the output format for the arguments."
Your format string is "%d" but no arguments follows that format string. so basically the printf function (knowing that it is a variable arguments function using a __cdecl calling convention) will take from the stack the parameters it needs (based on the format string "%d" you said i give you an int) and construct the string and send it as output
So the value -1 is a value the printf function is taking it from the stack.
Hope i kind of answered your question
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
If you want to output the string %d to the console then use "%%d", otherwise add the variable as someone has already suggested.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? - David Williams (Little Britain)
|
|
|
|
|
You hve to have a value for it to display it would look like this:
main()
{
printf("%d", 2);
}
|
|
|
|
|
I am working on a SDI project. The main window has a title in the title bar that I am trying to change. For some reason the name appears as: untitled - XXXXXX.
XXXXX represents a valid name, but I cannot get rid of "untitled."
Thanks.
Jerry
|
|
|
|
|
Check CDocument::SetTitle
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
jerry1211a wrote:
XXXXX represents a valid name, but I cannot get rid of "untitled."
In the main frame window's PreCreateWindow() method, remove the FWS_ADDTOTITLE style.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
FWS_ADDTOTITLE will actually append information to the window title. You want to remove FWS_PREFIXTITLE from the window style. Here is the code I've used below:
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
cs.style = cs.style - FWS_PREFIXTITLE;
if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
return TRUE;
}
Hope that helps.
Mike Ellertson
|
|
|
|
|
mellertson wrote:
FWS_ADDTOTITLE will actually append information to the window title.
Of course. Did I indicate otherwise?
mellertson wrote:
You want to remove FWS_PREFIXTITLE from the window style.
Which is why I said "...remove the FWS_ADDTOTITLE style." in my earlier post.
mellertson wrote:
cs.style = cs.style - FWS_PREFIXTITLE; // no document titles.
Which obviously will not work. You'll need to AND the style with the one's complement of FWS_PREFIXTITLE .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Dude, don't get all huffy. The code I posted does work, I'm using in my app right now.
I wasn't trying to be rude in my correction, just a polite correction.
When you override the main frames PreCreateWindow function, the value of cs.style will already include FWS_PREFIXTITLE . That's why you can subract it out like this:
cs.style = cs.style - FWS_PREFIXTITLE;
And it will remove the "untitled -" prefix from the application.
You said:
In the main frame window's PreCreateWindow() method, remove the FWS_ADDTOTITLE style.
You were incorrect in removing the FWS_ADDTOTITLE .
See the definitions below for more clarification.
Taken from http://msdn.microsoft.com
Frame-Window Styles
FWS_ADDTOTITLE Specifies information to append to the end of a frame window title. For example, "Microsoft Draw - Drawing in Document1". You can specify the strings displayed in the Advanced Options dialog box in AppWizard. If you need to turn this option off, override the CWnd::PreCreateWindow member function.
FWS_PREFIXTITLE Shows the document name before the application name in a frame window title. For example, "Document - WordPad". You can specify the strings displayed in the Advanced Options dialog box in AppWizard. If you need to turn this option off, override the CWnd::PreCreateWindow member function.
The initial problem was trying to get rid of the prefix "untitled".
FWS_ADDTOTITLE adds information to the end of the window title, it doesn't add a prefix.
David, I really wasn't trying to be rude, just trying to make a small correction. Take it for what it's worth.
Mike Ellertson
|
|
|
|