|
Hi.
There was a codeline like this :
string * name = " my name is... ";
and i'm thinking why using a pointer to string typr when we can just define a string object
string name;
name = " my name is ... ";
until know i used string and pointer to string type knowing that one can't replace the otherone but in this case i'm confused. ( i'll gonna check this again in the case there was a misunderstanding ).
Thanks
int life()
{
in a land with no bird, no spring. My first journey was a
return 0;
}
|
|
|
|
|
pourang wrote: string * name = " my name is... ";
This shouldn't compile at all. What compiler are you using?
pourang wrote: string name;
name = " my name is ... ";
Or even better:
string name = " my name is ... ";
|
|
|
|
|
Hi.
I use visual studio 2005 and it works with both :
string name;
name = " ....";
and :
string name = "....";
problem is i can't find the sample code to describe better what is i can't understand. i remember that in sample code there was a line :
string * name or char * name . and there was realy no need to have a pointer and i'm thinking now : When i realy need to use a string* or char* instead strin and chr.
If you can give explain it for me so when i find the code i'll understand.
Thanks
int life()
{
in a land with no bird, no spring. My first journey was a
return 0;
}
|
|
|
|
|
pourang wrote: problem is i can't find the sample code to describe better what is i can't understand. i remember that in sample code there was a line :
string * name or char * name . and there was realy no need to have a pointer
Probably something like:
string* name = new string("something");
In general, it is better not to use this version, because you need to delete the object manually. Sometimes this may be necessary if you need the object to outlive the current scope.
|
|
|
|
|
thanks
int life()
{
in a land with no bird, no spring. My first journey was a
return 0;
}
|
|
|
|
|
hi,
Is there a function which gets mail MX records Upon giving it the domain name(as 1 of its inputs)
i don't want to use DnsQuery() function cause it doesn't work on NT4 platform.
(it only works on Windows XP or Windows 2000 Professional).
And i need it to be multiplatform...
in case there is not any function,and i need to code one on my own,can you please put me on the right track..
Example of what i need:
C:\mxlookup.exe gmail.com
gmail.com MX preference = 5, mail exchanger = gmail-smtp-in.l.google.com
gmail.com MX preference = 10, mail exchanger = alt1.gmail-smtp-in.l.google.com
gmail.com MX preference = 10, mail exchanger = alt2.gmail-smtp-in.l.google.com
gmail.com MX preference = 50, mail exchanger = gsmtp163.google.com
gmail.com MX preference = 50, mail exchanger = gsmtp183.google.com
Thanks for your time
|
|
|
|
|
The regular name lookup functions gethostbyname and getaddrinfo only return A records. Prior to Windows 2000, Windows didn't have a function to arbitrarily query DNS, you had to implement this yourself.
If you just need a command-line tool, you can use nslookup . Use set type=MX to get MX records. You can also specify -querytype=MX on the command line:
nslookup -querytype=MX gmail.com
Server: mnetics-dc2.main.mnetics.co.uk
Address: 192.168.2.250
Non-authoritative answer:
gmail.com MX preference = 10, mail exchanger = alt1.gmail-smtp-in.l.google
.com
gmail.com MX preference = 10, mail exchanger = alt2.gmail-smtp-in.l.google
.com
gmail.com MX preference = 50, mail exchanger = gsmtp163.google.com
gmail.com MX preference = 50, mail exchanger = gsmtp183.google.com
gmail.com MX preference = 5, mail exchanger = gmail-smtp-in.l.google.com
alt1.gmail-smtp-in.l.google.com internet address = 209.85.147.114
alt1.gmail-smtp-in.l.google.com internet address = 209.85.147.27
alt2.gmail-smtp-in.l.google.com internet address = 66.249.83.27
alt2.gmail-smtp-in.l.google.com internet address = 66.249.83.114
gsmtp163.google.com internet address = 64.233.163.27
gsmtp183.google.com internet address = 64.233.183.27
gmail-smtp-in.l.google.com internet address = 64.233.183.114
gmail-smtp-in.l.google.com internet address = 64.233.183.27 If you want to implement it manually, see the DNS specification (RFC 1035[^]).
DoEvents : Generating unexpected recursion since 1991
|
|
|
|
|
Remove to maximize button in a SDI application. Sample code pls.
-- modified at 12:41 Thursday 18th October, 2007
|
|
|
|
|
Hakan Bulut wrote: Remove to maximize button in CView class. Sample code pls
where d'you think you are ?!
|
|
|
|
|
I'd like to where in paradise. This is a simple question.. for you i think. Sorry i get busy to you with this simple question... All of you are wasting the knowledge i think. I am always searching and following to the new tecnology on the internet area but i can not find a worthwhile doscovery. This is right, isn't this?
|
|
|
|
|
Hakan Bulut wrote: This is a simple question.. for you i think
maybe.
but what have you tried so far ?
|
|
|
|
|
maybe I am agressive
|
|
|
|
|
Hakan Bulut wrote: maybe I am agressive
or too lazy ?!
|
|
|
|
|
toxcct wrote: or too lazy ?!
me to..... don't want to work
"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
|
|
|
|
|
week end is coming
|
|
|
|
|
no my weekend yet to come
"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
|
|
|
|
|
Instead of trying to remove it, don't include it when you create the window initially. If this is an MFC app, change the style in CMainFrame::PreCreateWindow
Judy
|
|
|
|
|
The thing is:
If you want to remove the maximize but you do want to have the minimize, its pretty difficult to erase the first one. But you can easily disable it. Take a look in the PRECREATESTRUCT.style is just a flag to disable one of the buttons, or remove both. But just remove one... too much work :P
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
Thanks guy.;P i didn't want to remove just to mean that disabled.
|
|
|
|
|
If it's never enabled, I'd still suggest you don't bother to create it in the first place.
However, if it's both enabled and disabled at different times, I can think of two things to try.
1) Catch the WM_SYSCOMMAND message and if the command id is SC_MAXIMIZE, ignore the message - don't pass it to your default windows procedure. This means the window doesn't maximize. However, it does not cause the button nor system menu item to be shown in grayed disabled state.
2) I haven't tried this to know if it works. It's worth you trying if you want the button and menu item to be disabled. Get a handle to the system menu and disable the menu item for maximized. That will definitely cause the entry in the system menu to be disabled, but I don't know if it will percolate over and cause the maximize button to also disable. Let us know how it goes.
Judy
|
|
|
|
|
Using Visual C++ and web browser control (CDHTMLDialog).
I would like to do the same thing as IE or FF does. Capture email and password on a form when user clicks submit.
I noticed that when the user clicks a button or input that would submit a form, Firefox asks the user if he wants FF to save the password. I want to reproduce the same behaviour using the web browser control.
I think it boils down to 'how can I detect that a form is being submited ?'
Louis.
"Ambition without knowledge is like a boat on dry land"
-Mr. Miyagi
|
|
|
|
|
Hi myself,
* For anyone who is interrested, I managed to do it this way:
1) I can receive mesages when a user clicks on elements in the page. So, i handle clickin on <buttons> and tags. If the type attribute is submit (buttons and inputs) or image (inputs), then it is about to submit the form.
2) Get the form object, get the email and password input fields and retrieve their values.
I am not sure if this is how the browsers do it, but seems to work fine for me.
Louis.
"Ambition without knowledge is like a boat on dry land"
-Mr. Miyagi
|
|
|
|
|
On this site at:
http://www.codeproject.com/java/sharedmem_jni/sharedmem_jni_src.zip
...is a sample program that illustrates its accompanying article, "Using Memory Mapped Files and JNI to communicate between Java and C++ programs."
On the C++ client portion of the sample, I was wondering if someone here would know how to remove its windowing aspect, frames, its window area that paints in text that was broadcast from the java server--and recreate the client as an MFC DLL. I want its functionality preserved, but I don't want to see a window. The resultant C++ code would just write the received broadcast into a flat file or a MessageBox.
I tried to make an MFC DLL out of it, but I can't. I'm just not able; I don't have enough knowledge of the language.
|
|
|
|
|
I think you'll be lucky to find anyone here with the time to do that for you.
The most likely person might be the article author. You could try posting against the article or contacting them directly.
Much more likely to be fun and educational is to do it yourself despite your lack of knowledge. My approach would be to start by creating a vanilla MFC Dll using the wizard. Anyone can do that. Then look at what you get, get the hang of exporting functions and classes from the Dll and create a small executable with the wizard as well. Test that you can load your toy Dll into the toy executable and call a sample function or two.
Now you have all the structure you need, start porting one class or function at a time from the article into your Dll. Keep rebuilding the code at each stage and adding functions on the executable to test what you're adding to the Dll. Very soon you'll have what you want and can post an article on CP trumpeting your success and acknowledging the original article author.
If you get stuck with anything specific along the way there will no doubt be CPians available to help you out. Enjoy
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Another possibility:
If you want all functionality of that programm but you dont want the window... and you are integrating it into another project. You can always write de code into a CObject derived (generic) class, where the methodes will continue working but no windows. Or just try to hide the window to this part.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|