1可以给例程,Email 2 atof, atoi, _atoi64, atol Convert strings to double (atof), integer (atoi, _atoi64), or long (atol).double atof( const char *string );int atoi( const char *string );__int64 _atoi64( const char *string );long atol( const char *string );Routine Required Header Compatibility atof <math.h> and <stdlib.h> ANSI, Win 95, Win NT atoi <stdlib.h> ANSI, Win 95, Win NT _atoi64 <stdlib.h> Win 95, Win NT atol <stdlib.h> ANSI, Win 95, Win NT For additional compatibility information, see Compatibility in the Introduction.LibrariesLIBC.LIB Single thread static library, retail version LIBCMT.LIB Multithread static library, retail version MSVCRT.LIB Import library for MSVCRT.DLL, retail version Return ValueEach function returns the double, int, __int64 or long value produced by interpreting the input characters as a number. The return value is 0 (for atoi and _atoi64), 0L (for atol), or 0.0 (for atof) if the input cannot be converted to a value of that type. The return value is undefined in case of overflow.ParameterstringString to be convertedResThese functions convert a character string to a double-precision floating-point value (atof), an integer value (atoi and _atoi64), or a long integer value (atol). The input string is a sequence of characters that can be interpreted as a numerical value of the specified type. The output value is affected by the setting of the LC_NUMERIC category in the current locale. For more information on the LC_NUMERIC category, see setlocale. The longest string size that atof can handle is 100 characters. The function stops reading the input string at the first character that it cannot recognize as part of a number. This character may be the null character ('\0') terminating the string.The string argument to atof has the following form:[whitespace] [sign] [digits] [.digits] [ {d | D | e | E }[sign]digits]A whitespace consists of space and/or tab characters, which are ignored; sign is either plus (+) or minus ( – ); and digits are one or more decimal digits. If no digits appear before the decimal point, at least one must appear after the decimal point. The decimal digits may be followed by an exponent, which consists of an introductory letter ( d, D, e, or E) and an optionally signed decimal integer.atoi, _atoi64, and atol do not recognize decimal points or exponents. The string argument for these functions has the form:[whitespace] [sign]digitswhere whitespace, sign, and digits are exactly as described above for atof.Generic-Text Routine MappingsTCHAR.H Routine _UNICODE & _MBCS Not Defined _MBCS Defined _UNICODE Defined _ttoi atoi atoi _wtoi _ttol atol atol _wtol Example/* ATOF.C: This program shows how numbers stored * as strings can be converted to numeric values * using the atof, atoi, and atol functions. */#include <stdlib.h> #include <stdio.h>void main( void ) { char *s; double x; int i; long l; s = " -2309.12E-15"; /* Test of atof */ x = atof( s ); printf( "atof test: ASCII string: %s\tfloat: %e\n", s, x ); s = "7.8912654773d210"; /* Test of atof */ x = atof( s ); printf( "atof test: ASCII string: %s\tfloat: %e\n", s, x ); s = " -9885 pigs"; /* Test of atoi */ i = atoi( s ); printf( "atoi test: ASCII string: %s\t\tinteger: %d\n", s, i ); s = "98854 dollars"; /* Test of atol */ l = atol( s ); printf( "atol test: ASCII string: %s\t\tlong: %ld\n", s, l ); } Outputatof test: ASCII string: -2309.12E-15 float: -2.309120e-012 atof test: ASCII string: 7.8912654773d210 float: 7.891265e+210 atoi test: ASCII string: -9885 pigs integer: -9885 atol test: ASCII string: 98854 dollars long: 98854 Data Conversion Routines | Floating-Point Support Routines | Locale RoutinesSee Also _ecvt, _fcvt, _gcvt, setlocale, strtod, wcstol, strtoul -------------------------------------------------------------------------------- Send feedback to MSDN.Look here for MSDN Online resources.
程序员大本营上有一个例程,在Windows系统控制里,题目叫“在任务栏状态区显示应用程序图标”,提供了一个类叫TrayIcon。但那是用于框架类,我想稍做修改就可以用于对话框
2
atof, atoi, _atoi64, atol
Convert strings to double (atof), integer (atoi, _atoi64), or long (atol).double atof( const char *string );int atoi( const char *string );__int64 _atoi64( const char *string );long atol( const char *string );Routine Required Header Compatibility
atof <math.h> and <stdlib.h> ANSI, Win 95, Win NT
atoi <stdlib.h> ANSI, Win 95, Win NT
_atoi64 <stdlib.h> Win 95, Win NT
atol <stdlib.h> ANSI, Win 95, Win NT
For additional compatibility information, see Compatibility in the Introduction.LibrariesLIBC.LIB Single thread static library, retail version
LIBCMT.LIB Multithread static library, retail version
MSVCRT.LIB Import library for MSVCRT.DLL, retail version
Return ValueEach function returns the double, int, __int64 or long value produced by interpreting the input characters as a number. The return value is 0 (for atoi and _atoi64), 0L (for atol), or 0.0 (for atof) if the input cannot be converted to a value of that type. The return value is undefined in case of overflow.ParameterstringString to be convertedResThese functions convert a character string to a double-precision floating-point value (atof), an integer value (atoi and _atoi64), or a long integer value (atol). The input string is a sequence of characters that can be interpreted as a numerical value of the specified type. The output value is affected by the setting of the LC_NUMERIC category in the current locale. For more information on the LC_NUMERIC category, see setlocale. The longest string size that atof can handle is 100 characters. The function stops reading the input string at the first character that it cannot recognize as part of a number. This character may be the null character ('\0') terminating the string.The string argument to atof has the following form:[whitespace] [sign] [digits] [.digits] [ {d | D | e | E }[sign]digits]A whitespace consists of space and/or tab characters, which are ignored; sign is either plus (+) or minus ( – ); and digits are one or more decimal digits. If no digits appear before the decimal point, at least one must appear after the decimal point. The decimal digits may be followed by an exponent, which consists of an introductory letter ( d, D, e, or E) and an optionally signed decimal integer.atoi, _atoi64, and atol do not recognize decimal points or exponents. The string argument for these functions has the form:[whitespace] [sign]digitswhere whitespace, sign, and digits are exactly as described above for atof.Generic-Text Routine MappingsTCHAR.H Routine _UNICODE & _MBCS Not Defined _MBCS Defined _UNICODE Defined
_ttoi atoi atoi _wtoi
_ttol atol atol _wtol
Example/* ATOF.C: This program shows how numbers stored
* as strings can be converted to numeric values
* using the atof, atoi, and atol functions.
*/#include <stdlib.h>
#include <stdio.h>void main( void )
{
char *s; double x; int i; long l; s = " -2309.12E-15"; /* Test of atof */
x = atof( s );
printf( "atof test: ASCII string: %s\tfloat: %e\n", s, x ); s = "7.8912654773d210"; /* Test of atof */
x = atof( s );
printf( "atof test: ASCII string: %s\tfloat: %e\n", s, x ); s = " -9885 pigs"; /* Test of atoi */
i = atoi( s );
printf( "atoi test: ASCII string: %s\t\tinteger: %d\n", s, i ); s = "98854 dollars"; /* Test of atol */
l = atol( s );
printf( "atol test: ASCII string: %s\t\tlong: %ld\n", s, l );
}
Outputatof test: ASCII string: -2309.12E-15 float: -2.309120e-012
atof test: ASCII string: 7.8912654773d210 float: 7.891265e+210
atoi test: ASCII string: -9885 pigs integer: -9885
atol test: ASCII string: 98854 dollars long: 98854
Data Conversion Routines | Floating-Point Support Routines | Locale RoutinesSee Also _ecvt, _fcvt, _gcvt, setlocale, strtod, wcstol, strtoul
--------------------------------------------------------------------------------
Send feedback to MSDN.Look here for MSDN Online resources.
好久以前就看到这样的问题,一直都有点懒,刚好这两天有点空就来说两句
好多人都建议采用ShowWindow呀SetWindowPos等等。
我想大可不必这样的:
采用CDialog::Create函数(去掉WS_VISIBLE),而非用DoModal,这样就很容易的不会显示窗体了。
说来也巧,不显示窗口,同时还进入TRAYICON中,这样的例子,我刚好不久前帮人帮了一个。
不妨到我的主页去下载一个吧。
就是那个:
8月22日的过滤王来了哟。:)(8月22日)。
地址是:
http://www.erehw.com/tojoyue/release_build0822.rar
如果没有源代码的话,请下载更早的:
http://www.erehw.com/tojoyue/release.rar
我去down了
可是只有dll
我现在功夫还不到家
只看dll还看不懂是程序怎么编的
[email protected]
http://www.erehw.com/tojoyue/here.zip