|
When i insert into a DBGrid Ctl to a dialog , and open attribute page to set some items,then click confirm , then the VC2005 flush and give a dialog to send error message to Microsoft! why like this ???
What Grid Control can i use in VC2005
i love c++
|
|
|
|
|
|
Did you see Database section on the codeproject?
|
|
|
|
|
Aren't you being a bit cocky there? Rushing us and demanding detailed answers? We ain't your slaves, neither is this the Shen Long of programming...
Windows Calculator told me I will die at 28.
|
|
|
|
|
We don't care if it's urgent.
We expect you to write your own code.
|
|
|
|
|
I need a help.
Actually I want to get the input text from user from window and I need to convert text to pdf how is it possible ? give me some hints.
|
|
|
|
|
Did you use of google for it?
|
|
|
|
|
|
Can I accomplish this?
My program has a table representing a bitmap
Writes down the bitmap into a file
Read the bitmap
Show it
Close window
Delete file
In VC++ 6 please
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
Do you want to load image file?
|
|
|
|
|
yes
a file containing a bitmap from the application directory
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
You can use of CImage class for load jpg,bmp,....
|
|
|
|
|
I can't use CImage in VC++ 6!
What to do?
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
By "table", do you mean a grid with pixels?
If so, you don't need to do that - Windows does it for you.
I would write the basic code for you, but shouldn't it go like this?
Read the bitmap
Show it
Do something with it
Writes down the bitmap into a file
Close window
And, not that I'm nosy, but why would you delete the file right after using it?
Windows Calculator told me I will die at 28.
|
|
|
|
|
the program has into a table a compressed file of type bmp
it writes the table into a file
decompress the file
read the bitmap
close and delete file
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
Hi all,
I am trying to convert CString in char* using this code
CString inFName;
m_InList.GetText(i,inFName);
char *test= new char;
sprintf(test,"%s",inFName);
on a vc2005 compiler.
My problem is supoose i get "D:\COMPRESS\ziparchive.zip" in my CString variable then after converting it in char* variable the value in test is "D".
I am not getting what exactly is the problem.
Can anybody please help me in this.
Thanks in advance
|
|
|
|
|
neha.agarwal27 wrote: char *test= new char;
You have allocated memory for only one char. That why only first char is copied.
Why can't you use (LPCTSTR)inFName .
Regards,
Paresh.
|
|
|
|
|
You have two problems, I think.
1/ You are making a character pointer, but only pointing to one character. That's *1* byte of RAM. I can pretty much guarantee that your string is longer (remember it will finish with a NULL... So you will get two BYTE used, and quite likely more - so you could crash your program (if you're lucky) with string overflow. I think you're have compiled in debug mode, which will give you a little room either side of variables, which is why you're surviving this error.
2/ You are making a character pointer, but I bet your software has been compiled as UNICODE. Which means CString will be unicode too. Then you're just giving sprintf the raw CString object (not even ussing (LPCTSTR) in front of it. Frankyly, I'm surprised you don't get more than gibberish.
Answers...
If your string is not guaranteed to be US english friendly, converting it to char * is almost certainly a bad idea. What if your program was used in Korea?
If you're certain...
Look up the function WideCharToMultiByte in MSDN - and using google should be able to give you plenty of examples. If you use it with certain parameters (as described in msdn) then you can get the length of string you need to pass it. (There's a link on the msdn page to example code).
Iain.
|
|
|
|
|
If you just want character pointer you can use macros as suggested above or use GetBuffer(iLen) function.
if you are using UNICODE try using macros W2A() inside sprintf if you wish to use same codebut offcourse allocate appropriate memory before.its defined in atlconv.h
Thanks,
SandipG.
|
|
|
|
|
Hi
I've been searching all over for an answer to this questíon.
I wan't to make a plugin (Active Document Server) for Internet Explorer that takes effect based on the content type (i.e. *.myextension)
How do i register my DLL with Internet Explorer so that this will happen? I've gotten as far as being able to "Insert Object..." in Word etc. but when trying to open files in IE it just forces download. This is of course local testing.
In other words: What I need is the same feature Word and Adobe Reader implements in IE that enables IE to view .doc and .pdf files...
If you could point me towards a sample app that does this i'm in your debt!
Any help would be much appreciated!
MSDN has a sample app called ActiveDoc but that werent much help - and also their documentation on the subject seems very sparse at most.
I've also been able to find some information regarding the registry but i am not allowed to change this entry (local Vista machine running as administrator - only user allowed is "TrustedInstaller").
I'm developing in VC++ 2008.
Thanks in advance!
----------------
The Hoff
|
|
|
|
|
Hello. I'm trying to get data off of a web page. I'm able to stream in the data using CHttpFile, but I need to set some attributes first. Does anyone know how to do this? I think I have to get a document from a browser object but I can't find any examples that show me how to do this. After that it would be handy to be able to parse the HTML code into something simpler (ideally it would be the .csv format). Can anyone steer me in the right direction? Thank you.
Tom Paronis
|
|
|
|
|
Tom Paronis wrote: ideally it would be the .csv format
Really? Much of the community is using XML these days.
Tom Paronis wrote: but I need to set some attributes first.
Maybe it's just me but that needs some clarification
|
|
|
|
|
I've been able to get the IWebBrowser class to connect with the document. The next step is to set the proper variables and pull up the data I need. Once I get to that point XML may be the answer. I've never worked with it. What's nice about .csv files is that I have a delimiter class that lets me enter a number and a delimiter (a comma in this case) and extract the data I need. I'm surprised there aren't some data conversion classes out there (or in VC++). I'm sure I'm not the only person out there who has to pull data out of HTML pages. Thanks for the reply.
Tom Paronis
|
|
|
|
|
|
This does help! I should be able to pull some useful concepts out of this. Thanks.
Tom
|
|
|
|