|
Hi!
I've developed a project developed under VC++. It was working fine. When I recompiled the project, the application crashed and showed me the error message, "Native has exited with code 1". After that I restarted the system and compiled my project. It worked fine for only once. Then it showed me the same error in the output window. I closed the project and tried to reopen it. It refused to open. It showed,"The application failed to initialize properly(0xc0000005). Click on OK to terminate the application. This error occurs for every VC++ project,I've developed. I'm running under Release mode. Debug has never worked for me. What might be the problem? How can I resolve this?
|
|
|
|
|
It is the problem with the registry.Ypur Visual studio registor may be corrupted.
So simply reinstall your VC++.
It will work fine
|
|
|
|
|
|
Hi All,
I derived a button class from the CButton class and it is working fine.
And I created an array of buttons dynamically the size of array is dynamic.
The issue is that I need to handle the click event of this buttons.
Can any one help me to solve this issue
|
|
|
|
|
Add ON_COMMAND_RANGE[^] macro inside the messagemap. In this macro, specify the first buttons ID as start ID and last buttons ID as end ID.
|
|
|
|
|
See here[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
In MSDN6.0 it is
WINSHELLAPI <big>LPITEMIDLIST </big>WINAPI SHBrowseForFolder(<br />
LPBROWSEINFO lpbi<br />
); <br />
But in windows SDK v6.1 documents the prototype of SHBrowseForFolder is
<big>PIDLIST_ABSOLUTE</big> SHBrowseForFolder( LPBROWSEINFO lpbi<br />
);<br />
And I type PIDLIST_ABSOLUTE in index of windows SDK v6.1 documents to find PIDLIST_ABSOLUTE, I can't index it.
Please help me to understand this!
|
|
|
|
|
So what do WINSHELLAPI , LPITEMIDLIST , and PIDLIST_ABSOLUTE expand to?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
PIDLIST_ABSOLUTE define as LPITEMIDLIST too.
Thanks.
|
|
|
|
|
The first one is from the "Platform Builder for Microsoft Windows CE 5.0".
The second one is from the "Windows Shell and Controls" documentation.
Unless you're coding for CE, you should be using the second.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I 've created a program which when minimized goes to the system tray and upon activation it restores... when it restores the icon next to the title in the title bar didnt show up... when the window is displayed for the first time the icon is present but when it is minimized to tray and maximized it disappers...
what is the functionality to redraw the icon...???
i am using API's and not mfc...
Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
Hi guys =) need a little help here...
Shouldn't this work?
class MyClass
{
public:
void method() {}
void (MyClass::*_callback)();
};
int main()
{
MyClass b;
b._callback = &MyClass::method;
(b.*_callback)();
return 0;
}
Fratelli
|
|
|
|
|
No, it shouldn’t work. Replace this:
(b.*_callback)();
with this:
(b.*(b._callback))();
C++ member function pointers are not like delegates in C#. The pointer MyClass::_callback identifies a member function of MyClass which returns void and takes no parameters (and has the calling convention __thiscall ): it doesn’t specify which instance of MyClass . The fact that the pointer is a member of the class is incidental and is probably what’s confusing you.
Steve
|
|
|
|
|
OK, Here's the deal. I have a dialog based MFC application and a large amount of data points (7296 of them actually) and I want to be able to graph these on a line graph on the dialog somewhere. One additional consern, I want to be able to do this from within a thread that is called frequently (every 8 ms).
So here are the questions.
1. Is it possible? LOL.
2. What object type do I need to add to my dialog class to use functions like polyline, which I see in a lot of examples? All of the examples are not using a dialog based app. Can you even use those functions with a dialog app? oops I guess that was two quesitons.
4. Is that a good way to approach this or should I be looking for a library?
5. Any good free libraries you know of that do this?
|
|
|
|
|
|
As an alternative from the other reply: I also made a chart control (see my sig) and I think it can fulfill your needs. Some remarks though: if you plan to do that from a worker thread, a better approach would be to send a user-defined message to the dialog on which you have the graph instead of accessing the graph directly from your thread: MFC objects can't be shared across threads.
Once you receive the message, you extract the point value out of it and plot it on the chart.
|
|
|
|
|
I have been going through all of the stuff you listed and I think at least something will work, I just haven't decided on what yet. Thanks
|
|
|
|
|
aei_totten wrote: Is that a good way to approach this or should I be looking for a library?
A simple line graph without 3D Vista spinning glitzery should be very simple to draw.
aei_totten wrote: I want to be able to do this from within a thread that is called frequently (every 8 ms).
8 ms? That's an animation not a graph. I don't think that is very realistic unless it's part of game or something.
led mike
|
|
|
|
|
led mike wrote: 8 ms? That's an animation not a graph. I don't think that is very realistic unless it's part of game or something.
Yes, it can be realistic: for example if you are receiving data from an external sensor that sends a point every 8 msec. Of course, the rendering won't be displayed every 8 msec because of the delays in the chain but the user won't see a difference (sometimes data will be enqueued and processed later for example).
|
|
|
|
|
There's still no reason to redraw faster than a monitor is refreshing
I'd personally save my CPU cycles for other work and throttle the redraws
down to 25-50 FPS (even 50 would be overkill) - there wouldn't be any visible
difference.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: There's still no reason to redraw faster than a monitor is refreshing
One 'reason' would be that the chart control you are using doesn't support refreshing at constant rate . Most of the time, you add a point to a series and the control displays it immediately. But you can do that in a better way (like I did for my control for example ): in the case of my chart control, adding a point to a series will only draw the missing segment. But of course that only happen under a certain condition: if the axes are not automatic for example (the control doesn't need to be refreshed in that case).
Another solution would be to store those points in your application and draw several of them at a certain time. But then you'll need to use a timer to trigger the redrawing of the points (or a thread).
|
|
|
|
|
Indeed!
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
now I'm making networking program.
I wanna send ICMP to network computers.
but one to one corresponding processing spend too many time.
so i have one question ICMP is possible to be sent by Multicast?
if it is possilbe, could you show me the code?
thank you intersted in my article
|
|
|
|
|
The answer is yes but only if all the routers/hubs/switches involved in handling the packets at every stage support multicasting. If all your network kit is newish top brands and or managed you'll probably be fine, any cheap and cheerful switches hidden away at the back of a cupboard that get involved may well break your system by failiing to route the multicast packets or just plain falling over in a heap. Sorry I have no relevant source code I just used to work with some multicast gurus a few years ago.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
In our project after fixing an issue or enhancement , it works well in DEBUG mode.But it doesnt work in RELEASE mode.We work on VC6.0 and COM.
I couldnt understand why it doesnt work in Release mode.So Strange!
What could be the possible reasons ?
Awaiting your replies,
Anandi VC.
|
|
|
|