|
|
I am using Visual C++ 6. All I want is to create a subclass to an existing class in the "Class View" window. How is this done?
|
|
|
|
|
class MySubclass : public MyExistingClass
{
.... implementation goes here
};
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
I thank you for that. In the Microsoft Visual C++ editor, is there a way to have the program assist you in making a subclass so that it appears nested under its base class in the "Class View" window?
|
|
|
|
|
ZeroGs wrote:
so that it appears nested under its base class in the "Class View" window
No. VC6 IDE Class View does not display class relationships. Use the Class Browser to view that. Select the Class Name using the cursor in a code window of the base class and the execute the Browser command "Derived Classes and Members"
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
hi,
i have a server-client chat!
i want to encrypt the messages what i send from server to client or from client to server...
and i want to use SSL!
can anybody help me to encrpyt a message like "hello" with SSL
and to decrypt! i saw that i must use a lot of libs for SSL...not so easy!
best greets,
surf
|
|
|
|
|
I am using IsPVoice in an application where I would like to be able to cancel some speech after it has been paused. I currently use Resume() followed by Skip(). Unfortunatly, this still allows a word or two to be spoken before it completes. I have tried setting the volume to 0, as well as setting the tempo to -10 prior to Resume(). I have also tried emptying the event queue before resuming. None of these has worked.
|
|
|
|
|
I need to be able to write files directly to a CD-RW disk,
however, the way things work in XP is to keep a cache on
the local disk, and then actually write them on user command.
I need to bypass this mechanism and write directly to CD,
or at the very least find some mechanism to start the "copy
from cache to the CD" system.
Does anyone have any suggestions for me?
Thanks, in advance.
|
|
|
|
|
Hello,
nde_plume wrote:
find some mechanism to start the "copy
from cache to the CD" system
For this problem use the ICDBurn Interface or IMAPI ... With this interface you can start the default burn mechanism (Dialog) or directly burn files but only under Windows XP (look at MSDN)...
They exists some wrappers in the web...
When you need a solution for all windows systems then you must use a comercial library (from nero or roxio)... In my mind, an other alternative dosen't exist because cd burning needs much knowledge about IDE and SCSI...
good look and cu...
|
|
|
|
|
Hi
I use this code to test CEvent MFC Class :
(Win32 Console App with MFC support)
#include "stdafx.h"
#include "TryEvent.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#include <afxmt.h>
CWinApp theApp;
CEvent ev(TRUE,TRUE);
using namespace std;
UINT Start(void* data)
{
int n=ev.Lock();
cout <<"Inside Thread\n";
return 0;
}
int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
{
int nRetCode = 0;
CEvent ev;
if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0))
{
cerr << _T("Fatal Error: MFC initialization failed") << endl;
nRetCode = 1;
}
else
{
CString strHello;
strHello.LoadString(IDS_HELLO);
cout << (LPCTSTR)strHello << endl;
}
int n=ev.ResetEvent();
AfxBeginThread(Start,NULL,0);
cout <<"Before Thread\n";
Sleep(5000);
n=ev.SetEvent();
Sleep(5000);
cout <<"The End\n";
return nRetCode;
}
the expected result should be that the "Before Thread" apperas then the "Inside Thread" after 5 seconds..
but it seems that the secondry thread does not wait for the SetEvent
I read this sample :http://simplesamples.info/MFC/Events.php[^]but no good
any help ?
|
|
|
|
|
You are still thinking in "sequential" mode. Once AfxBeginThread() has been called, the thread is created and running (unless CREATE_SUSPENDED was used) independently of the primary thread. Relying/depending on either thread to be at a certain spot at a certain time is a recipe for disaster.
Read this entire thread. It has some interesting and pertinent information on how two threads interact (e.g., timing). Here is another.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I have never used CEvent but here is what I think you are trying to do
class EventPOC
{
public:
static void poc()
{
DWORD threadID = 0L;
HANDLE hEvent = ::CreateEvent( NULL, TRUE, FALSE, NULL);
cout << "Starting thread" << endl;
HANDLE hThread = ::CreateThread( NULL, 0L, (LPTHREAD_START_ROUTINE)threadFunc, (LPVOID)hEvent, 0L, &threadID);
::Sleep( 5000);
::SetEvent( hEvent);
::WaitForSingleObject( hThread, INFINITE);
cout << "Thread exited" << endl;
::CloseHandle( hEvent);
}
static long WINAPI threadFunc( void* param)
{
HANDLE hEvent = (HANDLE)param;
::WaitForSingleObject( hEvent, INFINITE);
cout << "Inside thread" << endl;
return 0L;
}
};
Of course you would execute the proof of concept by putting this in your main function
EventPOC::poc();
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
thank you all for help
that problem was that i have CEvent ev; inside _tmain ..
What a mistake..
sorry for wasting your time
|
|
|
|
|
Hi,
Is it possible to intercept file input and outputs?
Let's say I have a server and on that server I have my own forum controlled by my application ( someone connects to it and my application opens a file and put a value in it, the "someone" want to read a value somewhere then my application read a value). Well I want to write another application which will signal me when a change is made in the mdb file (or other types its not important) and which values were inserted or retrieven?
Thank you very much in advance for your answers!
Well... I am a beginner ...
|
|
|
|
|
Scolinks wrote:
Is it possible to intercept file input and outputs?
Yes, but it requires a device driver that watches for all IRPs and FastIO requests. Obviously this is no small undertaking.
Scolinks wrote:
Well I want to write another application which will signal me when a change is made...
This sounds like you simply need to use ReadDirectoryChangesW() and/or FindFirstChangeNotification() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I don't know if this is the correct place to post this or not but
Anybody have a list of instructions for gettin the series 60 sdk up and running. I'm either just not on the ball or it's pure... poop.
I want it to work with Visual Studio.net. I've installed java and perl already and it still doesn't work.
|
|
|
|
|
Symbian and Microsoft IDE !? I doubt that they will ever integrate symbian development into MS products.
If you check out either of the links below you should be able to find an appropriate development environment for Symbian.
Nokia[^]
Sony Ericsson[^]
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Hi, does anyone know how to define a std::ifstream to be in a non-sharable mode.
In the ifstream for <fstream.h> the code is:
//deny read and write on somefile.txt
int fh = _sopen("somefile.txt", _O_CREAT, _SH_DENYRW, _S_IREAD);
istream ist(fh);
But how do you do this for std::ifstream?
THanks
Sharon
|
|
|
|
|
Hello,
I'm trying to create a C++ project that uses C# methods to connect to a database, collect information, and send that information back to the C++ portion. The C# also needs to accept an instance of the C++ class and use it to sort the information from the database. The main HAS to be in C++!
Creating a managed wrapper so a C++ class can be used by a C# program, i've done -- going backwards like this, I haven't! can someone tell me if what i'm proposing is possible? Any suggestions as to how i can tackle this problem would be greatly appreciated!
btw...in my research of this project, i keep coming across using "tlbexp.exe" to create a type library file from my C# class -- this sounds all very good, and i've located "tlbexp.exe" on my computer, but what exactly do I do with it?!??
my apologies in advance for my newbie-ness...
thanks
|
|
|
|
|
You could let your C# class expose an interface for COM and then use this COM object from C++.
Funny that you ask this question now, because just yesterday I've published a wizard to create a C# COM class very easily.
Take a look here (shameless self-advertisement )
Best regards,
mav
|
|
|
|
|
Thank you, actually the wizard was very helpful!
|
|
|
|
|
Fine
|
|
|
|
|
Hi.
My problem is if my program is using 10,000kb then i load a catalog in CDialog
<br />
OnBnClickedC()<br />
{<br />
CatDlg dlg;<br />
dlg.DoModal();<br />
}<br />
memory raises 18,000kb and when i close de dialog it returns to between 12,000 and 13,000kb
why?
how should i release the dialog?
i tried with new and delete with the same results.
Please help me.
Update:
i see that when i load the dialog, a lot of dlls load with it, but all dlls unload only when i exit the application not when i quit the dialog. Why?
|
|
|
|
|
Mr. Unknown wrote:
how should i release the dialog?
There's nothing to release. It's a stack-based object.
Read the last section of this article for clarification.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I plan to create an application which will be able to read all the request sent to a web server
for example, let's say a user send his username and password in PHP. and the url will be
"http://localhost/test.php?username=daron&password=12345"
at the same time, a C++ application is opened all the time and connected to the web server
once it detects there is any requrest from the web server, it will 'catch' the url and write it to a text file
the problem is, i read through the WinINet class and found out it does not support such function
(or maybe i was wrong bout it)
please help...
|
|
|
|