|
Hi all,
I've developed one dialog base application in which there is an edit box with multiline selection enabled.
after entering an text into the edit box, if i click "ENTER" key to get to the next line the application closes up.What could be the reason??
could anyone help me out in this please.
Thanks And Regards,
Rajeev
|
|
|
|
|
Make sure the ES_WANTRETURN is set on the edit control. Without this the dialog handles the keystroke and interprets it as a press of the default button (the button with a darker border around it). The dialog editor allows you to set this style.
Steve
|
|
|
|
|
rajeev82 wrote: if i click "ENTER" key to get to the next line the application closes up.What could be the reason??
Set the "Want return" property of the edit box to TRUE .
Nibu thomas
Software Developer
|
|
|
|
|
Thanks a Lot for ur help!!!!!!!!
|
|
|
|
|
Can i acess the remote database without using server ?
JAYARAJ
|
|
|
|
|
Can you explain more? You say you've got a remote database, I assume the term "server" refers to the machine it's on - So without the server there is no database?!?
Steve
|
|
|
|
|
i have SQL Server in my LAN
how can i acess database outside my LAN (i,e INTERNET)?
JAYARAJ
|
|
|
|
|
Hi,
I've one USB-to-Parallel cable. May I know if there's a way to write a VC++ program such that it's able to access individual bit of the parallel side?
The program is to be run in WinXP, Win2K, and possibly Win98.
Thanks.
|
|
|
|
|
i have intro to comp. programming and i was wondering if someone could help me out with a code here. its probably very easy, but im just not understanding.
Write a program that calculates the fine for a speeding ticket. Choose a base fine for violating the speed limit and an additional fine for each mile per hour over the speed limit. You decide what the speed limit is (be sure to tell the user what it is!) and the user enters the speed they are traveling (guaranteed to be over the limit). Output the miles per hour they were over and the fine.
it would b greatly appreciated.
J-Dub
|
|
|
|
|
We're not going to do your homework for you. Which part don't you understand?
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
jwacho5 wrote: i was wondering if someone could help...
Yes, there are several here that could.
jwacho5 wrote: ...im just not understanding.
Which part exactly?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
First you need to define the bases: speed limit and fine. Take this as an example:
const int SpeedLimit = 100;
const int BaseFine = 500;
const int Additional = 10;
Then lets say that someone was running at 110MPH. It would be
int ActualSpeed = 110;
Ticket = BaseFine + ( ActualSpeed - SpeedLimit ) * Additional;
But be aware that this is only true if ActualSpeed is grater or equal to SpeedLimit, if it's lower you will wind up getting negative results, meaning that the cop would have to give money to the driver :->
Hope it helps
regards
hint_54
|
|
|
|
|
Is there exist a data structure or Algorithms which support operation such like Insert AND DeleteMinimum in constant time?
Welcome to my site:
http://www.cntomorrow.com:3310
|
|
|
|
|
I have seen that almost data structure I known so far does DeleteMinimum in O(log N) in worse case. but no algorithms can do this in O(1).
Welcome to my site:
http://www.cntomorrow.com:3310
|
|
|
|
|
If the data structure is sorted, then you could achieve O(N) for deletion.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
I think you will find that Insert in constant time and DeleteMinimum in constant time are mutually exclusive.
An unsorted linked list (or even a vector) will allow for Insert to occur in constant time (just add the new element to the end of the list), but DeleteMinimum would require a search to find the value and could not be done in constant time.
On the other hand a sorted linked list would let you perform DeleteMinimum in constant time (because you know the minimum value will always be the first [or last] element of the list). Insert into the sorted list, however, could not be done in constant time since you would have to determine where in the list to place a new entry.
So, you have a trade off. Do you want Insert to be efficient or DeleteMinimum to be efficient? You need to understand how an application will use data in order to choose the optimum data structure.
Regards,
Dan
Remember kids, we're trained professionals. Don't try this at home!
|
|
|
|
|
Thanks, Dan McCormick. Thank you very much!
Welcome to my site:
http://www.cntomorrow.com:3310
|
|
|
|
|
How can we enable an edit box after a button is clicked??
By using fprintf function, how can we print the character backslash (/) and aphostrophy (') in a .txt file???
HelpMe, I like your help
|
|
|
|
|
beardy janggut wrote: How can we enable an edit box after a button is clicked??
m_your_edit.EnableWindow(TRUE);
beardy janggut wrote: By using fprintf function, how can we print the character backslash (/) and aphostrophy (') in a .txt file???
The one you are showing is forward slash. You can print it by including it in the string.
For backslash you have to give two of them together '\\'. This will print a backslash character.
' can be printed as usual.
Nibu thomas
Software Developer
|
|
|
|
|
beardy janggut wrote: How can we enable an edit box after a button is clicked??
On handller of Button:-
GetDlgItem(ID_OF_BUTTON)->EnableWindow(TRUE);
|
|
|
|
|
Hi there..
Anybody knows a way (if it is even possible) to determine an array's size. Something like this:
int GetSize( int* pArray )
{
}
int main( void )
{
int* pArray;
pArray = new int[ 20 ];
printf( "%d\n", GetSize( pArray ) * sizeof( int ) );
return 0;
}
regards [[]]
hint_54
|
|
|
|
|
You can determine the number of elements in a staticly-allocated array:
#define countof(x) (sizeof(x)/sizeof((x)[0]))
int arr[10];
size_t cElements = countof(arr); You cannot do this in a function, however, it's just not possible in C. That's why a function always takes an array (or pointer) and a count of elements when it has to know the array's size.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
Michael Dunn wrote: That's why a function always takes an array (or pointer) and a count of elements when it has to know the array's size.
Could be speed optimization
Too bad.. I'll just have to do that
regards
hint_54
|
|
|
|
|
Once you pass the array to the function it decays to pointer and size information is lost. Why not use a std::vector instead?
Steve
|
|
|
|
|
Stephen Hewitt wrote: Why not use a std::vector instead?
std::vector is one of best solution for dynamic array i believe... But ones should know how to deal with raw one too.. then he can able to differntiate what is good and what is bad!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|