|
AkiraOne wrote: I have a problem with MFC class CSocket, same times the OnReceive method is not called ...
Does the same thing happen with CAsyncSocket ?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I have not still been able to try...
Today I will make some tests with the CAsynSocket...
Too many plans make the health badly!!
|
|
|
|
|
Yes..is the same...
Too many plans make the health badly!!
|
|
|
|
|
Kindly check this code for me please is give me an errors
A calendar in which u can use a mouse,simply enter the year and month and u will c the result by
#include<iostream.h>
#include<conio.h>
#include<graphics.h>
#include<stdlib.h>
#include<dos.h>
#include<string.h>
union REGS i,o;
initmouse();
showmouse();
hidemouse();
void restrictmouse(int x1,int y1,int x2,int y2);
void getmousestatus( int *button,int *x,int *y);
void findday();
void menu();
void cal();
void main()
{
clrscr();
int gd=EGA,gm=EGAHI;
initgraph(&gd,&gm,"c:\tc\bgi ");
menu();
getch();
closegraph();
}
void findday()
{
int k=1,m=11,mon,D,C,f,i,y,total=0,t,I,d,x1=115,y1=160,q,r,v;
static int s=0;
char st2[3],st3[9],st4[5];
int days[]={31,28,31,30,31,30,31,31,30,31,30,31};
char
*month[]={"JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE","JULY","AUGUST
","SEPTEMBER","OCTOBER","NOVEMBER","DECEMEBER"};
restorecrtmode();
cout<<"Enter year : ";
cin>>y;
cout<<"Enter month : ";
cin>>mon;
if(mon>12)
|
|
|
|
|
Please:
1. Explain exactly what the problem is (so what exact errors do you have)
2. Format your message properly (using the pre or code tags above the emoticons)
3. Post a relevant piece of code (your code seems to be cut in the middle of a function). That also means not to paste ALL your code.
|
|
|
|
|
urbdos wrote: ...is give me an errors
Such as...being incomplete and unreadable.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Use of pre when you want to post a code or click HTML tags in this message.
|
|
|
|
|
If you try to build this source code in a VC-version later than 1.52, you won't succeed, since this is a very old, 16 bit DOS program.
I would suggest you to start a new project (in a more recent version of VC++), then cut and paste the useful parts to the new project.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
I am trying to open a new file using Append mode in C++. But file is not opened. If I use out mode, file is opened.But the problem is:
The data I entered once is lost during the next execution. I don't want the data to be lost. How to achieve this in C++.
Is there any specific mode in C++ for this?
|
|
|
|
|
You haven't said what you're using for file handling.
Are you using WIN32 handles, stdio FILE*, or STD streams?
Steve S
Developer for hire
|
|
|
|
|
fstream ofs("studfile.txt",ios::out);
This is the statement I'm using to open the file. If I use app in place of out, the file is not opened. But I want the contents of the files don't get erased after each execution.
|
|
|
|
|
T.RATHA KRISHNAN wrote: If I use app in place of out...
Why aren't you using both?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Steve S wrote: ...or STD streams?
STL?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
open the file in apppend mode...
syntax...
modes for opening a file----->
fstream file_op("C:\\s1.txt ",ios::out|ios::app);
|
|
|
|
|
Thanks Mani. It's working.
|
|
|
|
|
|
Hi all,
I am trying to use IActiveDesktop interface in my code.
I have included
#include "shlobj.h"
and defined this in stdafx.h
#import "shell32.dll"
but it is giving error
error C2027: use of undefined type 'IActiveDesktop'
how to resolve this
Can anybody help me in this
thanks in advance
|
|
|
|
|
You could try
#include <wininet.h>
#include <shlobj.h>
as I believe there are things in shlobj.h that rely on wininet.h being included first.
After that, you might also consider that by default, #import generates definitions inside a namespace, so if that was where IActiveDesktop was being defined, it wouldn't be in the global namespace.
You can look at the generated tli/tlh files to see what the namespace is called.
Steve S
Developer for hire
|
|
|
|
|
|
See here.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
thanku all,
it solved my problem....
|
|
|
|
|
Hi everybody,
like some times before i have a very strange behavior:
I add lines to the header : Error
I switch some lines : No Error
Now i have a same case:
class MyView
{
DECLARE_DYNCREATE(.....
public:
MyView(....
~MyView();
public:
enum { IDD = IDD_MY_VIEW };
#ifndef _DEBUG
...
#endif
public:
virtual void DoDataExchange(...
DECLARE_MESS...
CFontStatic lbInfo;
CButton btOk;
CSxGroupBox gbSelect;
CFontStatic lbOne;
CFontStatic lbTwo;
CFontStatic lbThree;
CFontStatic lbFour;
i get an error during the SubClassing of lbOne during DoDataExchange
CFontStatic lbInfo;
CButton btOk;
CFontStatic lbOne;
CFontStatic lbTwo;
CFontStatic lbThree;
CFontStatic lbFour;
CSxGroupBox gbSelect;
NO ERROR
CSxGroupBox gbSelect;
CFontStatic lbInfo;
CButton btOk;
CFontStatic lbOne;
CFontStatic lbTwo;
CFontStatic lbThree;
CFontStatic lbFour;
I get an error during AfxCallWndProc
CStatic gbSelect;
CFontStatic lbInfo;
CButton btOk;
CFontStatic lbOne;
CFontStatic lbTwo;
CFontStatic lbThree;
CFontStatic lbFour;
If i replace CSxGroupBox with CStatic i also get NO ERROR
i don't really understand how this effect occurs.
The View "MyView" does nothing, no char array which could overflow
And there are also no other views/funtions before the opening of this MyView
which manipulates arrays or other operations which could provoke an overflow
Does any one know the problem or has some times the same effect?
Big thanks !
|
|
|
|
|
Just a guess but I'd say CSxGroupBox is overwriting memory that doesn't belong to it, probably in the constructor. That's where I'd look to start with.
Just a tip: Calling your post VS.NET error makes it sound like a problem with .NET which belongs in the .NET forum or a problem with Visual Studio which belongs in the Visual Studio forum. This might explain the slight lack of response. Dialog crashes in DataExchange or C++ Subclassing problem might have been more appropriate.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Ok, i will check the code of CSxGroupBox
Thanks for your help
|
|
|
|
|
hi i am copying a file to user desktop. the user should not edit or open or delete the file. how to do this in mfc.
-- modified at 7:17 Thursday 21st June, 2007
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|