|
hello bies
I heard lot more about static functions that it access only static variable
it count the number of objects created... and so on
But still i a am unable to known in which condn it shpild be used can any one give me details with small code would apprecitaed
|
|
|
|
|
They are used whenever you have multiple instances of an object, but only want one instance of a particular function. Callback functions are another example.
|
|
|
|
|
Well,
Dear DavidCrow
u say Callback is the example of Static function
callback fuctions r genrally used for repeated works in which we stored the address of the origin and get back after doing some manupulation..
How u relate all these to static functions.
pls explain...
|
|
|
|
|
class A
{
static int compare( const void *arg1, const void *arg2 );
void SortEm( void );
};
void A::SortEm( void )
{
qsort(..., compare);
}
|
|
|
|
|
I have a Windows Service created with ATL ComAppWizard.It supports multi-threaded paartments(Run() function of the service has called CoInitializeEx(NULL
|
|
|
|
|
Hope someone can help. I am trying to keep the check mark on my menu item updated. The menu item opens a modeless dialogue depending on the status of the member variable i.e.
m_nCommsToggleState = m_nCommsToggleState == 0 ? 1 : 0;
toggles this variable in the handler for the COMMAND_UI.(The handler then creates or destroys the modeless dialogue) message, and then the UPDATE_COMMAND_UI, calls the SetCheck member function turning on or off the check mark.
The problem is that this works fine when I am turning the dialogue on and off with just the menu, but when I use say the close cross on the dialogue the check mark remains. How do I get the WM_CLOSE handler to call the Update function and clear the check mark?
I am handling the UPDATE_COMMAND_UI message in my view class and the modeless dialogue has it's own class.
I think I should be able to use the same message handler for updating the menu item wether the dialogue is closed using the cancel/cross button or the menu but i can't work out how from the docs. Sorry if this is a dumb question I'm quite a newbie!
Thanks
A
|
|
|
|
|
All you need to do is update the value of m_nCommsToggleState. The UPDATE_COMMAND_UI handler should do the rest. If you try to remove the check mark without changing m_nCommsToggleState, the handler will put the check mark back again.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
I'm a beginner in C++ and Visual C++ development. I'm trying to create a dialog window based on tab control. To do that I found a class (on this site) named CXTabCtrl.
Now I would like to get back my parameters defined in each window to the main window: it means
+ I have a tab control dialog.
+ inside this dialog, I defined two dialog boxes.
+ in each dialog boxes, I defined several parameters like the name of the file to deal with...
When I launch the tab control window, I would like to have all the paremeters available.
Could you tell me how I can define the variable in the simple dialog box to be available in the main dialog box (Tab Control box)?
|
|
|
|
|
you should use the CPropertySheet (easier to maintain), and then it's easy to get access to the children dialogs (CPropertyPage's).
Hope this helps.
|
|
|
|
|
Hi,
I am searching for a good tutorial on "How to use odbc with text file".Any example with source code will be quite helpful.
Regards.
Gajendra Sharma
|
|
|
|
|
What you need to do is to properly configure the DSN. This includes selecting the directory and defining the layout of each file that you will want to query. Be aware that the standard MS ODBC Text File driver operates in a read-only manner and does not use any form of indexing (Table Scan every time!).
|
|
|
|
|
Having brought a dynamically linked mfc app to a site which does
not have any of the mfc libraries, I wonder if anyone knows
of a site that you can download the mfc libraries from.
I am looking specifically for mfc7oud.dll but it strikes me that
this would be a useful service anyway and that if there are
no licencing problems that maybe even the codeproject could
offer a selection of these libraries for download?
|
|
|
|
|
That's the debug version of the mfc7ou.dll library. If you're distributing your app, you need to build the release version. I don't think you can legally distribute the debug version of the libraries, and you wouldn't want to anyway. You are allowed to distribute the release version that you got with Visual C++.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Thanks for the reply, the app is in testing at the moment hence the debug version.
Dont suppose you could email me mfc7oud.dll to ssmith2@fsmail.net, it would be very useful.
many thanks
|
|
|
|
|
Nope, I only have VC++6, not 7, so I don't have that library. I would have come with your copy of VC++7, so you should have it.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
I'd program my pluggable protocol to provide data by read local compressed HTML file and pics in HTML.
In my Interface inherit form IInternetProtocol
I found implemented function : IInternetProtocolRoot::Start
the parameter /* [in] */ LPCWSTR szUrl is not incorrect while ask for html pics.
eg: To open url myprot://index.htm/ (there is a pic in this html file named : hello.jpg in the subfolder images/hello.jpg)
First Start functoin's szUrl is myprot://index.htm it's no problem.
Then I call IInternetProtocolSink::ReportData (BSCF_DATAFULLYAVAILABLE, 100, 100) to tell the sink data is ready return S_OK.
When finished read the html data Start function is been call angain, this time the szUrl parameter is myprot://index.htm/images/hello.jpg. I think the pic's url is not incorrect as the other protocol(eg:file ftp http), in http protocol the url normal is prot://images/hello.jpg
Can you help me?
Thanks.
Phourm
|
|
|
|
|
Hi,
I am porting a Application which communicates with a Wireless Protocol
Stack from unix m/c to WPS on Enfora board. Previously packets are sent through TCP which I
have to change it to use PPP mode instead of TCP. Application is running on windows XP m/c.
Is there any way to do this through some mechanism either editing regedit or some how.
Thanks in advance,
Regards,
pramodav@sasken.com
Pramod Kumar A
SASKEN-INDIA
|
|
|
|
|
PPP is a TCP tunneling protocol for peer-to-peer connections like dial-up ones. In Windows, these connections can be programmatically managed with the Ras library (see for instance RasDial and pull the thread from there). Once a PPP session is established, you can use TCP as you did before, so basically you only have to add code for establishing the dial-up connection and leave the rest unchanged (hopefully).
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
hello all
could any of you help me how
to develope a voice chat appn with vc++
1. how to enable voice chat appln between registered users of a web site?
2 . what are the libraries needed and where r they avialable ?
3. how to link the appn developed using vc++ into the web site?
so that it is served to all the persons logged in?
regards
dharani babu
|
|
|
|
|
Help!!!Who can tell me
how to command the controller of Floppy Disk Device to do verify?
|
|
|
|
|
Is there any existing classes/functions that do md5 encryption, for example "LRESULT MD5(LPCTSTR lpOriginalString, LPTSTR lpEncryptedString)" or something like that that we can directly call in our code? Thanks a lot.
|
|
|
|
|
|
If it doesn't necessarily have to be MD5, you could try my SHA-1 implementation as C++ class:
http://www.codeproject.com/cpp/csha1.asp[^]
SHA-1 produces a 160-bit hash and therefor is generally regarded to be more secure than MD5.
You can also have a look at the implementations I used in my hash calculator:
http://www.codeproject.com/cpp/ReHash.asp[^]
This also includes a MD5 implementation.
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
Thanks to both of you for the replies, I appreciate that. The reason why I want an md5 api is because I'm cuurently working on a sql server2000 database project which must store user password in md5 encrypted format. I've been using mySQL for a while which has a built-in md5 function so we don't need to do a thing, but in sql server2000 I failed to find any similar features, so I have to do the encryption by myself I guess... To Dominik Reichl, thank you for the article links but it does have to be md5.
|
|
|
|
|
Then go and download my ReHash hash calculator source code. Go to the "algo" directory and grab the files MD5.cpp and MD5.h.
Include these 2 files to your project. These 2 files implement the MD5 standard as described in RFC 1321 by Rivest.
To hash a string, do the following:
char yourstring[] = "this can be a string of any length";
MD5_CTX ctx;
MD5Init(&ctx, 0);
MD5Update(&ctx, (unsigned char *)yourstring, strlen(yourstring));
MD5Final(&ctx); Now ctx.digest[16] contains the 16 hash bytes (MD5 is a 128-bit hash, therefor 16 bytes [16*8=128]).
You could output these 16 bytes like this:
for(int i = 0; i < 16; i++) printf("%02X ", ctx.digest[i]); Hope that helps
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|