|
Yay thanks. It was something like this i was looking for. So i basicly just make my updating between the PostMessage and WinExec
|
|
|
|
|
I need to disable CListCtrl, so user won't be able to do anything with list control.
I'm calling CListCtrl::EnableWindow(FALSE); to do that, but it also
displays list control in gray color.
How to disable this without changing the color to gray ?
Thanks !
rrrado
|
|
|
|
|
In general you cannot change the color of a control that is in a disabled state without subclassing.
Kuphryn
|
|
|
|
|
I got a lot of include files in vc6 like ios.h that are or damaged or they have errors, and i cant make programs that use them, also, vs.net timetrial have those files working, but it doesnt have some files i got in vc6. what is wrong here?
also, do you know where i can find learn-yourself-style tutorials about game programming?
|
|
|
|
|
|
I want to convert a char * to unsigned char[](or fill that array with char * string) but I can't find it, I can do reverse of it but not this one.
Mazy
"A bank is a place that will lend you money if you can prove that you don't need it." - Bob Hope
|
|
|
|
|
It will be helpfull with little bit of code that you are trying to convert.
char *pszString;
pszString = new char[20];
now pszString can store upto 19 bytes of string.
you can either access it as
pszstring,
if you want to access each char then
*(pszString+index)
or
pszString[index]
hope i answered ur question properly.
|
|
|
|
|
Mr.Prakash wrote:
now pszString can store upto 19 bytes of string.
WRONG!
You allocated 20, right? How can you say it can hold 19 bytes then?
You know, it is starting from 0, that means 0 is the first element.
Rickard Andersson
Here is my card, contact me later!
UIN: 50302279
Sonork: 37318
|
|
|
|
|
i allocated 20 bytes, 19 bytes for some string and the 20th for \0
|
|
|
|
|
But ASCII 0 is still a valid character, it just happens to be a special one. Allocating 20 bytes on the heap means you can store 20 bytes.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
DavidCrow wrote:
Allocating 20 bytes on the heap means you can store 20 bytes.
yep but you cant store 20 'A's
|
|
|
|
|
Of course not. I was simply saying that your "now pszString can store upto 19 bytes of string" comment was off by one.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Thanks for reply, I have a problem now, see this code:
for(int i = 0 ; i < sizeof(mypointer);i++)
buffer1[i] = *(val+i);
sizeof(mypointer) cause the loop only run 3 times and other chars do not copy to array , if I change it to a larger number like 200 it works ok but I don't know how to get size of it dynamiclly.
Mazy
"A bank is a place that will lend you money if you can prove that you don't need it." - Bob Hope
|
|
|
|
|
Mazdak wrote:
sizeof(mypointer)
Change to:
strlen(mypointer)
When you do sizeof of a pointer it returns the size of the pointer, not the length of the string.
Rickard Andersson
Here is my card, contact me later!
UIN: 50302279
Sonork: 37318
|
|
|
|
|
Thanks again Rickard.
Mazy
"A bank is a place that will lend you money if you can prove that you don't need it." - Bob Hope
|
|
|
|
|
change it to this way.
for(int i = 0 ; *(val+i)!=NULL;i++)
buffer1[i] = *(val+i);
since pointers are always 4 bytes sizeof(anypointer) will always return 4
|
|
|
|
|
Mazdak wrote:
but I don't know how to get size of it dynamiclly.
strlen will give you the size of the string pointed by the pointer.
|
|
|
|
|
Thanks.
Mazy
"A bank is a place that will lend you money if you can prove that you don't need it." - Bob Hope
|
|
|
|
|
If I understand you, you want to copy the data from a char* to a unsigned char[]?
char* p = "bla bla";
unsigned char uch[WHATEVER_SIZE];
strcpy(reinterpret_cast<char*>(uch), p);
cout << uch << endl;
Rickard Andersson
Here is my card, contact me later!
UIN: 50302279
Sonork: 37318
|
|
|
|
|
Yah, thats what I want. Thanks.
Mazy
"A bank is a place that will lend you money if you can prove that you don't need it." - Bob Hope
|
|
|
|
|
Hello,
I have an ".Emf" file on my harddisc,Which I would like to display to screen.
I used the "PlayEnhMetaFile" function for displaying the emf to screen,so far.But It has some problems displaying certain kind of EMF files.
Is there any other way by which I could display the Emf File other than using the "PlayEnhMetaFile" or "PlayMetaFile" functions.
Could any one show it with a piece of sample Code.
Thanks..
|
|
|
|
|
This isn't exactly VC++ but I'm having difficulty with the InstallShield that comes bundled with it so...
At the end of installation, in the "Finished" dialog, I want to give the user the option to display the readme file and launch the program. I know how to add those the text for those options and read the results of the user's selection but how do I actually perform those operations?
In the InstallShield script, how do you display a text file in Notepad and launch the installed software?
|
|
|
|
|
Anybody know how delete operator works over dynamically allocated 2-D array ? How is come to know about the bytes allocated ?
Vikram S
|
|
|
|
|
The memory location is contiguous.
Kuphryn
|
|
|
|
|
Yes, I meant generally arrays are allocated in continous memory locations.The issue is not that. How the delete operator comes to know about "How many bytes to be freed?"
|
|
|
|