|
Hi everybody,
In my dialog based application ,i should open up an "Notepad" when the user clicks an button in the dialog.I'm using
flushall();
system("notepad");
functions to open the notepad.Theproblem is when i open the notepad it opens up with the command prompt window and when i want to close the notepad the dialog doesnt gets repainted properly and it looks disfigured.It'll be really great if anyone can help me out in this.
Thanks and regards,
Rajeev
|
|
|
|
|
Use ShellExecute or CreateProcess .
A demo[^]
Nibu thomas
Software Developer
|
|
|
|
|
try to use ShellExecute(...) to open notepade.
We Believe in Excellence
www.aqueelmirza.cjb.net
|
|
|
|
|
ShellCreate(..),system(...) and CreateProcess are all opening the notepad ,but my actual problem is refreshing the screen(painiting it again) after the notepad is opened.How do i solve that
|
|
|
|
|
What You need to refresh screen?
|
|
|
|
|
SHELLEXECUTEINFO shell;
memset(&shell, 0, sizeof(SHELLEXECUTEINFO));
shell.cbSize=sizeof(SHELLEXECUTEINFO);
shell.lpVerb=_T("open");
shell.hwnd=m_hWnd;
shell.nShow=1;
shell.lpFile=_T("Notepad.exe");
ShellExecuteEx(&shell);
|
|
|
|
|
Normally this should not be a problem. To me it seems that you block your application somehow to proceed. I think system() is a call that blocks progress of the program invoking it. So while Notepad is active repainting will be prevented. Maybe using ShellExecute() in stead of system() will solve your problem.
Regards,
Rudolf Heijink
|
|
|
|
|
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
|
|
|
|