|
I think I'll never buy products from your company .
Seriously, I don't think this is a good solution ! Maybe the user doesn't want that your program kills its own applications don't you think ?
A better way would be to solve the problem itself. Maybe this is due to thread priority or something like that.
|
|
|
|
|
Hi Cedric
What you said was perfect. But I am using a thread with a real time priority for that. But still the disturbances happen.
Regards
Sreekanth Muralidharan
Sreekanth Muralidharan,
Corporate Systems Consultant [Embedded Systems],
INDIA
|
|
|
|
|
Hi:
I overload the CToolBar class , and process the default TBN_GETINFOTIP event to dynamicly changge the tips.
( ON_NOTIFY_REFLECT( TBN_GETINFOTIP, OnGetInfoTip)
the way works well. Then I create a toolbar in the statusbar in one of my project, but this way doesn't work at all. I couldn't get the OnGetInfoTip event form the toolbar created in the statusbar now. Why? how could I do?
Thanks
Benben
|
|
|
|
|
Get the tooltip control associated to your toolbar (MFC : GetToolTips()) and call the RelayEvent() function once after the init of the toolbar.
~RaGE();
|
|
|
|
|
|
Hey guys,
I'm absolutely not a experienced programmer but i have a problem, i will be happy someone can help me.
I have a dialog class CSimulator with a number of timers:
//part of the XXXXX.h file ****************************************************
class CSimulator : public CDialog
{
DECLARE_DYNAMIC(CSimulator)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
DECLARE_MESSAGE_MAP()
...
...
...
public:
virtual BOOL OnInitDialog();
void OnTimer(UINT nIDEvent);
//part of the XXXX.cpp file ****************************************************
IMPLEMENT_DYNAMIC(CSimulator , CDialog)
void CSimulator::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CSimulator, CDialog)
ON_WM_TIMER()
...
...
END_MESSAGE_MAP()
void CSimulator::OnTimer(UINT nIDEvent)
{
...
...
...
CDialog::OnTimer(nIDEvent);
}
When i start the class CSimulator from another class (CWnd) with DoModal() everything is working fine and the function CSimulator::OnTimer(UINT nIDEvent) is called after setting a timer with SetTimer(IDTIMER,50,0);
But when i start the class CSimulator from another class (CWnd) with m_Simulator.Create(IDD_SIMULATION_DIALOG); (m_Simulator is the instance of class CSimulator)
i have a problem. In this situation i don't receive the ON_WM_TIMER message .
Note: At another situation i need the class CSimulator (CDialog) showed in a window, but in this situation i only need the algorithm of the class, only modeless
What i'm doing wrong? I search a lot, but don't see the problem, can anyone help me?
Thanks, Bart
|
|
|
|
|
ON_WM_TIMER requires a message pump to be running, that's why you are not getting the messages.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Thanks, but how can i solve the problem? What is it for a message pump?
Greetz, Bart
|
|
|
|
|
Probably a silly question but where are you calling SetTimer() from?
If you are calling it in IntiDialog() in the CSimulator class then
it is never getting called when you instantiate and create the dialog
class from your CWnd class. If not then maybe you have some other code
in InitDialog() that needs to be run.
Steve T
|
|
|
|
|
Hi,
I've trying to create a browser helper object (BHO) for explorer. I've got a main "manager" class that initializes two objects. Each of these uses an simple XML parser (using MSXML). Now, when parsing XML files, I want to store the results to a struct array (not a class). The struct array is in turn comprised of a few other struct arrays. All mem allocation is static, only the topmost parent struct array is dynamically allocated. That's where the problem is: When I allocate (using new) the struct arr in the first object, its ok. Then when I init the second obj, the new fails and crushes the explorer. I did a simple test in the second obj:
int *i = new int[x];
when x is <255 it's ok. if x>=255 then it crashes (and of course, my struct arr is bigger than 255*sizeof(int) bytes). I don't think I have any serious mem leaks in the code before this.
Has anyone seen this before? Is there a memory limit imposed by explorer (unlikely as it sounds)? I would appreciate any comments.
Thanks,
Pete
|
|
|
|
|
Hello,
Can i edit a ms flexgrid(insert text into flexgrid and save it to a database).Or How can i place a textbox or combobox into a flexgrid cell.
Thanks in advance,
Best regards,
John.
|
|
|
|
|
Subclassing should be usefull
|
|
|
|
|
I cant seem to understand wat these errors indicate... Can U guys pls help...
Compiling...
ArrayDemo.cpp
Linking...
ArrayDemo.obj : error LNK2001: unresolved external symbol "int __cdecl sumArray(int * const,int)" (?sumArray@@YAHQAHH@Z)
Debug/ArrayDemo.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
ArrayDemo.exe - 2 error(s), 0 warning(s)
Then why should we turmoil in cares and in fears,
Turn all our tranquill'ty to sighs and to tears?
Let 's eat, drink, and play till the worms do corrupt us,
'Tis certain, Post mortem 25
Nulla voluptas.
For health, wealth and beauty, wit, learning and sense,
Must all come to nothing a hundred years hence. - Thomas Jordan
|
|
|
|
|
It indicates that the implementation of the
int __cdecl sumArray(int * const,int)
function is missing.
|
|
|
|
|
Truse me 2 make the stupidest of erroes.... LOL I mistypes Sum as Aum...
Thanks for the help though....... Really appreciate it
Then why should we turmoil in cares and in fears,
Turn all our tranquill'ty to sighs and to tears?
Let 's eat, drink, and play till the worms do corrupt us,
'Tis certain, Post mortem 25
Nulla voluptas.
For health, wealth and beauty, wit, learning and sense,
Must all come to nothing a hundred years hence. - Thomas Jordan
|
|
|
|
|
You seem to have declared the function sumarray(...) but forgot to implement it.
Rahim Rattani
|
|
|
|
|
|
Hello,
I copied a large file from one disk(source) to another disk(destination). After this I made (manually or programmatically) some changes in the file on the source disk. Now, these changes should reflect in the file on the destination disk also. In order to achieve this, I copied the file again from source to destination. Since the file is a large one this method is not efficient. Because, for any minute change, I have to copy the entire thing.
Is there any way to copy only the updated portion from the file on the source disk to the file on the destination disk?
Hoping to get a reply soon.
Thanks in advance.
regards,
Jahfer V P.
|
|
|
|
|
When you are making changes to the file, make another file (changes-file) also, with your own file format:
Repeat (1) below for every change:
1- The size of data in four bytes (long int) then four bytes (long int) for offset into the file for the data, then the data. Write this into your "changes-file".
Then when you need to update the destination file, repeat (2) below until the end of the file.
2- Read the "changes-file", and correctly read the length of data, offset of data, and the data. Then open the destination file in update mode, move into it at the correct offset, and write out the data you read from the "changes-file".
Does that solve the problem?
this is this.
|
|
|
|
|
Dear khan++,
That doesn't solve my problem, because I am not the person going to update the file. More over, the file may get updated not only at its end but anywhere in it.
Any other idea?
regards,
Jahfer V P.
|
|
|
|
|
jahfer wrote:
because I am not the person going to update the file
I don't get it.
The technique I gave can update the file anywhere in it, not just the end, that is why I asked for an offset field.
I hope someone else can help as I am about to logout for the day.
this is this.
|
|
|
|
|
|
Could any body provide me basic algorithms for Fading IN or Fading Out of the Image and other related EFFECT.
Thanks
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
I haven't done such a fade in filter but for a smooth
transition--one image fading to another--I'd guess you
just need to scale each pixel's R,G & B values in the
'old' image toward the R,G & B values of the corresponding
pixels in the new image.
e.g if you want to do a full fade from old image to identically
sized new image in 10 steps :
for ( each pixel position in the image(s) ){
<font color=#FBEDB5>__<font color=#000000>for (Step = 1; Step<=10; Step++){
<font color=#FBEDB5>____<font color=#000000>IntermediateR = OldR + (NewR-OldR)/10 * Step;
<font color=#FBEDB5>____<font color=#000000>IntermediateG = OldG + (NewG-OldG)/!0 * Step;
<font color=#FBEDB5>____<font color=#000000>IntermediateB = OldB + (NewB-OldB)/10 * Step;
<font color=#FBEDB5>__<font color=#000000>}
}
(Be sure to use signed types for the RGB values so that
the scaling will correctly handle the cases where R, G or B
in the old image are larger than the corresponding R, G or B
value in the new image.)
If you want to fade to (or from) a 'blank' screen just substitute
the constant 'blank' RGB values for the new (or old) image pixel
position RGB values as required.
Steve T
|
|
|
|
|
Thanks I will try it
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|