|
nbugalia wrote: When I am using ListControl on the dialog, the dialog is not becoming visible.
Can you elaborate, please?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
i want to read html file usin c++ or vc++ help me please
thanks in advance
|
|
|
|
|
See here[^]
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
The answer to your actual question is:
You do it the same way you'd read any other file: CreateFile, ReadFile, CFile, CFile::Read, etc.
If you mean a file on a webserver somewhere, that's different.
Lookup InternetReadFile, InternetOpenUrl, etc. Read the documentation for those very carefully.
But that will just give you a big bunch of html.
If you want your program to understand the html, that's different again. But "parser" is the right search term to use. There are articles on codeproject that do various amounts of it, it will just depend on how sophisticated you need to be.
If you want to display html to a user, it's easier - look at CHtmlView in MFC.
Good luck,
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!
|
|
|
|
|
I have a application where data will get stored in SQL 2000 database. Now i have to retrive data from database & store it in the excel file.
I am using VC++ 6.0 version with MFC, SDI & database connectivity through ODBC.
Could any one guide me to achieve this? Kindly let me know if you would need more details to reply to my question.
Thanks in advance.
Regards,
Dipti
|
|
|
|
|
This link might help you.
http://www.codeproject.com/KB/database/simple_odbc.aspx
Being an Indian makes me feel proud.
|
|
|
|
|
Thanks for your reply. I am new to VC++. This example is without MFC. Could you send me details on how to retrive data from SQL & store it in Excel.
Could you guide me on how to go about this?
Regards,
Dipti
|
|
|
|
|
diptipanchal wrote: Could you guide me on how to go about this?
Break the problem down into more manageable parts. Can you extract data from the database (e.g., using CRecordset )? Can you use Excel Automation?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
No, I have neither read data from database nor used excel automation before.
Could you send me some link or literature on the above?
|
|
|
|
|
diptipanchal wrote: Could you send me some link or literature on the above?
I have 2 semi-related articles.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
How do we create a language pack?
Is there any tutorial available ?
Please provide the link.
Thanks
|
|
|
|
|
If you mean for windows? I strongly doubt you can.
If you mean you want to have multiple resources in different languages in your software, well, just go and add them! Just right click to get properties and set the language of your choice.
There are articles on CP about internationalization / internationalisation you can read for more information.
Good luck,
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!
|
|
|
|
|
Maybe it's "Resource Only Dlls" you are looking for.
...Plug & Pray...
|
|
|
|
|
I have created Resource only DLLs already but my system is not supporting all languages.
This will happen with the client also. So how can I support languages without installing language pack either through WIN XP CD or through microsoft site.
Where can I get free language pack which I can attach with my software.
Plz reply soon.
Thanks
|
|
|
|
|
Hi ,
I have a problem of memory leak when we call a function from win 32 DLL in our MFC program.
DLL is C type and return value of my DLL is Char* and it is locally defined in function of DLL. and size is 1024 byte.
when functon call four times then MFC application hold 4 KB Extra memory.
|
|
|
|
|
Is the DLL allocating memory that the char* points to, on the heap? Probably then the calling application must free this memory up? Do you have any docs for that DLL? Or if you have the source code, you may verify this.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
i m using New and Delete in calling application(MFC).
but "delete []cData;" line have error runtime.
if we use cData='\0' and after this "delete []cData;"
then memory leak still continue.
how can free memory in MFC application.
|
|
|
|
|
If the memory is allocated with new in the DLL, then clean it up with delete after you've used the data. Where is the difficulty? I don't see anything more to 'discuss' about here.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Actually i am using static linking a dll.
so when we used delete then runtime error occor about heap
|
|
|
|
|
When returning char* as return value, you must allocate memory in heap(using malloc or new), from your DLL and deallocate this memory(free or delete) after usage from the calling applciation.
prvn
|
|
|
|
|
i m using New and Delete in calling application(MFC).
but "delete []cData;" line have error runtime.
if we use cData='\0' and after this "delete []cData;"
then memory leak still continue.
|
|
|
|
|
shivanandgupta wrote: if we use cData='\0' and after this "delete []cData;"
then memory leak still continue.
That should not be a surprise...
Either you are just making a silly mistake (which we all do), or it's a bit more complex and you are allocating and freeing from different heaps. This could happen if you statically link to the C++ runtime.
One simple choice would be to use IMalloc to allocate / free chunks of memory. Look at CoGetMalloc etc for documentation.
I still think it's likely to be something dumb... Are you sure the memory is not already freed elsewhere?
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!
|
|
|
|
|
Thanks for Reply
i am calling DLL statically
|
|
|
|
|
i don't have any idea to use Imalloc and cogetmalloc function to free memory.
i m using statically DLL not a COM
|
|
|
|
|
shivanandgupta wrote: if we use cData='\0' and after this "delete []cData;"
then memory leak still continue.
Well, if you set cData to '\0' you are manipulating the pointer, not the data it contains.
cData is set to null, and that is what you try to delete (and it always succeeds.)
Doesn't the DLL supply an API for freeing this string? IMHO dll's should always be designed that way.
|
|
|
|