|
Use strtoul() . It's easier to check for errors than sscanf() .
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
And probably a damn sight faster too - no parsing involved
|
|
|
|
|
While sscanf's format string can do lots of magical things, the function as a whole does not lend itself to easy error detection and recovery. strtoul() is a tad bit better, but the ultimate solution would of course be a finite state machine (FSM).
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
thanx everyone for helping me sorting my problem, here is more explanation to the RGB possible formats
The format of an RGB value in hexadecimal notation is a '#' immediately followed by either three or six hexadecimal characters. The three-digit RGB notation (#rgb) is converted into six-digit form (#rrggbb) by replicating digits, not by adding zeros. For example, #fb0 expands to #ffbb00. This makes sure that white (#ffffff) can be specified with the short notation (#fff) and removes any dependencies on the color depth of the display
cheers
llp00na
|
|
|
|
|
Hi, does anyone know how to change the colour of a group box's border using Windows APIs and not in MFC.
Ive already looked into WM_CTLCOLORBTN messages but I can only change the text's background colour and text colour.
Please help, thanks!
|
|
|
|
|
hello,
I am trying to use the microsoft activex chart control for plotting graph.I went to option Insert->Componenets and Controls->Microsoft chart control6.0.
Now classes and files for this control have been included.But the graphical view of the graph(i.e the dialog resource file is not seen anywhwere)do i have to include it?
what are the steps to be taken?
plz reply urgently
sayup
|
|
|
|
|
If you go in the resource editor, it should have been added to the existing controls (buttons, edit ctrl, list ctrl, ...). So just drop it on the dialog you want. The view is not automatically created as this is just a control like another one.
|
|
|
|
|
thanks,
I got it...
I have a demo code which uses this activex control.It works fine for small set of data and data plotted gradually.But for large data when i keep refreshing the graph flicker a lot..
Smaller is the duration greater are the number of flickerations...
Is there a solution for this?
sayup
|
|
|
|
|
That's probably because the ActiveX control redraws everything each time you update the data. What kind of data do you specifically needs to display ? Lines, points, ... ? And what are you refreshing ? All the data at each time or just adding some new points ?
I don't think there are chart controls on this website (there is a section where you can find some of these) that supports 'real-time' plotting of data. Some times ago, I was searching for such a control but I couldn't find something that fits to what I was looking for. So I decided to develop my own. I can send it to you maybe it will solve your problem. It was designed to work on a PocketPC. I will probably make an article with that control but I stil couldn't find the time to do it
But before sending you the source files, I need to know if this will be ok for you. What kind of axis are you using also ? Automatic axis or fixed axis ? What is approximately the refresh rate of the data ?
If you could give me more the more informations you can, I could check if what I wrote will fit with what you are looking for.
|
|
|
|
|
thanks for the help and the offer to share your control.Thankfully the issue due to some reason is no longer a problem...
one more doubt i have is that,i want to know whether it is possible to display a dialog box in a SDI or MDI client area? and further at a specific position say along the frame of the client area.In case of MDI this can this dialog box be present in the initial parent window?
thanks once again,
waiting for reply
|
|
|
|
|
I have an application and I would like to know if it is possible to run it remotely on the internet by pressing a link on a web site and if yes, how can I do that?
Thanks in Advance
sirtimid
|
|
|
|
|
You can start an application on your webserver with a server-side script (ASP for example)
MS
|
|
|
|
|
Thank you very much! If this is possible can you please give me some references on how to do that with ASP? If you have any link which there is an example it would be very helpfull!
Thanks
sirtimid
|
|
|
|
|
With ASP the following script on your website should do the trick.
<% @ Language="VBScript" %>
<% Option Explicit %>
<title>Start an exe-file with ASP script
<%
dim wsh
set wsh = Server.CreateObject("wscript.shell")
wsh.Run("C:\Windows\Notepad.exe")
set wsh = nothing
%>
ASP does only work with the Internet Information Server from MS (as far as I know). If you use another webserver you need another (server side) scripting language (PHP for example)
Furthermore you need to set the file-permissions for access through the webserver in the correct way.
Search Google for "ASP Tutorial" and you will find a lot.
MS
|
|
|
|
|
I have a program written with PowerBuilder8.0,and i wish to use it in visual c++.How can i do that? any help will be appreciated.
|
|
|
|
|
What do you mean by use it ? Could you be more precise ? Do you want to reuse the sources files and compile them in visual C++ ? Or do you want just to run the program executable ?
If this is the first option, it depends of the sources files themselves. I don't know PowerBuilder at all so I don't know if it uses some libraries of its own. If this is just plain C/C++ files that doesn't make any call to specific API or libraries from Power Builder, then there should be no problem to compile them.
If this is the second option, you can use ShellExecute.
|
|
|
|
|
thanks for your reply,i mean that how to use dll written with PowerBuilder in vc++?
|
|
|
|
|
Ok ! You could have say it was a dll . That changes a lot of things. There are two options to use the dll: either implicit loading of the dll or explicit loading.
For implicit, you will require the header file which contains the prototypes of the exported functions. Then, you add this file to your project and you add the dll in the project (I don't remember exactly where in the project settings, you'll have to look a little bit for that).
For explicit, what you will make direct call to the API through functions like LoadLibrary (to load the dll) and GetProcAdress (to retrieve the adresses of the functions you would like to call). Take a look in the MSDN for more documentation (it is a little bit long to explain in details here).
Hope this helps
|
|
|
|
|
|
sophia2288 wrote:
see,thx again
This Section would be great start for learning DLLS :-
http://www.codeproject.com/dll/[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
can anybody help!
i am creating check boxes at run time in the Statc group box.and i want if the no. of check boxes are upto 13 a scroll bar will added vertically on static group box and further check boxes will create in that group box.but i dont know how i do this
|
|
|
|
|
Sounds like you should use a CListCtrl . It allows you to insert items with checkboxes and has a scrollbar too.
<font=arial>Weiye Chen
Life is hard, yet we are made of flesh...
|
|
|
|
|
Hello all,
When use callback function, and what is the purpose?
Which cases we should use the callback functions?
Could you tell me about?
Thanks!
|
|
|
|
|
http://www.google.co.in/search?q=callback+function
|
|
|
|
|
Callbacks are typically used when the function needs to notify its caller for some reason. This can be for simply informing the caller or for getting information necessary for the function to continue execution.
For example, you can have a timer function that runs in a loop and needs to notify someone whenever a timer expires. You'd write something like
void TimerFunc(CallbackFunc *func)
{
while (1)
{
...
func();
}
}
They can also be used to alter the function's flow depending on the caller. For example
void SomeFunc(CallbackFunc* func)
{
int x = ...;
if (func(x) == true)
{
}
}
As you can see, func gets the ability to change SomeFunc's control flow.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|