|
Thanks Pavel,
The Static Frame control's ClassName is 'Button' so now I have to work out how to differentiate between it and other Button types.
|
|
|
|
|
I want to create a wrapper for sprintf , a function that uses variable arguments.
Mu function should look something like this:
void extra_sprintf(const char* lpText,...)
{
char buf[256];
sprintf(buf,lpText,...); // ... exact same arguments from extra_sprintf
// some extra code
}
How can I call the regular sprintf function inside my extra_sprintf function, as simple as possible?
tnx
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
|
|
|
|
|
Check va_arg, va_start, va_end and va_list.
Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
|
|
|
|
|
I can do something like:
va_list args
va_start(args,lpText)
...
va_end(args)
But then, how can I pass the list to sprintf in just one call? If I pass args, it will not work, nor with lpText
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
|
|
|
|
|
Grote Smurf wrote:
But then, how can I pass the list to sprintf in just one call?
Use vsprintf.
Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
|
|
|
|
|
int mysprintf (char *string, const char *format,...)
{
va_list arglist;
va_start(arglist, format);
int retval = vsprintf(string,format,arglist);
return(retval);
}
Pavel
Sonork 100.15206
|
|
|
|
|
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
|
|
|
|
|
Hi
I'm thinking to write a protection routines and I was wandering how I can get info about a particular computer as HD,CPU , SPEED,MEMORY etc.. or if somebody know a special class related.
Best regards
|
|
|
|
|
There is no MFC class which implements all the stuff. But I know Win32 API functions which can help you to get some info about disk drives:
GetLogicalDrives
GetVolumeInfo
GetDiskFreeSpace
GetDriveType
______________________
Vladimir V. Polischuk
URL: http://www.alarit.com
|
|
|
|
|
I just rcvd this in the last newsletter:
CAMEL - CPU Identifier Class
- voodoopriestess (7 Sep 2002)
A class to detect ALL the features of the CPU / CPUs in the local
system. Now at version 1.2
http://www.codeproject.com/system/camel.asp
|
|
|
|
|
Hi,
I need to put an image control (third party) into the status bar of my MFC MDI app. Any links or sample code is much appreciated.
Thanks,
ns
|
|
|
|
|
I'm using this control to show animation on statusbar. Maybe you can find some inspiration with it.
Pavel
Sonork 100.15206
|
|
|
|
|
Hi,
I'm using the method Module32Next in my application.Upon running the application an error pops up saying "The Procedure entry point Module32Next could not be located in the dynamic link library KERNEL32.dll".
I'm unable to resolve the problem.
Can anybody help me please.
Abhishek.
Learning is a never ending process of Life.
|
|
|
|
|
Are you runninig on NT4?
Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
|
|
|
|
|
Yes I'm using NT 4.Could this problem be due to an obsolete Kernel32.dll file.I checked the dll with the dependency Viewer and found out that the method Module32Next was not in the list.If yes then how do I change my existing Kernel32.dll to the latest version.Since Windows NT uses the Kernel32.dll it won't allow to overwrite the old file with the new file straight away.How do I go about this?
Need guidance,
Thanks
Abhishek.
Learning is a never ending process of Life.
|
|
|
|
|
Module32Next isn't available on NT4. AFAIK, there's no redistributable providing ToolHelp32 functions you could install on NT4. You'll have to use PSAPI instead.
Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
|
|
|
|
|
Hi,
I need an advice from experienced programmer. CAsyncSocket is not too good documented for use in multithreading enviroment. I wrote some testing programs, so i found out that all callback functions are called in the same thread, throught message map (correct me if i'm wrong).
Here's what i need :
Implement communication functions with CAsyncSocket in separate working - non GUI thread.
1. Should I create message map for this thread ? (an how ?)
2. i need sometimes to wait for incoming data. How to implement waiting ? Is it possible to make GetMessage() loop to wait ?? how ?
I don;t understand how and where does CAsyncSocket dispatch socket notification messages and translates them to callback. How does this work ? MFC source is too big for studying.
Thank you
rrrado
|
|
|
|
|
I wouldn't use any of the socket classes that MFC has if I were you!
I would code it from scratch!
But... if you do want to use it, it's up to you!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Well, an asynchronous socket concept is thought to run in one thread context by purpose! It has some advantages (for some kind of tasks).
If you are sure that a multithreading concept fits better to your task, use a different socket class! For example our loved codeproject provides some kind of (IO completition port?) network classes... check it out: http://www.codeproject.com/internet/
btw Anderson... CAsyncSocket is not perfect implemented (missing asynchronous DNS, no reference buffering), but it's not *that* bad...
|
|
|
|
|
I don't like casyncsocket too, but it is some casyncsocket here with support SOCKS4 and 5, i wanted to use it.
rrrado
|
|
|
|
|
Hi,
I need tips/example of building a graph with code using DES. I don't want directshow to auto connect using the ConnectFrontEnd method. I am able to do this using a normal filtergraph but can't with DES.
Any ideas?
|
|
|
|
|
Doeas anybody know how I can check an user password whether valid or unvalid?
BOOL checkPassword(CString strUserName, CString strPassword)
thank you very much
|
|
|
|
|
You'll have to use LogonUser for that.
Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
|
|
|
|
|
In vc++6, we can add an item on the toolbar then go to the class wizard to add message or event handler for that ID, it is very convenient, but when I use vc++.net, I can't find how to add event handler for a toolbar item? why?
victorswan
|
|
|
|
|
The easiest thing to do is to add a menu item with the same ID as the toolbar button, then add a message handler for the menu item.. that way both the toolbar button and the matching menu item call the same thing..
if you want to setup a message handler for the toolbar manually you can just add the following into your message map in your mainfrm.h (or whatever class you want)
ON_COMMAND(ID_MYBTN, OnMyBtn)
then make a class named OnMyBtn() to correspond with the messagemap..
-dz
|
|
|
|