|
chandu004 wrote: in my edit box, the fifth character cannot be an alphabet.
It sounds like you need a masked edit control. See here and here.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
DavidCrow wrote: It sounds like you need a masked edit control
Or maybe a Caped Crusader
|
|
|
|
|
Thank you very very much for your reply.
it seems that, this may be certainly useful for me.
i shall do some exercise on that and come back to you.
|
|
|
|
|
I want to know how i can realize this convertation?Can you guide me on this?
Thank you!
|
|
|
|
|
|
Thank you very much!
Can you guide me more on this? Because i did not touch the web you provide before, so i want to know more about that.
If you are not convenient,thank you all the same.
|
|
|
|
|
It seems you found your answer.;)
|
|
|
|
|
Yes.I think i am near to solve my problem.But now i haven't solve it yet.I am now trying my best.
Thank you for your help!
|
|
|
|
|
Very good I hope you find answer early.
|
|
|
|
|
Today i have time to look through the web you provide carefully.You provide a tool to realize the converation.But i want to do it through the programme.
Thank you all the same!
|
|
|
|
|
Hi,
I know that the most obvious answer is "check it out" but...
If I code a dll with some functions and, in a part of the main programm, I use it with
MyDll::MyFunction ();
if the DLL is not present when it is supposed to be... obviously the function won't be called, but will the programm give an assertion? or just try the line and go on as nothing?
I have already coded the functions in my program, that should be in the dll. The functions work, but I have no experience with dll and I would like to know the best way to use the functions only when the Dll is there, but having no problems when it is not there.
I have thought to check an easy
CFile f;
if (f.Open ("MyPathToDll\\MyDll.dll", CFile::modeRead))
{
f.Close ();
MyDll::MyFunction ();
}
else
MessageBox ("This function is only reachable if the \"XXX.dll\" is present on \"MyPathToDll\", "Info", MB_OK);
Is it "good"? Which methode is the apropiated one?
-- modified at 3:09 Tuesday 30th October, 2007
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
|
|
|
|
|
If your EXE is linked to the DLL dynamically, then the OS will load the DLL for you when needed. If it can't find it then your application will throw an exception and stop. It will not continue without any error. Mainly because there is code missing.
If you use LoadLibrary to load the DLL and GetProcAddress, then you can code your application such that it can continue without the DLL.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Nelek wrote: MyDll::MyFunction ();
What is this MyDll ?? Is it a class ?
You have two options to load your dll: either implicitely (you link to a static library supplied wioth the dll that contains informations about how to load the dll), or explicitely (you load the dll yourself using LoadLibrary and then using GetProcAddress).
When you load implicitely, if your dll is not present, the program will generate a message box saying that the dll is not present before any of your code is executed, meaning that you have no control at all to 'fix' the problem (the program will exit directly afterwards).
When you load explicitely, the LoadLibrary function will return NULL if the dll was not loaded successfully (if it was not present for example). In that case, you have full control about what you would like to do if the dll is not present. But, beware, with this method you cannot import classes, just functions (of course, you can import functions that return a pointer to a class ).
|
|
|
|
|
Actually, "MyDll" was the name of the dll. I saw it in an example (I don't remember where).
The problem with this is that in this way, (Coding my read / write functions) in two different DLLs as my boss wants, is being a bit confusing to me. All my code is already working in the application but he wants it separated (for security and money). My problem is... "read", should be ALWAYS present (we deliver it with the programm), but "write" will be sold. And both tasks uses code from a third party dll that will be delivered with my programm in demo version (but functional for what is needed).
So I have to code my functions in a dll, and these functions will use a third party dll as well and to know which specifical function has to be called I should read some values from the registry of local computer. I have difficulties to find the best way/solution to do this (I am a bit newbie with DLLs).
So...
1 sure thing: Use LoadLibrary and if not NULL then call my functions, else give my message or do nothing.
The third party is statically linked (I have a *.lib and *.h and there is an error if the files are not present). May I use the methodes of this one inside my dll as I now use them (as part of my classes because of the *.h)?
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
|
|
|
|
|
Nelek wrote: Actually, "MyDll" was the name of the dll. I saw it in an example (I don't remember where).
That's the first time I see something like that . They probably declared a class with the same name as the dll.
Anyway, I suggest that you take some time to learn how dll's work. Getting answers on a forum is nice when you want to learn something quite concrete. You learn something so like dlls just by asking questions on a forum. Nothing is better than reading articles in that case. Take a look here[^], there are quite some good articles.
|
|
|
|
|
|
Nelek wrote: But the problem is that no one says something about calling dll methodes from another dll
There is no difference if you call the functions from an executable or from a dll. So you don't have to worry about that.
Nelek wrote: and the most of them take some parameters, do some things inside with these parameters and give a value as return
Well, that's the purpose of all functions isn't it ? So, what's the problem with that ?
Nelek wrote: But I have to define interactions between dinamical datas, registry and more things.
Yes, and ? What is the problem ?
|
|
|
|
|
The problem is inexperience in the thema. But now I at least am quiet with your answers. I will read a bit more info and start with my code. Thanks
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
|
|
|
|
|
There's something familiar with your name... You're from Spain... you're living in Germany...
Hope is the negation of reality - Raistlin Majere
|
|
|
|
|
Yes fernando, and the nick is the same (webdelprogramador). We "know" us about 1 and half year.
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
|
|
|
|
|
Hey Friends
I have a combo box on a dialog box
I have handle of Main Window & of Combo Box as well.
Now i need to send a Up Arrow Key / Down Arrow Key to the above combobox/main window
tried
SendMessage(cr_MainWindow,WM_KEYDOWN,VK_UP,0);
SendMessage(cr_Combo,WM_KEYDOWN,VK_UP,0);
However it seems i am missing something.
Need help.
Regards
|
|
|
|
|
What are trying to accomplish...? And what is missing?
- NS -
|
|
|
|
|
Hi
I am trying to change vista theme
I open Theme settings & then try to change the vista theme by clicking down arrow to go to some other theme
if i use ccombobox::selectstring
it does'nt works & it seems it needs down arrow key or up arrow key to change theme.
so i am trying to send up arrow or down arrow key to combo box in theme settings
Regards
|
|
|
|
|
vikrant kpr wrote: SendMessage(cr_MainWindow,WM_KEYDOWN,VK_UP,0);
SendMessage(cr_Combo,WM_KEYDOWN,VK_UP,0);
Are these messsages being received by the application?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
no idea whether it receives or not
do u think that the syntax/way is correct?
I am trying to change vista theme
I open Theme settings & then try to change the vista theme by clicking down arrow to go to some other theme
if i use ccombobox::selectstring
it does'nt works & it seems it needs down arrow key or up arrow key to change theme.
so i am trying to send up arrow or down arrow key to combo box in theme settings
Regards
|
|
|
|