|
there's a better way ... trust me, There's a better way.
go back to your books, and look up the different loops techniques.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
HaXXeD wrote:
Recursively calling it doesnt hurt though.
The reason recursively calling main() is not hurting, is that you are not calling it enough times to do so. It is a bad idea to use recursion, where a simple loop will do the job.
As a general rule: Never call main() recursively.
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
What if i want to restart a program ?!?
-prakash
|
|
|
|
|
|
Other ways exist, from a simple loop to a more sophisticated (monitoring) service. But calling main() recursively should not be considered one of them.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi Friends,
I want to know how to add Barcode support to our MFC application. Thanks in Advance.
bbye
If you have faith in the cause and
the means and in God, the hot
Sun will be cool for you.
|
|
|
|
|
Are you looking for barcode printing or barcode reading? If you are interested in reading barcodes then all you need is a barcode reader. Most barcode readers use RS232 to transmit data from the reader to the pc. If you want to print barcodes then i would suggest you buy a third party barcode creator.
Best Of Luck
Forever Developing
|
|
|
|
|
Thanks for your Reply.
I actually want to read Barcode data from the Barcode Reader Hardware.
Thanks & Regards,
Deliver
If you have faith in the cause and
the means and in God, the hot
Sun will be cool for you.
|
|
|
|
|
( to add to the other answer )
doesn't the hardware barcode scanner come with an SDK that you can use ?
I don't know much about barcodes, but is it simply a unique number that gets scanned and used to track inventory items in a DB ?
Can you be more precise as what you need help with ? the hardware, the communication, the UI, the printing, the DB, ... ?
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
All of the bar code readers I have used use standard Serial Port (RS232) for communication. (Symbol/Welch Allen).
The barcode you are talking about are 1d barcodes. However, PDF417 (2d barcodes have the ability to store about 1900 bytes of binary data.)
Reading data from the Serial port is pretty trivial.
Wait for a single byte on the serial port. After reciving the first byte re-read on the Serial port for a Quater Second. You will now have all the data from the barcode. Do what ever you need to do with the inbound data. Go back to waiting for one byte.
Forever Developing
|
|
|
|
|
Thankyou very much for your reply.
I really appreciate you if u will please give me a small sample with explanation.
Thanks once again.
Deliver.
If you have faith in the cause and
the means and in God, the hot
Sun will be cool for you.
|
|
|
|
|
Are you still look for a sample?
Forever Developing
|
|
|
|
|
I search to scroll verticaly two differents view with the them scrollbar.
Thanks
|
|
|
|
|
humm, Did ya try posting the scroll message to the other view ?
-prakash
|
|
|
|
|
sorry
i'm find a code from list view section on codeproject (Synchronize 2 listview). But i search now to apply this solution for MS Access subform into a main form!!!!!
|
|
|
|
|
Can someone please tell me how to load and icon library(.icl) in VC++ ? I have heard they are 16 bit dlls. I have created a file mapping of the library. But when I try to use EnumResourceTypes API, it fails with error message "the specified file does not contain resource section". But the same file opens in VC++ resource edit and also in other icon editors.
Please help.
cythe
|
|
|
|
|
Hello!
I have two classes. In class 2, there ist a function call OnWriteStuff
Now i want to call that function which is in class 2 from class one. Take a look:
void CSampleView::OnDoWork()
{
CSampleDoc* pDoc = GetDocument();
POSITION pos = pDoc->GetFirstViewPosition();
while (pos != NULL)
{
CView* pNextView = pDoc->GetNextView(pos);
if(pNextView->GetRuntimeClass() == RUNTIME_CLASS(CVorschauView))
((CVorschauView*)pNextView)->OnWriteStuff();
}
}
but, it dont work, why?! How can I solve this?
thx in advance
|
|
|
|
|
Schniddel wrote:
but, it dont work, why?!
Without telling us what problem/error you are seeing, a guess is the best you could hope for.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
nothing happen
he don't call the function OnWriteStuff().
Maybe I'm on the wrong way. Can anybody tell me, how i can call a function, which is in an other view?!
greetz
Thorsten
|
|
|
|
|
Schniddel wrote:
he don't call the function OnWriteStuff().
How do you know? Have you set a breakpoint and stepped through the code one statement at a time?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
i have ste a break point and I do it with message box. but nothing works
is there any other way to do that?!
|
|
|
|
|
Schniddel wrote:
i have ste a break point...
On what statement?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
in the other View where OnWriteStuff is.
I Also put there a MessageBox in it, if OnWorkStuff is calling, the MessageBox should appear. But the MessageBox didnt apear
can ya help me david?!
|
|
|
|
|
It does not make sense to put a breakpoint within the OnWriteStuff() itself when it apparently is not getting called. Go further upstream and put the breakpoint at/near the various places that OnWriteStuff() could get called. You should then be able to ascertain what conditions are failing that keep OnWriteStuff() from being called.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
you re right. I solved the problem
thx for that, but I have now an other problem.
in the OnWriteStuff() function, i call Navigate2(). The second class is a htmlview class. And normally, it must work, but it doesnt, why?!
ist shows me only that:
ASSERT(m_pBrowserApp != NULL);
where is my mistake?!
sorry for that damn poor english, i m from lettland
|
|
|
|