|
Adam Roderick J 09 wrote: csv is a more generic format than xls
Yes , you are perfectly right , is much more handly and simple to export data in .csv format then .xls ! I recommend this solution !
|
|
|
|
|
i am using Vertical Scrollbar to the dialog window, when i scroll down with controls it works fine,but i want to reposition my dialog along with vertical scroll bar dynamically.i will reset the Vertical Scrollbar.but dialog remains unchanged.i want dailog to refresh.
eg:
SCROLLINFO si;
si.cbSize = sizeof(SCROLLINFO);
si.fMask = SIF_ALL;
si.nMin = 0;
si.nMax = 200;
si.nPage = 0;
si.nPos = 0;
SetScrollInfo(SB_VERT, &si, TRUE);
|
|
|
|
|
I think you may need to use InvalidateRect() [^] to tell the dialog that it needs repainting.
txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
Hi,
My application reads data at startup from the registry.
By default it always goes to HKEY_CURRENT_USER in the registry, but I would like it to use HKEY_LOCAL_MACHINE.
I know I can use RegQueryValueEx and specify HKLM, but I was wondering if there is a way to set the root to be HKLM instead of HKEY_CURRENT_USER, and therefore when I call
SetRegistryKey(_T("Company\\App"));
the root will be HKLM instead of HKEY_CURRENT_USER.
TIA
Tony
|
|
|
|
|
From within the CWinApp derived class change the value of the variable m_pszRegistryKey .
Allocate the string on the heap because the CWinApp destructor calls free on this variable.
The recommended way of doing this is -
m_pszRegistryKey = _tcsdup(_T("HKEY_LOCAL_MACHINE\\Software\\Company\\App"));
You will need administrative privileges to make this happen.
|
|
|
|
|
Thanks for that,
The problem I am going to encounter then is that most users of my application will not have administrative privileges and therefore won't get that level of access.
I'll have to do a code rejig and use the RegQueryValueEx functionality instead.
Thanks
Tony
|
|
|
|
|
If you want to write to HKEY_LOCAL_MACHINE you will anyway need administrator privileges.
If not it will be written to a key inside HKEY_CURRENT_USER .
|
|
|
|
|
Forgive me if I'm being thick...
In VC6, I could use the Debugger Remote Connection, compile to a network share, and then when I press F5, it would run my program on the remote computer, and attach msvcmon to it. I could make break points, and all was good and simple. The only issue was to make sure the clocks agreed.
I'm trying to do the same in VS2008, and failing...
I can find how tos on attaching to a remote process, but then I can't put a breakpoint in my code.
If anyone can give me pointers, I'm sure I'm missing out on one obvious step.
Thanks,
Iain.
I have now moved to Sweden for love (awwww).
|
|
|
|
|
What sort of issues are you having? The breakpoints are not hit?
When it's simple, I usually compile the binaries to the network drive directly and like you said, if I press F5, it loads it from the network and breakpoints will be hit.
If it's something more complex like an ISAPI DLL that would be loaded by IIS on a remote server, then I attach my debugger to the remote process (inetinfo.exe on the server in this case) and when I load the web page, my break points will be hit (of course given I've copied the DLL to the remote machine).
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Rajesh R Subramanian wrote: What sort of issues are you having?
I can;t find any way of pressing f5 on one machine, and have the program run on another machine (one with msvcmon.exe running on it).
If I run it manually on the remote machine, and attach from my local machine, the any attempt to put a breakpoint in my code gets a white circle with a warning. And that's on code I breakpointed locally not long before.
As I said, I'm probably just missing one setting somewhere, and will feel silly afterwards!
Iain.
I have now moved to Sweden for love (awwww).
|
|
|
|
|
in the project settings -> Debugging -> Remote Debugger (Listbox above the list options)
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Thanks Karsten, this looks exactly like what I was missing.
Sadly, it's not playing well over my long vpn link with different domains and users at each end - But it's a reason to make a VM locally and play again.
Thanks,
Iain.
I have now moved to Sweden for love (awwww).
|
|
|
|
|
Hi,
I have created an SDI application in which i am creating a client-server application using Socket Programming.I am connecting with multiple PCs.My application works fine if the remote PC gets connected.But when the remote PC is ShutDown the application hangs during gethostbyaddr function and takes some time to come out of it.If my client application is not running in remote PCs then it gets hang during connect function.Can anybody please help me out of this or suggest a different way to do it.Its urgent.
Thanks
|
|
|
|
|
Establish connection using thread AfxBeginThread . Then your main application thread won't stuck
|
|
|
|
|
Hi,
Thanks for your reply.I have already tried using AfxBeginThread. But i faced a problem with its synchronization.I am connecting with multiple PCs retreiving some information and then adding it to a tree in LeftView of my SDI application.So if i am using threading then it displays wrong information.Please suggest me another way other than this.
Thanks
|
|
|
|
|
using threads is the right way AND this leads syncronisation issues which you have to solve. You can use messages to your main window) to update the informations. Display some "Updating..." or empty fields til the needed information cames along.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Hi,
Can we give timeout for gethostbyaddr and connect function?
Thanks
|
|
|
|
|
You mean your server connects to multiple clients? Shouldn't it be the other way round? And read up on asynchronous sockets (on the server side). That will help you solve the 'hanging' issue.
CP has a section for articles on network programming. There's also Beej's Guide[^] which might help in clearing up the basics.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Hi,
Thanks for your reply.But my problem is that my application hangs during gethostbyaddr and connect function which i am using for multiple pcs.Please suggest me a way so that my application takes least time durin the above mentiones operations.
Thanks
|
|
|
|
|
gethostbyaddr requires you machine to contact a DNS server to resolve the address.
If your DNS configuration is not correct or if the DNS server takes time to resolve (may be because of several indirections)gethostbyname can only wait the answer or wait for the connection timeout to occur (usually 40 seconds, where TCP is used).
Since this call is synchronous, there is no way to run around than multithreading.
All the communication tasks should be accomplished by secondary threads that send messages to the primary one (may be through the main window) as things happens, letting the primary one to manage the GUI by updating it and responding to user inputs.
Of course, you can set a timer that kills the communication thread if it doesn't signal events after a while, but consider that such "while" is not something you should decide (the response time of the DNS is a network administration parameter that is not relevant only to your application).
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
Abinash Mohanty wrote: application hangs during gethostbyaddr
Hi Abinash! It's a known weakness in MFC's networking classes CAsyncSocket or CSocket , this is what you see when the GUI becomes unresponsive. You would need to implement an asynchronous hostname resolver, otherwise hostname lookups will be blocking everything (they can take quite a while). Btw, if you work with IP-addresses this problem will not occur.
As an alternative use one of the many C++ network classes, in alphabetical order: Alhem, Boost, SharkEngine, QT, and many others.
Hope this helps!
/M
|
|
|
|
|
hi,
i m again with localization issue.i have localized my app for japanese language.everything is showing correctly but tooltips are showing garbage instead of japanese.wat may be wrong?
|
|
|
|
|
have you copied the right string data to the tooltips structure or missed some conversions.
If all doesnt help can can provide the tooltip yourself. =>
CPPToolTip v2.1[^]
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
are u sure that the font used in the tooltip is installed?
|
|
|
|
|
yes font is installed that is why it is showing in other resources.
|
|
|
|