|
What kind of library are you developing (e.g. DLL)?
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Is a static library at this moment, in the future will be a DLL.
The question is, I dont want that the final user have .h of all my internal classes.
The first answer from Iain could be the solution.
|
|
|
|
|
Actually you haven't to expose headers for not exported objects.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I'm trying to load the small warning triangle system icon using the following code:
LoadImage(NULL,NULL,MAKEINTRESOURCE(OIC_BANG)IMAGE_ICON,16,16,LR_SHARED | LR_DEFAULTCOLOR)
This gives me an image but it's the 32x32 version, normally shown by MessageBox(), resized to 16x16. How do I get the proper 16x16 version shown by Event Viewer or by system tray balloon tips?
|
|
|
|
|
Hi,
I have a edit control,which needs to accept only values in between 1 and 999. I put DDV_MinMaxInt for the edit control variable . It works fine when user enters any value out of range 1 - 999 by popping up to enter a value in between 1 -999 .But the title of the dialog is the workspace name. I need the dialog with another name. How do I need to change the title of dialog.
In DotNet 2005 editor NUMBER = TRUE in properties of edit control. This is validating fine for any alphanumberic or special characters. When I type nothing in the edit control and click on the enter button a dialog pops up saying to enter a valid number. But the title of the dialog is the workspace name. How do I need to change the title of the dialog. Is there any way to do it.
Thanks,
Venkat
|
|
|
|
|
The answer to both of your questions is the same... (which I'm sure you know).
If you debug into the DDV_ functions, they'll eventually call AfxMessageBox, with NULL as the title parameter.
And that will either load the default title from a resource string, or get an CWinApp method, which in turn loads the string.
So the short answer is to look at your resource strings.
If you want different parameters to show different titles on the popup DDV_ failure box, it'll be harder. *IF* the AfxMessageBox calls a CWinApp member function, you may be able to over ride it.
Failing that, you'll have to do your own validation. I don't remember the last time I used DDV_xxx, as I prefer other ways of indicating problems (like turning the background of an edit box red, with a big X next to it, and disabling the OK button).
Good luck, and good learning,
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
How can I slow down text with a 2-second timing in between letters?
The following will not work:
#include <stdio.h>
main()
{
/* And yes, sleep(2); actually takes up two whole seconds for some reason */
printf("\n\nH"); sleep(2);
printf("e"); sleep(2);
printf("y\n\n"); sleep(2);
return 0;
}
/* For some reason this code FIRST executes the "sleep();" functions first. It then gives the output "Hey" all in one shot four seconds later. I am using Ubuntu if that helps, but I guess everyone else is using Windows because it seems to work on their computers. */
|
|
|
|
|
char* pchText = "Ghost types";
while(*pchText!='\0')
{
cout<<*pchText++;
Sleep(2000);
}
return 0;
tell me what this do in you machine. I'm waiting.
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
I will not be able to write code until I get home, school computers wont let me install
compilers
|
|
|
|
|
VuNic wrote: *pchText++;
you know this is bad coding, but you push a newbie into it ?!
evil you are
|
|
|
|
|
Hey VuNic could you tell me why this is conflicting code and give me an alternative?
|
|
|
|
|
std::string str = "A Good Spirit Types";
std::string::iterator it;
for ( it=str.begin() ; it < str.end(); it++ )
{
std::cout <<*it;
Sleep(2000);
}
This one's okay?
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
much much better
it would be even better if you wouldn't put that horrible using namespace std; at the beginning of your code
|
|
|
|
|
That's true. I avoid that too It's a good practice but I don't feel it's something "horrible".
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
I prefer the first release. Just a note, Sleep is not available on Linux .
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Yeah even I like the first one. But Tox the tiger commands things and I end up changing to what he asks Tox Rox!
And yes I just noticed in a Linux site, Linux sleeps a bit different with C++ there. lol .
gudnite!
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
lol it isn't bad if we get used to. well, to newbies yes, may be you are right, let him find that out. sooner or later he'll find something like that and it's helps him there
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
I agree, that's not bad code at all. Just code. Newbies should masters such C -like constructs in order to master C++ .
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
So you just got a fan.
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
That's not bad coding at all.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Try calling fflush before each sleep call; this way, the text in stdout's buffer gets pushed to the console immediately:
printf("\n\nH");
fflush(stdout);
sleep(2);
printf("e");
fflush(stdout);
sleep(2);
printf("y\n\n");
fflush(stdout);
sleep(2);
|
|
|
|
|
AWSOMENESS!!!PERFECT. I got it now. Adam Maras I am forever your servant.
Thanks All for your help
|
|
|
|
|
Hi,
Is the only way to override members of a Base Class (and get to thier private members)
Is by having them declared Virtual ???
|
|
|
|
|
ForNow wrote: (and get to thier private members)
You must be kidding. Otherwise time to take up the book . Hint: You need a friend.
(the David Crow way!)
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
ForNow wrote: Is the only way to override members of a Base Class (and get to thier private members)
You can't get to a base class's private members from a derived class through overridden methods, whether they're virtual or not. A derived class can see public and protected members of its base class(es).
And you should also question why you're wanting to get at the base class's private members - either the base class is designed wrong or you're going the wrong way about things.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|