|
I am not trying to solve the problem.
I am trying to understand what happening in VC++ compiler internals.
Other debuggers dont give this error but VS2005 gives in the first and third example but not others.
If i call a func. first it doen't give error but if i dont, it gives error.
I am trying to solve why it is so.
Thanks.
|
|
|
|
|
Hi,
just some "non-professional" questions.
Have you tried to derive your class from CObject?
class MyClass : public CObject
Give the class a constructor?
class MyClass
{ //...
MyClass ();
//...
}
inline void MyClass::MyClass () {x = 123; d = 456;}
What about if u give first a value to "x"?
int main()
{
MyClass a;
a.x = 123; //I mean so.
cout << a.x;
}
Im not sure (I'm not so good as other users here) but maybe your error is related to "trush" in memory when you use your class.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
The debug runtime is warning you that you are about to use an uninitialized object.
The member variables of the MyClass object are not initialized. You need to provide a constructor
or initialize them some other way to prevent the warning.
Note that you can continue running after the warning.
class MyClass
{
private:
int d;
public:
int x;
MyClass() {d = 0; x = 5;}
};
int _tmain(int argc, _TCHAR* argv[])
{
MyClass a;
cout << a.x;
int x;
cin >> x;
return 0;
}
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi,
Im hoping to build an application that would monitor activity on a PC caused by other users logged in over a network or a Microsoft Domain (wateva u mite call it in network jargon ). Would this be possible ? Would i be able to get a handle to the event when a user logs into any of my shared folders, by accessing my PC ?
Please give me some pointers,
thanx.
|
|
|
|
|
erajsri wrote: Would i be able to get a handle to the event when a user logs into any of my shared folders, by accessing my PC ?
See NetConnectionEnum() .
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
That is Ok, but what about any events that would fire when a user establishes a connection to a shared resource ( like a shared file or folder ), or is that unsupported ?
Where could I get more infor on how file sharing is done on Windows and developing applications for that ?
|
|
|
|
|
erajsri wrote: That is Ok, but what about any events that would fire when a user establishes a connection to a shared resource
I do not know of any such event. I would think a timer would suffice.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi i am also doing the same kind of project...
where in i have to track the devcies that comes in to network and i have to diaplay the images of them or atleast the name so f them whenever a device comes in to the network.
how can it be done?
thanks in adavnce
|
|
|
|
|
Is any one know how to develop directshow image overlay filter
RajeshGupta
|
|
|
|
|
What type of filter? A renderer filter (the VMR does image overlays)?
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
No, It should be transform filter that connects between two filters
RajeshGupta
|
|
|
|
|
If you've never developed a DirectShow filter, then I highly recommend using the handy base
classes provided in the SDK. Actually, I can't imagine how much code it takes to write one
without using these classes.
The process is detailed here: Writing Transform Filters[^]
In step 1, you'll probably want CTransInPlaceFilter or CVideoTransformFilter derived code
in your filter.
The "Grabber Filter Sample" sample application in the SDK is a good reference (and possibly a
starting point) if you need hints on accessing the video frames as they go by in the graph.
The overlay part is the "easy" part. If you have a video frame, you can use GDI/GDI+ to
draw the overlay on the video frame.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
i have to create msi files in visualstudio 2005. how to avoid the minimize button in the setup
|
|
|
|
|
Trying to change a field from a TextBox to a DropDown Combo Box. I've entered the strings for my Items list. I think I should be storing a short in my data file as the index which points to the corresponding string in the list. Is this right approach? Also how do I display the correct string from the retrieved record? I'm new to C++.
Thanking you in advance for your help and time.
|
|
|
|
|
Jerry Burns wrote: I'm new to C++.
Which version?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I'm beginning to learn the Professional version of Visual Studio .NET 2003.
Thanking you in advance for your help and time.
|
|
|
|
|
Ok, so what is it about a combobox that is troubling you?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
In my form I have a ComboBox named Title. Apparently I have it set up ok in the form becaue I can see and change the values which I have entered in the Items list.
I haven't entered any values for properties Data Source, Display Member or Value Member. Do any of these properties need a value. If so can you explain?
When I created my data file I set the index for the title field to -1 for all records. I believe this initializes the field to empty. My understanding is that index values of 0 to n map to the strings in my items list. Is that correct?
In the Random Access Record I have set up a field name "title" as a short to hold the index value.
I have button to advance through the file. The only thing that displays ind the title Combo Box is -1. I can't figure out what to do to display the associated string and not the index value itself.
Also if I make a change to another item in the list and then save the reocrd the string is replaced with a 5 digit number.
Can you help me out?
Thanking you in advance for your help and time.
|
|
|
|
|
Jerry Burns wrote: Can you help me out?
Sadly, I cannot. My compiler of choice is VS6.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi,
I have a list of UI threads that need to be close and clean up properly when user click "Exit" in the main GUI. How to do it?
Here's what i've tried:
CFrameWnd::OnClose()
{
for (i=0;i < my_number_of_thread; i++)
{
pThead[i]->EndThreadSafely();
}
ClearThreadList();
}
But my application crash in the end, debugging show an error at the AfxEndThread() that I call at the end of CMyThread::EndThreadSafely()
|
|
|
|
|
You end UI-threads by posting a WM_QUIT message to the thread.
After you've posted the message you may wait for the thread to terminate by waiting on thread handle with e.g. ::WaitForSingleObject() in your main thread.
Avoid AfxEndThread() , simply let the thread exit from it's controlling function which is the message pump in the UI-thread case.
For more info read here[^] and here[^].
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
set CWinThread::m_bAutoDelete member to true!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
how i can provide keyboard shortcuts for emoticons in a chat program
|
|
|
|
|
Can you explain your requirement providing some more details?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I would use a user-configurable toolbar that displayed the emoticon image (with text in a tooltip). You could associate a shortcut to each button, just like other toolbars, and hide/show the toolbar.
Best wishes,
Hans
|
|
|
|