|
hello
I post this question yesterday,but nobody answer it,so I posted it again,Maybe it's little and simple to you,but I really need your help.
how can I change the color of status bar with vc6? I mean the bottom of the window.
Thanks a lot.
hi all
|
|
|
|
|
|
Or you can simply do this:
YourStatusBar.GetStatusBarCtrl().SetBkColor(Color);
|
|
|
|
|
I've written a ZIP archiving app which can display the files in the archive in a ListView, like WinZip. I want to be able to drag a file out of the ListView onto an app so the app opens the file. I can get it to work when I drop the file onto the Desktop, but not onto an app/Desktop icon, much the same as Windows Explorer.
WinZip allows you to DnD a file from an archive onto an App.
Why can I drop it onto the Desktop, but not the App ?
How do you do this ? Are there any articles/examples on CodeProject ?
|
|
|
|
|
There are plenty of these articles in codeproject, like this one below,
http://www.codeproject.com/miscctrl/rdragdropfiles.asp
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
|
I have a serrious problem.I've developed an application on VC6 that used to work fine. Now I have converted it on VC.NET 7.0 and builded in RELEASE configuration. The problem is that it only works on my computer. On other computers that don't have VC installed it just doesn't start. If started with depends.exe (XP Support Tools) it gives the following error:
Second chance exception 0xC00000005 (Access violation) occured in "NTDLL.DLL" at address 0x77F8243D
Exited "program" with code 128(0x80)
They have all the necesary dlls. What should I do? I'm disperate.
If there is an error in program why does it work on my computer fine, and on other computers without VC .NET installed crashes without any errors??
Contact: nemoprod@go.ro, www.nemoprod.go.ro .
|
|
|
|
|
I'm not an expert in any sense on this but I think you need the latest .net framework download from microsoft?
Also this is the visual c++ forum. You wanted the .net forum I think.
|
|
|
|
|
I've reinstalled Windows on my computer and then installed VS.NET 7.0 and the program isn't working on my computer either. I have the .NET framework installed. Somebody help. This is strange.
|
|
|
|
|
umm. I am trying to convert some existing code I found that performed a quicksort on an array using leftmost element as pivot. I want to make the pivot selection random but I have run into logic errors for a long time. It seems to work sometimes now but not all the time so there is still something wrong and I don't know what. If someone could take a look and tell me where i went wrong I would appreaciate it.
#include <stdlib.h>
#include <stdio.h>
#include <process.h>
#include <time.h>
#define NUM_ITEMS 100
int numbers[NUM_ITEMS];// = {6,24,80,4,19,84,1,10,13,7};
void print(void);
void quicksort(int beg, int end);
void sort(int beg, int end);
void swap(int left, int right);
int pivot(int beg, int end);
void selectsort(int left, int right);
void main(void)
{
int i;
//seed random number generator
srand((unsigned)time( NULL ));
//fill array with random integers
for (i = 0; i < NUM_ITEMS; i++)
numbers[i] = rand();
//perform quick sort on array
quicksort(0, NUM_ITEMS);
print();
exit(1);
}
void quicksort(int beg, int end)
{
sort(beg, end - 1);
}
void sort(int beg, int end)
{
int position;
if (beg > end)
return;
if (beg == end)
return;
position = pivot(beg, end);
sort(beg, position - 1);
sort(position + 1, end);
}
int pivot(int beg, int end)
{
int left = beg, right = end, pivot;
int rand_subscript;
rand_subscript = (int) ((right-left) * rand() / (RAND_MAX + 1)) + left;
pivot = numbers[rand_subscript];
while ((numbers[left] <= pivot) && (left < end))
{
left++;
}
while (numbers[right] > pivot)
{
right--;
}
while (left < right)
{
swap(left, right);
do
{
left++;
}while ((numbers[left] <= pivot) && (left < end));
do
{
right--;
}while (numbers[right] > pivot);
if (right == rand_subscript)
{
rand_subscript = left;
}
}
if ((numbers[right] != pivot) && (numbers[rand_subscript] == pivot))
swap(right, rand_subscript);
print();
return right;
}
void swap(int left, int right)
{
int hold;
hold = numbers[left];
numbers[left] = numbers[right];
numbers[right] = hold;
}
void selectsort(int left, int right)
{
int l = left, r = right;
int ltemp, value, l_inc;
for (l;l<right;l++)
{
l_inc = l + 1;
ltemp = l;
value = numbers[l];
for(l_inc;l_inc<=right;l_inc++)
{
if (numbers[l_inc]<value)
{
ltemp = l_inc;
value = numbers[l_inc];
}
}
numbers[ltemp] = numbers[l];
numbers[l] = value;
}
}
void print(void)
{
int i;
for (i = 0; i < NUM_ITEMS; i++)
{
printf("%i, ", numbers[i]);
}
printf("\n\n");
}
|
|
|
|
|
FreeLemons wrote:
rand_subscript = (int) ((right-left) * rand() / (RAND_MAX + 1)) + left;
I think this should be:
rand_subscript = (rand() % (right - left + 1)) + left;
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I am using Visual C++ 6.0 and am having problems with the threads dialog box. I find that after suspending execution and opening the threads box, sometimes not all the threads in the process are displayed. I can see the threads in a suspended state in Spy++ though.
Has anyone encountered this problem? Any help would be appreciated.
thanks
Man Learns from History that he never learns from History
|
|
|
|
|
I'm sure there's a C++ expert who can explain who to overload the indirection to a member and deferencing a pointer.
<br />
class A{<br />
int m_i;<br />
float *m_pf<br />
};
My questions are how to use operator -> to return m_i, ->* to return m_pf.
What parameters to I use when create the method.
Does it work when you create a pointer to an object of type classA?
|
|
|
|
|
Well techincally it would be like this:
class A
{
public:
int m_i;
float *m_pf;
int operator->() const
{
return m_i;
}
float& operator*() const
{
return *m_pf;
}
};
But - while the * operator makes sense, the -> makes none at all. Why would you want a -> operator to return a basic type? (ie not a pointer to a class)
In fact, I belive if you compile the above you will get:
warning C4284: return type for 'A::operator ->' is 'int' (ie; not a UDT or reference to a UDT. Will produce errors if applied using infix notation)
return type for 'identifier::operator –>' is not a UDT or reference to a UDT. Will produce errors if applied using infix notation
The operator–>( ) function must return either a pointer to a class or an object of or a reference to a class for which operator–>( ) is defined.
The following example causes this warning:
class C
{
public:
int operator->(); // warning
};
It is meaningless to apply the member access operator to fundamental data types that have no member access. This warning message will appear when this happens.
|
|
|
|
|
It seems if I try to delete a record programmically using ADO with special characters (i.e Â) I will always get an unhandled exception error. But if I delete all records with special characters in them then run the delete program again, it works fine. Does this sound like a bug in ADO or did I forget something extra for special characters?
thanks!
|
|
|
|
|
How did you access your DBMS? Through ODBC using ADO?
Is the working program using the same database access engine? (like ODBC driver or BDE or others)
Sometimes some drivers do not support certain SQL syntaxes or characters. (mostly to maintain compatibility across platforms like ODBC)
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
Thanks! However I noticed something strange in the DB and believe the problem occurred because for some reason unknown, duplicate records were inserted especially where a primary key has been defined and I think it bombed on not knowing what to delete or just that the rules of a primary key field were broken with the duplicate records. [ ]
oh well...
|
|
|
|
|
Hi...
PLZ.. let me know any hint to manage size of CFormView dynamically...
Thanks...Have a Nice Life
---Sumit Kapoor---
|
|
|
|
|
Describe what the main windows.
Kuphryn
|
|
|
|
|
Hi all,
I created a template to convert any type, with defined "<<" to string.
But it hanges under .NET after some hunderd executions.
Can anybody see a problem in it?
Thanks in advance,
Boni
#include <sstream>
template<class T> string tostring(T i)
{
stringstream _tmp;
_tmp<<dec<<i;
return _tmp.str();
}
|
|
|
|
|
|
dec means decimal, see stl ref
|
|
|
|
|
I posted this yesterday but it sank under the various other requests ...so reposted this again :
hi !
I was testing out skinmagic demo for one of my apps,and came accross a few problems ..maybe experienced users can help me out on this.
problem 1 :
when i used irregular shaped dialog windows, the edges showed up as having a faint magenta lines ( i used magenta as my transparent color ).I made the image using photoshop 24 bit bmp,without any drop shadow.Can anyone tell me how to get rid of these edges?in the examples i saw dialog boxes with more complicated edges than mine but those didn't have a problem, and i am unable to find out the reason for this.Can anyone exolain why this happens ?
problem 2: i had a pulldown menu in my app, and when i skin it , the pulldown menu dissapears ! the popup menu (right click ) stays though...i mean it;s properly invoked on right click, but not the pulldown menu.
problem 3: As i said before i am using an irregular shaped dialog box in my main window.after skinning , the messageboxes are also assuming the same shape, which i do not one.i want my mnessageboxes to be plainer.Would specifying a control ID for the framedialog or the shapedialog help ?How can use a diff shape for my messagebox than my other dialog boxes?
I would be glad if anyone can solve my doubts.Thanks to all the contributirs in advance
Regards
Kane
"Some guys hack just to get themselves a girlfriend.What a pathetic reason, huh ?"
|
|
|
|
|
I'm afraid I've never heard of Skinmagic but why don't you contact its developers and surely they can help with these basic issues.
Neville Franks, Author of ED for Windows www.getsoft.com and coming soon: Surfulater www.surfulater.com
|
|
|
|
|
Hi..Checkout this...
Problem 1:-----------------------
Solution 1: Please position mask at right positon. your image & mask are not overlap exactly.that's not matter which tool you used to create background..as I always use painbrush.
Problem2:--------
Solution 2: this is your coding problem..please check again.
Problem 3:-----------
Solution 3: You sud use your own bug tracking system.. How? Make a Dialog and place static text on that. check error & show & use that dialog. One other way you can customize this by storing bitmap(and mask) setting in file or database. & while starting application check that file or database & use bitmap and mask according to that..
OK! Bye...
Sumit Kapoor
---Sumit Kapoor---
|
|
|
|