|
Aqueel wrote: AFXWIN_INLINE HINSTANCE AFXAPI AfxGetResourceHandle()
{ ASSERT(afxCurrentResourceHandle != NULL);
Can you please tell me why it is.
This may due to incorrect sequence of including of headers
Include the resource.h into application's class Header...
This may resolve the problem.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
I have made my project using MFC AppWizard so resource.h was automatically included.
We Believe in Excellence
www.aqueelmirza.cjb.net
|
|
|
|
|
Didn't you use ClassWizard to create the project, or the CFileSenderDlg class? It would have handled the resource.h file for you. Otherwise, you'll need to look in that file to make sure there are no duplicate IDs.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I have made it using MFC AppWizard. It was working perfectly fine untill i included some files in my project. I needed them for my network programming.
We Believe in Excellence
www.aqueelmirza.cjb.net
|
|
|
|
|
I got a point here. I have included a header file named server.h and a source file server.cpp in my project. When i try to include my CFileSenderDlg.h that is dialog class in server.h, i recieve that error. But i need to include dialog class in server.c-pp. What should i do?
Thank you
We Believe in Excellence
www.aqueelmirza.cjb.net
|
|
|
|
|
Do you have #include "stdafx.h" at the top of server.cpp ? Do you have #include "stdafx.h" and #include "resource.h" at the top of CFileSenderDlg.cpp ?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Yes i have.
We Believe in Excellence
www.aqueelmirza.cjb.net
|
|
|
|
|
Then I'm not sure where the problem lies. Sorry.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
im not sure but i think you have two problems because if your problem was include you get
error C2065 but you get another error error C2057
whitesky
|
|
|
|
|
When i add MSHTML.h file in any application there is shows some error in this file.
syntax error : identifier 'LONG_PTR' i really cannot get what is this error is for what should i include other than this file.
Shikha
Pune
|
|
|
|
|
Shikha Jain wrote: identifier 'LONG_PTR'
identifier LONG_PTR what ????? undefined ? symbol unknown ?
what is the compilation error number, and exact message please ????
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
I think it is defined in basetsd.h header. Just include that header, and it should be fine.
In the Microsoft SDK, it is defined as:
typedef _W64 long LONG_PTR, *PLONG_PTR;
As you can see it is a long in disguise.
this is this.
|
|
|
|
|
Can you be more specific whats application type?
whitesky
|
|
|
|
|
I read from a file , when I reach :
<#if ... #>
when the " ... "(something) is short the fgets function reads true
but when the " ... "(something) is a little longer the fgets function read incorect
what is the problem???
thank you
|
|
|
|
|
if you look at the fgets()[^] function behavior, it waits for a "maximum characters to read" parameter ; so i believe that your problem comes from the length of your buffer (if you read a line which is wider that your buffer, it will be truncated)
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
no , i put n=1000 and ... is less than 100 characters .
and also when i read :
dsalgujbslgkusdhglidsufhgllkufg
it is true but
<#if dsgubsldfjgblfdgbldfgb #>
is false !!!!!!!!!!!!!!!!!!!!!!!!!
i dont know why fgets act like this .
|
|
|
|
|
use you debugger to compare the string you read and what is actually filled in your buffer.
btw, do you have any \n, spaces or escape characters in the string read ?
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
I haven't any '\n' , space and scape . this is what happens :
the file is:
<#if...#>
hello
the code is: --------------- debugger shows :
char string[1000]="";
fgets("adress",1000,input);
fgets("adress",1000,input);
|
|
|
|
|
My be fgets("adress",1000,input) must be replaced with fgets(string,1000,input) ?
|
|
|
|
|
AH ofcourse it was a misprint , it is true in my code .
-- modified at 8:54 Tuesday 6th June, 2006
|
|
|
|
|
Can you post your code ? (With the opening of the file also)
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
how can I post the files to you ?
|
|
|
|
|
Just post the relevant information here (the code snippet that opens and read from the files with the variables that are used). Please use the code tags (above the emoticons)
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
code is :
int main()
{
char khat[1000];
clrscr();
int i;
for(i=0;i<1000;i++) {khat[i]='\0'; if(i<100)counter[i]=0;}
FILE *f;
f=fopen("falle//in2.htm","r");
for(i=1;i<1000;i++)
{
fgets(khat,1000,f);
printf("%s\n",khat);
if(strcmp(khat,"</HTML>")==0) break;
}
fclose(f);
char ch=getch();
if(ch==27) return 0;
return 0;
}
and file is :
<HTML>
<BODY>
<#if( 1+2^3 < 2*(2+3)+1-1+1-1+1-1+1-1+1-1+1-1+1-1+1-1+1-1+1-1+1-1 )#>
correct
yes , it is correct
<#fi#>
incorect
<#loop 4#>
this is in the loop
and number is :
<#i#>
<#do#>
</BODY>
</HTML>
|
|
|
|
|
I think you should provide the entire fragment between the line where you open the file (fopen ) and close it (fclose ), and may be a precise content of input file. Perhaps, someone will figure out the problem.
If your program is too big, try to remove (comment) some fragments, keeping file-processing only. Thus you should be able to reproduce the problem for a smaller program.
|
|
|
|