|
Hi all i am new to the concepts of mfc,
in my application i want to create resitry entries i did that well but when i tried to insert value for the default key (default) in the registry the key is duplicated,and i am not able to set the value for the default one.
can anyone suggest me the correct approcah for doing this.
thanks in advance.
|
|
|
|
|
try this code, it working fine for me
CRegKey key;
if( key.Create(HKEY_CURRENT_USER,L"Software\\Alok") == ERROR_SUCCESS)
{
if(key.SetKeyValue(L"",L"Alok") == ERROR_SUCCESS)
{
AfxMessageBox("Successful in setting the Default value of key");
}
}
please include Atlbase.h in your code!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|
|
hariakuthota wrote: ...when i tried to insert value for the default key (default) in the registry the key is duplicated,and i am not able to set the value for the default one.
And what does this have to do with MFC?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Is there any software that makes single monitor behave multiple??? Actually we can use hardware device switch but I am looking for software. I remember once I had downloaded code from CP but now I am not finding it. Please do provide the link reference.
|
|
|
|
|
|
Mihai Moga wrote: 1) Don Kackman's MFC classes for multiple monitors[^]
2) Jon Newman's Multiple Monitor Support[^]
3) Asim Goheer's Dual / Multiple Monitor Support in Win32[^]
Don't these all require multiple monitors?
OT: I found it funny that all three articles were conceived out of the need for a screensaver.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
I want to create a simple SMTP client which will send an email with login and password features using VC++...
How can i acieve it..
Actually i want to know how do we pass messages int commant prompt using C++..so that i can pass commands like
MAIL FROM
MAIL TO
telnet address port(25)
Please help
|
|
|
|
|
Well, I think you should have a look into PJ Naughter CSMTPConnection[^] class. I used in private project and it is very reliable.
Best regards,
Mihai Moga
|
|
|
|
|
Hi,
The SMTP protocol does not support username and password authentication. You have to get authorized by login into the associated POP3 server, which will give you a time span to connect with the SMTP server. (Go through RFC 821)
For accepting parameters from the console, you can use the combination of functions printf()and scanf()or the C++ standard "cin" and "cout"
|
|
|
|
|
|
For client/server socket programs.
Clients are on local area network (inside the company) and from the internet (outside the company).
Should the Server program uses network IP address or internet IP address or both to accept all clients? why?
|
|
|
|
|
No. The IP address that you get through internet is the Proxy's address. Not the client machine (that's inside a lan)'s address. To know more about it, search for NAT- Network Address Translation.
But the client machine can connect to a machine that's outside the lan. The initiat-er makes the difference. If a machine waits outside the lan, (A Server) , you can connect it from a machine inside the lan. But you cannot do the reverse. [My networking data are fading out, so better check it up]
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
If your IP address is part of a private block (10.0.0.0/8; 172.16.0.0/12; 192.168.0.0/16) then there is no way for an IP address outside that network to connect to your IP address unless your gateway router is set up to do port forwarding or NAT or some other IP aliasing. If your IP address is not within these blocks, then it may or may not be route-able from the internet depending on firewall/gateway settings.
|
|
|
|
|
ipconfig displays 3 IP addresses in 3 lines, such as:
//-------------------------------------------
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.1.101
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.254
//-------------------------------------------
what do the 3 addresses stand for?
which one is Networking IP address?
|
|
|
|
|
includeh10 wrote: what do the 3 addresses stand for?
IP address
Subnet mask
Default gateway
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
includeh10 wrote: Default Gateway . . . . . . . . . : 192.168.1.254
This is what I called as "Proxy".. you get it? To check it, from your lan, from multiple machines, open IPchicken.com and check the IP adress. it will all be the same. That's what is actually getting exposed to the internet.
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
A bitwise ANDing of the IP Address and the subnet mask will give you the network address. In this case: 192.168.1.101 AND 255.255.255.0 = 192.168.1.0.
|
|
|
|
|
how to detect a PC's 3 IP addresses by VC++:
Loacal, networking and internet IP addresses?
the PC is on Local-area networking with internet accessed.
|
|
|
|
|
|
Can anyone tell me how to convert a modeless dialog to a modal dialog?? And vise versa?? Is it possible??
Thanks for any help.
|
|
|
|
|
There's no difference between the code for a modeless dialog or a modal dialog. The difference lies in how the dialog is created. A modal dialog is 'run' by calling the dialog class DoModal() function, while a modeless dialog is created by calling CreateWindow() followed by ShowWindow() . Once created, they 'run' in that fashion until destroyed.
What are you trying to accomplish by converting from one to the other?
|
|
|
|
|
I was asked that question in an interview, i told him the creation part that there is difference in creating the dialog but i was not sure about converting one to the other.
Thanks for your answer. Appreciate it.
|
|
|
|
|
|
Hi
How can i read a USB Port Activity.If port is working mode(atached device) then show device information.Can any body help me..
Thx's in advance
|
|
|
|
|
NewVC++ wrote: How can i read a USB Port Activity.
You can read from the USB port via ReadFile() .
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|