|
Right,
If you are inside an object and "this" is corrupt, you have a big problem.
You did already verify if the constructor is correctly executed?
If you create a view without templates, you need to create the object, then execute Create(...),
to create the window and following a OnInitialUpdate.
Then your view is correctly created and initialized.
But even not to create and initialize the window, the "this"-pointer should have a value
|
|
|
|
|
neha.agarwal27 wrote: assocsping[ping_index]->SetLogWindow(this);
At this statement, what is the value of the this pointer? Perhaps you meant to use AfxGetMainWnd() instead.
"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 everybody,
i create a ContextMenu myself via AppendMenu(...);
The string is for example "List customers"
So i can choose the "List customers" via the contextmenu or via Key F2;
If i wish to add a Accelerator Key ( which is ONLY for this view )
I catch the KeyDown Message and if it's the F2 Key i open the window.
Now i like to display the menu in this way "List customers F2" with a tabulator between the
string and F2 ( that other menu-items displays the corresponding key in one "column" )
"List customers\tF2" doesn't work.
Has someone an idea?
Thanks
|
|
|
|
|
Can somebody help in for ..
i have an MDI Application. In that if i open one Document and then close it (from the close of tht specific document's frame window)will ask me to save the file(As i had made this by calling setmodifiedflag(true)) . But when i tried to directly close the mainframe window application ask me save two times . In this case the Destroy window of the frame window (opened document )gets called twice ..
and due to this my application get asserted ...
Thanks for your time ...
|
|
|
|
|
Hi
To start VC++ from scratch what is the best way?? or What is the best way to read VC++?? What topics must be started first
|
|
|
|
|
You can start reading Charles Petzold, MSDN etc. You should be aware about threading, messages etc. It's not that you would be able to grab all VC++ in one go. Once you start developing some code you would really need some help from Pro's (there are lot's of them on CodeProject ). With the confidence factor increasing you can make a move to MFC, ATL, COM and other relevant topics and read books like Inside COM, Beginning ATL etc.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I think see www.cplusplus will be helpful for you.
|
|
|
|
|
Hi
Without using VC++ editor how to run the VC++ program in command prompt by writing the program in notepad.
Regards
Kranthi.
|
|
|
|
|
you have to read about using the compiler (and the linker) in command line...
but just being curious, why would you like to do that, if you already dispose of the VC++ compiler ?
|
|
|
|
|
Hai All,
I'm in a difficult situation.Please help me out.
My requirement is:
1.I should create a txt file through my application in which I'll store some data.(it's okay the problem lies in the next two steps)
2.The so formed txt file should not be editable or delitable manually by using explorer or any other by any one.
3.My application should be able to append to the earlier created file with new datas.
I want to implement this in VC++.
Please help me out if anybody have a solution.
robs
|
|
|
|
|
Just a thought though but it may be useful. You can create a system wide hook to check if a the user hits delete or selects delete from the pop up menu by right clicking a file. When the user deletes a file check if the name of the file is that of yours. If affirmative just don't allow the message to pass through. I know that this would sound a bit too hypothetical but this is one way you can achieve this.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
What about using the SetFileAttributes() API with the FILE_ATTRIBUTE_READONLY attribute?
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
How to sort values on an array. Just to get the top ten.
|
|
|
|
|
It would really depend on the type of array. If it's a integer array for instance you can use some sort of sorting algorithm. TO suggest a few you can look for quicksort, binarysort, bubble sort etc.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Use an array of the STL (vector or list) and use a sorting algorithm. See the first chapter in this article[^]
|
|
|
|
|
Try something like this:
------------------------
// CommandLine.cpp : Defines the entry point for the console application.
//
#include "StdAfx.h"
#include <iostream>
#include <iterator>
#include <algorithm>
int main()
{
using namespace std;
int numbers[] = {3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9, 3, 2, 3, 8, 4, 6};
int *pOnePastEnd = numbers + sizeof(numbers)/sizeof(numbers[0]);
cout << "Before sort:" << endl;
copy(numbers, pOnePastEnd, ostream_iterator<int>(cout, " "));
cout << endl;
sort(numbers, pOnePastEnd);
cout << "After sort:" << endl;
copy(numbers, pOnePastEnd, ostream_iterator<int>(cout, " "));
cout << endl;
return 0;
}
Steve
|
|
|
|
|
Why the base class Serialize is called
void CProject::Serialize(CArchive &ar)
{
CObject::Serialize(ar);
if (ar.IsStoring ())
ar << szProjectName;
else
ar >> szProjectName;
}
VIBIN
"Fool's run away,where angle's fear to tread"
|
|
|
|
|
Usually you call the base class's overriden to let him do its job. But as for CObject, its Serialize does nothing so you may omit that call.
--
======
Arman
|
|
|
|
|
because, due to inheritence, your CProject class IS a CObject (I understand here that you created a class CProject : public CObject , right ?).
so, if you serialize a CProject, why would you serialize only the children members ?
|
|
|
|
|
I have made a chat server and I wish to incorporate a webcam service in it.How to include it?Also I do not wish to make it too costly i.e. I wanna make full use of the user bandwidth coz bandhwidth is pretty costly in many countries.
help needed!
Best Regards!
|
|
|
|
|
The basic tasks (one way) are -
Capture the video frames
Compress the video
Transmit the video across the network
Uncompress the video frames
Render the video frames
Which part are you having trouble with?
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi,
I need to hash a string using any Hash Algorithm in VS 6 C++ . In .NET, I used SHA1CryptoServiceProvider class , but I'll be happy with any other algorithm in C++ too .
Is there any ?
|
|
|
|
|
|
|
hello,
What is Windows registry?
Where should I look for, for Windows Registry.Is there any link for the same.
Prithaa
|
|
|
|