|
Hi friends. I'm a new programmer. In an application, when i click About menu, i want the my About.h dialof form to display. In the MSND library, i saw such an example to display user defined dialogs;
{
Form ^ f = gcnew Form();
f->ShowDialog();
}
And i changed this code to display my About.h form dialog such as;
{
Form ^ About = gcnew Form();
About->ShowDialog();
}
But, i still see the same empty dialog instead of my About.h form. So how can i display this dialog when i click About menu ?
|
|
|
|
|
|
hope this helps, there, you're not creating an "about form", you're creating an empty form that is named "About". if you want to create an about form you'll probably need something like this:
<prv>
CAboutForm^ About=gcnew CAboutForm();
About->ShowDialog();
hope this helps
|
|
|
|
|
I want to extract the domain name from a url string. I know there is a function in wininet.dll InternetCrackUrl but I really don't want to link against the whole library to use just a single function. I tried passing the url into splitpath but it can't handle it ( the domain name is return as part of the path ).
Does anybody know of any other functions which may do the job?
|
|
|
|
|
Do you want the functionality of flags ICU_ESCAPE or ICU_DECODE?
Jeff
|
|
|
|
|
not really, I just want to extract the "www.google.com" from "http://www.google.com/search?url+split". For now at least, maybe later I will want to add more functionality.
|
|
|
|
|
It doesn't matter, I threw together a small function to do the job. It'll do for now at least.
bool SplitUrl( LPCSTR szUrl, LPSTR szLoc, UINT uLocSize )
{
UINT uCount = 0;
while ( *szUrl != '/' ){
if ( !*(szUrl) )
return false;
szUrl++;
}
if ( *(++szUrl) != '/' )
return false;
szUrl++;
while ( *szUrl != '/' && uCount < uLocSize-1 ){
if ( !*(szUrl) )
return false;
szLoc[uCount] = *szUrl;
szUrl++;
uCount++;
}
szLoc[uCount] = 0;
return uCount > 0;
}
|
|
|
|
|
You can always use dynamic loading thru LoadLibrary + GetProcAddress to resolve the function at runtime when you need to use it (perhaps to isolate all in a small class to cache this would be even better).
|
|
|
|
|
What is the difference between a function definition is in outside of a class in .cpp file and defined inside of a class in .h file when the header file is included by some other .cpp implementation file?
Thanks & Regards,
Suman
|
|
|
|
|
When you define a method inside the class (i.e. making declaration and definition at the same time), you're suggesting the compiler to inline expand inline that method. However, AFAIK, that's only a hint: the compiler may ignore your suggestion.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
By defining function inside class body, you are hinting compiler to make it inline. You may have look at this[^].
You can make function inline defining outside class body, by using keyword inline.
|
|
|
|
|
Thank you very much for the great help from you both!!
Thanks & Regards,
Suman
|
|
|
|
|
Hi All,
I can't seem to find a reference for the bit count instruction on a Pentium. I found the Bit Scan instructions, but not the Bit Count instruction. Is this not available on a Pentium (it's been about 4 years for me - I may be confusing RISC and CISC?)?
For example, EAX = 0x0000000A ( 1010 binary )
Bit Count = 2
Intel Pentium Instruction Set Reference Manual[^]
Jeff
|
|
|
|
|
In fact, I think there isn't.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Thanks. It stinks getting old. You forget what you forgot...
Jeff
|
|
|
|
|
Dito!
But on the plus side we now know that all those old guys that said "I have forgot more than you know" were telling the truth.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
|
Thanks WalderMort. I had to do it the hard way. DirtyPad[^]
Jeff
|
|
|
|
|
For a byte, you may use a look-up table.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
|
I have tried... but some error appeared... in string funtion(strcpy/strcmp/strcat)...
Let me know a way... If could be... let me a full code... I think, it's not too long...
Thanks...
Try to find how to die
|
|
|
|
|
Perhaps if you show us what you have tried already and what errors you are getting, we will be able to help you a little better.
And a bit of advice, don't put "help me" in the title of your post, most users will just avoid reading it.
|
|
|
|
|
First of all 'help me' doesn't tell people anything about your request. 'The last exam' tells us you want us to do your homework, people will just ignore that.
If you're going to tell us it's your homework, all the more reason not to expect help unless you post the code you've written, and ask *specific* questions about where you're stuck. Your request reads to me as 'this is the task, do my homework for me'. We're not doing that.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I think you can see ean exmmple on the codeproject about check speller maybe it some helpfuls
|
|
|
|
|
Eric Raymond (if I remember well) have a fragment about "please do my homework" questions.
You may find it both instructive and humorous.
Quick solutions you may want to consider:
1. post a bid request on Rentacoder website and have it done by someone else for a low and quick buck;
2. (variation of 1) ask help [read: copy] from a colleague;
3. read the documentation and help and do it yourself (that's the idea).
On what NOT to do:
- type with capital HELP ME, HELP Me, HeLP mE etc.
Exercise: Write a C program to generate from a string all the distinct variations that contains an upper case letter.
- post the same message with higher speaker volume on the same (or other) thread.
Is ok to ask for help, but only after you pulled your hair and destroyed your 3rd keyboard.
|
|
|
|