|
If using a CEdit control, you can use the ES_PASSWORD style and the typed characters will be shown as astricks.
[edit]
Please disregard post for the reason below. Thanks for pointing that out David.
lalit kumar jayswal wrote: working with c
[/edit]
modified on Thursday, May 14, 2009 10:53 AM
|
|
|
|
|
jeron1 wrote: If using a CEdit control...
Does that work in C?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
If you are using something like getch() to get user input, just echo some other character back to the screen.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi again,
I am trying to find a way to spawn a process that will continue running once I log off.
A previous post ended up giving me a solution : services. I tried this out, and it solves
the problem as it was stated - the service continues to run when I log off.
However, I need Admin privileges to start / stop the service - which is not exactly the type of privileges my customers have.
Any ideas ?
Thanks
Andy
|
|
|
|
|
andypandy2 wrote: which is not exactly the type of privileges my customers have.
Hi again Andy,
The last two parameters of CreateService[^] gives you provision to set a user name and password. But I am not sure at what happens when you logoff the same user.
The doc says,
pServiceStartName [in, optional]
The name of the account under which the service should run. If the service type is SERVICE_WIN32_OWN_PROCESS, use an account name in the form DomainName\UserName. The service process will be logged on as this user. If the account belongs to the built-in domain, you can specify .\UserName.
pPassword [in, optional]
The password to the account name specified by the lpServiceStartName parameter. Specify an empty string if the account has no password or if the service runs in the LocalService, NetworkService, or LocalSystem account. For more information, see Service Record List.
|
|
|
|
|
I am using Visual Studio 8.
I created two win32 empty project and created C "Mylib.c" "MyWrapperlib.c" file to get static library Mylib.lib and MyWrapperlib.lib.
I created another win32 empty project and when i link the static library "MyWrapperlib.lib" (with Mylib.lib and MyWrapperlib.lib in library path) with simple C code "TestApp.C" with main(), it is working fine.
I have used windows.h in "Mylib.c" and "MyWrapperlib.c" for FILE operations.
I want to have a GUI application, so I created NewProject->CLR->Windows Forms Application (MyUIApp.Cpp). When i used MyWrapperlib.lib, it gave linking error.
so I created DLL for MyWrapperlib.c by using #define dllexport __declspec(dllexport)
enclosing with extern C
When i use MyWrapper.dll in MyUIApp.Cpp, it is giving below error
"fatal error LNK1107: invalid or corrupt file: cannot read at 0x2B0"
Can some guide me how to create 'C' lib/dll and use it with GUI application.
|
|
|
|
|
sakthii wrote: I want to have a GUI application, so I created NewProject->CLR->Windows Forms Application (MyUIApp.Cpp).
Should have used MFC, then you'd have native code throughout, so you could have used your static library.
However - you can link C++/CLR modules against your static library (meaning you don't need the DLL). In your project proerties, change the "Common Language Runtime support" option to "Common Language Runtime Support (/clr). Worked for me, anyway.
|
|
|
|
|
Thanks for your reply.
I will try.
|
|
|
|
|
Hi.
I have one query , Is plateform SDK come with Microsoft Visual Studio 2005 Installation.
|
|
|
|
|
Depends which version of Visual Studio. I know that for the Express edition it is not installed and for the Professional it is included.
|
|
|
|
|
In addition to Cedric's reply - the version of the Platform SDK that comes with VS2005 (Standard and above) will be from 2005 (when VS2005 was released). This means that it won't be able to access features that came with Vista. If you do want to access features from Vista, then you'll need to install a later version of the PDK.
|
|
|
|
|
Hi
I defined a class like:
class CProfile
{
public:
static CString* pIniFilePath;
....
}
When I compiled it, I got a lot of linker warning which looks like:
warning LNK4006: "public: static class CString * CProfile::pIniFilePath" in ada.obj; second definition ignored
How can I get rid of this warning message?
Thanks,
|
|
|
|
|
It looks like you have the same class declared in two source files.
|
|
|
|
|
You must have a line of the form
CString* CProfile::pIniFilePath; somewhere in your code - where is it? If it's in a header, there's a good chance it's causing multiple definitions of that item.
|
|
|
|
|
Yes, I do.
If this is the case, how can I do?
Thanks,
|
|
|
|
|
Put it in the cpp file of the class, instead of in the header.
|
|
|
|
|
Yes, You are great. it fixes my problems.
I have another Linker question for you.
I built "nurbs" dll. This gives me a lib and a dll.
When I tried to link them. I got a lot of warnings which looks like:
warning LNK4006: "void __cdecl PLib::resizeKeepBasic2DArray<struct PLib::HPoint_nD<float,2> >(class PLib::Basic2DArray<struct PLib::HPoint_nD<float,2> > &,int,int)" (??$resizeKeepBasic2DArray@U?$HPoint_nD@M$01@PLib@@@PLib@@YAXAAV?$Basic2DArray@U?$HPoint_nD@M$01@PLib@@@0@HH@Z) already defined in drawtool.obj; second definition ignored.
Best regards,
|
|
|
|
|
transoft wrote: How can I get rid of this warning message?
Start by reading here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi all,
i m using Beep function on button clicked to generate some alert sound like::
Beep( 750, 300 );
Beep( 550, 300 );
Beep( 750, 300 );
Beep( 550, 300 );
Beep( 750, 300 );
Beep( 550, 300 );
Beep( 750, 300 );
Beep( 550, 300 );
Beep( 750, 900 );
its not generate beep on some PC.
there is any specification of machine for beep generation please tell me.
or tell me any other function or solution that is work on all machines.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
"_$h@nky_" wrote: its not generate beep on some PC.
What do you mean by that? May be that PC did not have a speaker?
Did you check the return value of the function? What was it? The doc also states that this function is not supported on the 64 bit versions of XP and Vista.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Yes system have speakers,and i chk the retun value its non zero.
and all machines and 32-bit version.
please suggest me what can i do,or tell me any other function or solution that is work 64-bit version also.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
"_$h@nky_" wrote: please suggest me what can i do,or tell me any other function or solution that is work 64-bit version also.
So, is that an X64 machine where this is 'not working'?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
one of test machine is 64 bit version machine.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Is the PC speaker connected?
Try MessageBeep .
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Do other sounds work?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|