|
I doubt! "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
As Cedric Moonen said, you cannot control this.
But you can always choose what you want to be displayed by formatting the data.
For example, printf("%.3f", dValue); will only show you 3 decimal digits.
The same formatting can also be used with CStringT::Format and other APIs like StringCchPrintf .
|
|
|
|
|
Hi,
I need to develop a software which will get installed in the user pc and reads the phone number from the attached modem. This phone number will be the users own number not the incoming one. Is it possible using Ms-Comm control?
Regards,
J
|
|
|
|
|
emmmatty1 wrote: Is it possible using Ms-Comm control?
My experience with the MSComm control makes me recommend you to not use the MSComm control at all. It introduces more problems than it solves. Writing the communication with a device such as a modem is fairly simple. For an example on how to do serial communication you can have a look here[^].
If you have any requirements on performance regarding speed you cannot use MSComm.
Whether you use the MSComm control to communicate with the modem or you roll your own solution is up to you. But I'm very curious on how you're planning on getting the phone number of the user where the modem is installed. I am not aware of such functionality or any AT command that supports it.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Hi,
i need some help to bring a dialog to top, but only for him parent dialog.
I use this to set child dialog on the top, but he still on top for all applications:
::SetWindowPos(pWaitDlg->m_hWnd, HWND_TOP,0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
but i need it to be only for him's parent dialog on top, not for all, this is a small dialog with progressbar on it!
Thanks for any help!!
Arrin
|
|
|
|
|
I think you can try giving handle to the parent window instead of HWND_TOP as second parameter.
|
|
|
|
|
Hi,
thanks for answer, that is!
Only one issue is there , first here is code:
CProgressDlg dlgProgress;
dlgProgress.Create(CProgressDlg::IDD, GetDesktopWindow());
this->EnableWindow(FALSE);
::SetWindowPos(dlgProgress.m_hWnd, this->m_hWnd,0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
dlgProgress.ShowWindow(SW_SHOW);
dlgProgress.CenterWindow();
dlgProgress.BringWindowToTop();
There is only one thing that is not ok, i can switch between this two dialogs if i click they icons in the taskbar,
in this case is this little "dlgProgress"(simple Dialog with progressbar) Dialog in the background of hims parent(if i click on parent icon),
and that is what i need to avoid! This little dlgProgress must be on top of hims parent until the process is finish!
Thanks for help!
Arrin
|
|
|
|
|
May be you can remove the call to GetDesktopWindow().
I think dlgProgress.Create(CProgressDlg::IDD) would be enough.
In addition to that, I suppose dlgProgress has to be a member of the parent dialog.
|
|
|
|
|
From the msdn page for SetWindowPos: http://msdn.microsoft.com/en-us/library/ms633545(VS.85).aspx,
HWND_NOTOPMOST
Places the window above all non-topmost windows (that is, behind all topmost windows). This flag has no effect if the window is already a non-topmost window.
This sounds a lot like what you want.
Iain.I have now moved to Sweden for love (awwww).
|
|
|
|
|
Hi,
thanks for answer!
Still need help!
regards
Arrin!
|
|
|
|
|
Arrin wrote: Still need help!
Then I need a question to help with!
Did my answer not solve your problem?
Did you realise you asked the wrong question?
Was my answer complete rubbish?
Iain.I have now moved to Sweden for love (awwww).
|
|
|
|
|
I want to know what sort of complexities may arise, if we port an existing application(huge application having so many threads connected to various components) onto a multi-core system.What all the things that can be taken care of while developing an application in order to make it run efficiently in multi-core environment too? If someone have the experience in handling such scenario, please suggest.
|
|
|
|
|
You won't find new bugs by moving from a single core to a multi core.
But you will find the same bugs you already had will manifest more often...
I know that's a short answer, but the idea is not a big one!
Iain.I have now moved to Sweden for love (awwww).
|
|
|
|
|
In multicore environment your multithreaded applications will experience real concurrency, it may be a good test for your synchronization mechanism.
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]
|
|
|
|
|
Thanks for your comments!! Exactly, I am also worried about the thread/process synchronization issues that may come up in the multi core environment. Can anyone have the experience of facing such issues, or atleast have the knowledge about the issues, if so, please reply?
|
|
|
|
|
totally depend on your application architecture, in single core machine, practically each thread on application run on same CPU, means CPU allocate time for Main thread and Workerthread, in that case if program is not correctly syncronize, it can still work.
But on multicore CPU, if every thread utilize service of diffrent CPU, here syncronization should be perfect otherwise be ready for new defect coming your way. "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi all,
i m using this function NetServerEnum.
i have only one option here this function provide random machines.
i mean the serial of machines are not same at each and every time.
is there any other option to find out all machines of workgroup or domain.
thanks in advance.To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Le@rner wrote: i have only one option here this function provide random machines.
i mean the serial of machines are not same at each and every time.
What's the possibility that you are using it incorrectly?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
i m using it like this.
LPSERVER_INFO_101 pBuf = NULL;
LPSERVER_INFO_101 pTmpBuf;
DWORD dwLevel = 101;
DWORD dwPrefMaxLen = -1;
DWORD dwEntriesRead = 0;
DWORD dwTotalEntries = 0;
DWORD dwTotalCount = 0;
DWORD dwServerType = SV_TYPE_ALL;
DWORD dwResumeHandle = 0;
NET_API_STATUS nStatus;
LPTSTR pszServerName = NULL;
DWORD i;
nStatus = NetServerEnum(NULL,dwLevel,(LPBYTE *) &pBuf,dwPrefMaxLen,&dwEntriesRead,
&dwTotalEntries,dwServerType,NULL,&dwResumeHandle);
now please tell me where i m going wrong.To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Since the code you are using comes from here, have you used the debugger to step through the code? Seeing the values of pTmpBuf , dwEntriesRead , and nStatus can be helpful."One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Hi Friends
How to create a program which will run in task bar like Windows Mediaplayer minimized to taskbar.
kk-kk.tvm-
|
|
|
|
|
|
Hi all,
I working on application that is used to monitor Insertion and Removal of USB drives.
here we can also enable or disable usb drives.
with the using of this registry value.
Local_Machine>>System>>CurrentControlSet>>Services>>USBSTOR
here the value os Start decide usb drive is enabled or disabled.
if Start==3
if Start==4
when i set this registry value on client machine its working fine.
but in case of server when i disable the USBSTOR its set the registry value to 4 but usb drive detected by server.
please help me for this.
thanks in advance.To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
There can be CurrentControlSet's for a server .. CurrentControlSet001 ,CurrentControlSet002 and soon so u will have to change values for all of them.
<b><I>Kushagra
|
|
|
|
|
its working fine for client machines without restarting To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|