|
I think from memory you have to #define _WIN32_IE to be 0x0500 or greater before #include ing shlobj.h
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I take part in one project to design one real-time data captureing system.Here is a brief about it.
1.Program is PC based with windows OS.
2.Program is used to monitor several external devices using COM port.
3.There are 1~4 external devices to be monitored. There are 4 COM ports in PC
4.The program is MDI style.
5.For data from COM ports it will be interpreted and displayed on several views.
6.For each port, there are a set of views responsible to display the data.
I plan to use MESSAGE to DRIVE each views when data is coming from each port. But the issue is that too many messages are broadcasted to each view from several COM ports.
What should I do for a good solution on this application? Can you pls give your good iead?
Thnks in adnvace!
Sam
|
|
|
|
|
Is there any way to use VS2003 or VS2005 for development and still link with VS6's C runtime libraries?
thanks!
|
|
|
|
|
why do you want to link with vc6 runtime, is there any specific reason do it?
-Saurabh
|
|
|
|
|
Saurabh.Garg wrote: why do you want to link with vc6 runtime, is there any specific reason do it?
Oh yeah, so that I dont have to expect msvcrt7 dlls on the end user system.
thanks!
|
|
|
|
|
The only way I'd expect this to work is if you disabled exceptions, disabled /GS support, used /NODEFAULTLIB, provided your own mainCRTStartup, and removed most use of the new CRTs.
But if you've done all of this, you may as well static link, to remove all dependence on any CRT DLLs.
|
|
|
|
|
Well install both VC6 and VS2005, Create the project in VC6 and then try opening in VS2005 should work.
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
I have several programs installed in my machine which add themselves to explorer context menu. I was looking for a program that can re-organize them. for example if menus are in order
----
A
B
C
D
----
I want to change them to say
----
D
A
C
B
----
But I am not able to find such a program. So I was thinking of writing one myself. My question is - is it possible?. If yes then how? any pointers?
-Saurabh
|
|
|
|
|
I've got a quick question regarding the intellisense available from Visual Studio 2005 in my "native C++ static lib" project.
I've rearranged a lot of classes and yet the intellisense is way off. How to I force it to rebuild intellisense properly? The progress bar "updates" intellisense every so often but is now totally off.
Is there a file I can delete? Is there a menu item to mash?
Thanks!
-Chris
|
|
|
|
|
Yikes!
It's the same old .ncb file that we were used to in Visual C++ 6. Sweet I just deleted it and *boom* it rebuilt properly.
Sorry for what was most likely a re-post (it's been a long day already)
|
|
|
|
|
I am having trouble converting a CString variable to a char* variable below:
CString hello("CString");
char* hello1=new char[hello.GetLength()+1];
_tcscpy(hello1, hello);
Error 1 error C2664: 'wcscpy' : cannot convert parameter 1 from 'char *' to 'wchar_t *' d:\projects\c++.net\test3\test3
Why it is wrong?
Thanks in advance.
-- modified at 15:54 Thursday 9th March, 2006
|
|
|
|
|
yellowine wrote: char* hello1=new char[hello.GetLength()+1];
Change to wchar_t .
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
I use the char* hello1 for an OpenGL function which take strictly a char* parameter. and s wchar_t variable will not work for the gl function.
|
|
|
|
|
But does the use of wchar_t get rid of the C2664 error? There are ways to convert between Ansi and Unicode.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Unicode is turned on by default in 2005, so CString is a Unicode string, and _tcscpy is the wide string copy.
1) Use CStringA instead of CString
2) Use strcpy instead of _tcscpy
CStringA hello("CString");
char* hello1=new char[hello.GetLength()+1];
strcpy(hello1, hello);
"My dog worries about the economy. Alpo is up to 99 cents a can. That's almost seven dollars in dog money" - Wacky humour found in a business magazine
|
|
|
|
|
Dear yellowine,
If you need to convert a CString to ASCII in a unicode environment, there are several converting macros and functions available. Outof them, one of the easy to use is ATL conversion macro. Please see the code block below.
#include "ATLBASE.H"<br />
.<br />
.<br />
.<br />
<br />
CString csString( L"Hello" );
USES_CONVERSION;
char* pszTemp = W2A( csString );
<br />
Regards,
Jijo.
________________________________
Yesterday is history,
Tomorrow is a mystery,
But today is a present.
|
|
|
|
|
Easy way to convert CString to char*
CString str="JAYARAJ";
char *ch= str.GetBuffer(str.GetLength());
JAYARAJ
|
|
|
|
|
J5121982 wrote: Easy way to convert CString to char*
Which won't work for the case in the question. You'll get the same error that yellowine did.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
As per my understanding, the discuession topic is conversion of CString to char* in unicode envrionment( as UNICODE is default in Visual C++ .NET 2005 from previous posts). Whether this code block will work in a UNICODE defined project? i have tested the same in VS 6.0. But its showing compilation errors.
or is this work only with Visual C++ .NET 2005 ? please clarify. I have no experiance with Visual C++ .NET 2005.
Regards,
Jijo.
________________________________
Yesterday is history,
Tomorrow is a mystery,
But today is a present.
|
|
|
|
|
try this,
CString hello("CString");
char* hello1=new char[hello.GetLength()+1];
hello1 = hello.GetBuffer(hello.GetLength());
Have A Nice Day!
Murali.M
|
|
|
|
|
Hi,
I have a code in VC++ that takes user input values and gives the output. I need to copy all my user inputs and outputs after I execute the code. Dos based window is very small and shows only last part of the output. Is there any way in which I can get this output in a scrolling window background? I tried using quickwin version 1.0 but it only accepts user input and stops after all my inputs are over. It does not display any output at all.
Please help me out with this problem. Appreciate your time and efforts.
Thanks,
Ashu
|
|
|
|
|
APOTDAR wrote: I have a code in VC++...
Is this a console application or a GUI application?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
This is a console applicaiton.
|
|
|
|
|
As I've never tried it, this is just a guess. I don't think your application will be able to get information about the console window in which it is running. I think you'll need to create another console application that does nothing but call CreateProcess() and redirects the stdin/stdout handles of the child process. See here and here.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Dear Ashu,
Increasing the Console Screen buffer may solve your problem. please see the code block below. Please insert this code block at the starting of your program.
#include "Afx.h"
<br />
HANDLE hConsoleOutput = GetStdHandle( STD_OUTPUT_HANDLE );<br />
<br />
COORD stScreenBufferSize;<br />
stScreenBufferSize.X = 300;
stScreenBufferSize.Y = 1000;
<br />
SetConsoleScreenBufferSize( hConsoleOutput,<br />
stScreenBufferSize );
At the end of the program, please add some getch() function which waits for user input and then, take the console window and copy your required data from there.
Regards,
Jijo.
________________________________
Yesterday is history,
Tomorrow is a mystery,
But today is a present.
-- modified at 21:38 Thursday 9th March, 2006
|
|
|
|