|
VC uses these defines to help give you info on memory leaks in debug mode.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Dear Friends
Hi
I want to change the font of an edit window by pressing any particular key.So kindly tell how i can select point sizes of a particular font and change it accordingly.
Thanks in advance
Binay
|
|
|
|
|
Netmeisters,
I am trying to use OLEDB under Windows CE. To do this, apparently one has to use the Free method of the IMalloc interface to release memory returned by methods such as GetColumnInfo. I should be able to get a pointer to IMalloc with CoGetMalloc. However, when I try to use this function, I get an error of unresolved external. As far as I can tell, CoGetMalloc is supposed to be in ole32.lib, which is part of the project. This is with the emulator, incidentally.
Does CoGetMalloc not exist under WinCE for some reason? If so, how does one get the IMalloc pointer?
Any suggestions much appreciated.
|
|
|
|
|
AFAIK CoGetMalloc is not supported under Windows CE...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
If CoGetMalloc is not supported under WinCE, how do you release the memory allocated by the various GetProperties and GetColumnInfo methods of OLEDB? Is there another way of getting to the IMalloc interface, or do you just use delete or free?
Thanks,
Matthew Fleming
|
|
|
|
|
To be honest I don't know, I have not done COM programming under Windows CE. I could just see in MSDN that CoGetMalloc was not supported...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
I've done this exact project and I used CoTaskMemAlloc/CoTaskMemFree and malloc/free for allocating buffer space.
Bret Faller
Odyssey Computing, Inc.
|
|
|
|
|
In all the years with COM, I don't think I have ever used IMalloc directly.
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
hello gurus,
How do i set the homepage in IE? i would also like to display my own error pages and expedite search. Is this possible? Pl. send me any useful links to articles etc. I'm using VC.
TIA.
I'm an alien, I'm an alien
it's a beautiful life....
Bush
|
|
|
|
|
Ok, I'm advancing to a new level. I've designed an app and I would like to put a button wich says "look for an update over the internet"(in a tooltip, of course ). But I don't know anything about file transfer from a server. What do I have to do? Sign up for a hosting site to put the new version on them? Any of the sites will do? I mean those that let you put your web pages, are ok? Can you put an exe on them? And after that wich function do I call?
CFtpConnection ftp;
ftp->GetFile()?
How did you learn how to do it? Any links? Thank you very much!
|
|
|
|
|
try some of the articles on ftp that are under the Internet/networking section here at codeproject.
I'm an alien, I'm an alien
it's a beautiful life....
Bush
|
|
|
|
|
Hi!
I want a program that prevents a user to change the time on the computer. Lets say if the user tries to change the time the app will show a message that says the user has no permision to do that!
Is that possible?? Or.... help me!!
/*
BETA
*/
|
|
|
|
|
If you don't need to do it programmatically, I think under NT/2000 there's a privilege to change the time (that can be disabled). I don't know if the Policy Editor of Win9x lets you do that (? maybe "poledit.exe" on installation CD).
Paolo
------
"airplane is cool, but space shuttle is even better" (J. Kaczorowski)
|
|
|
|
|
Could you show where that function is to be disabled??
there were many alternatives!
(I cant log in if you wondering why I don't use "Rickard Andersson")
|
|
|
|
|
Is it with those .adm filoes you can choose this option??
Why not try to send the whole .adm file to me? that file that Win2000 uses!
hmm... what do you think about that?
|
|
|
|
|
<hack >- Set up a timer to fire at 100mSec. intervals and keep track of the current time in OnTimer().
- Override OnTimeChange() to set the time back to the last time read in OnTimer(). Use a flag to do this only if the time was not changed by your app.
</hack>
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I'm with you in the first section.. but when to use a flag.... how what flag?
can you show me?
|
|
|
|
|
When your app resets the time, you may (I'm not sure) get another WM_SYSTIMECHANGE message, causing your app to thrash. Use a flag to remember that your app manually reset the time. Clear the flag (if it was set) in OnSysTimeChange().
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
The function has to find the mode (number most found in the array, for ex. array[]{1, 2, 1, 1} the mode is 1 since it appears 3 times in the array while 2 only apears once.
movie is a class and it has a array of ints which movie.return_value(int) accesses. right now the mode equals the first number in the array, its like the second if isant getting evaluated right, anyway in my mind this should work and i cant find a way around it.
void getmode(movie_data movie){
int numfound0=0, numfound1=0, mode=0,
*num0ptr=&numfound0, *num1ptr=&numfound1, *modeptr=&mode;
for(int j=0;j<movie.return_count();j++){
*num0ptr="0;
" for(int="" k="0;k<movie.return_count();k++){
" if(movie.return_value(j)="=movie.return_value(k))
" if(*num0ptr="">*num1ptr){
num1ptr=num0ptr;
*modeptr=movie.return_value(j);
}
}
}
cout<<*num1ptr;
movie.put_mode(modeptr);
cout<
|
|
|
|
|
Hi,
Consider this code (yours is not readable):
GetMode(int array[], int count)
{
int freq, max = 0;
for (int i=0; i<count; i++)
{
freq = 0;
for (int j=0; j<count; j++)
{
if (array[j]==array[i])
freq++;
}
if (freq>max)
max = freq;
}
return max;
}
You have to replace array[x] with movie.return_value(x) and maybe some other few things, but the algorythm seems pretty simple.
You simply search for the most frequent value in the array.
Paolo
------
"airplane is cool, but space shuttle is even better" (J. Kaczorowski)
|
|
|
|
|
The function has to find the mode (number most found in the array, for ex. array[]{1, 2, 1, 1} the mode is 1 since it appears 3 times in the array while 2 only apears once.
movie is a class and it has a array of ints which movie.return_value(int) accesses. right now the mode equals the first number in the array, its like the second if isant getting evaluated right, anyway in my mind this should work and i cant find a way around it.
void getmode(movie_data movie){
int numfound0=0, numfound1=0, mode=0,
*num0ptr=&numfound0, *num1ptr=&numfound1, *modeptr=&mode;
for(int j=0;j<movie.return_count();j++){
*num0ptr="0;
" for(int="" k="0;k<movie.return_count();k++){
" if(movie.return_value(j)="=movie.return_value(k))
" if(*num0ptr="">*num1ptr){
num1ptr=num0ptr;
*modeptr=movie.return_value(j);
}
}
}
cout<<*num1ptr;
movie.put_mode(modeptr);
cout<
|
|
|
|
|
Hi,
Consider this code (yours is not readable):
GetMode(int array[], int count)
{
int freq, max = 0;
for (int i=0; i<count; i++)
{
freq = 0;
for (int j=0; j<count; j++)
{
if (array[j]==array[i])
freq++;
}
if (freq>max)
max = freq;
}
return max;
}
You have to replace array[x] with movie.return_value(x) and maybe some other few things, but the algorythm seems pretty simple.
You simply search for the most frequent value in the array.
Paolo
------
"airplane is cool, but space shuttle is even better" (J. Kaczorowski)
|
|
|
|
|
Hi!
I already searched everywhere and took a look at many, many exmaples on how using
DWebBrowserEvents2.
But I never got my DLL to work correctly
If someone has a link for me, where it is explained very easy (please NOT MSDN )
then tell me.
I took a look at the "CookieSpy" sample here at CodeProject, and would like to modify the source, that it will work without a dialog and only listen to DWebBrowserEvents2.
How can I easily modify it?
thanks in advance
|
|
|
|
|
Hi!
How can I change the different Windows cursors programatically?
I want the user of my program to be able to select a cursor file for one of the Windows cursors.
Thanks in advance!
Erik
|
|
|
|
|
Read about the SetSystemCursor in MSDN
|
|
|
|