|
Hi,
I can convert the value of a CString to a float with sscanf:
sscanf( strnumber, "%f", &m_dAg);
I have tried to do this wiht a double, but it doesn't work.
Is it possible to do that ?
Thanks for any help,
Claude
|
|
|
|
|
|
Try using:
sscanf( strnumber, "%lf", &m_dAg);
lf should be used for doubles
|
|
|
|
|
You might also try strtod() function.
Regards,
Andrei zenkovitch
Dundas Software
|
|
|
|
|
The problem is related to ATL Wizard in VC 6.0.
When we add some interface, we have to specify its threaded model. There are four threaded models are given.
1. Single
2. Apartment
3. Both
4. Free
My COM take data as input and passes it to corresponding server, and I m using this COM in ASP. I have confusion of which threaded model should I have to use so that the COM can fullfill multiple requests at the same time.
Thanks!
|
|
|
|
|
Hi!
You have a choice of using Both or Apartment depending on the object's scope on the ASP and the way you are going to use it.
There is a very good article by Don Box about the threading models (http://www.develop.com/dbox/aspapt.asp), you also can have a look at the Microsoft's articles (http://msdn.microsoft.com/workshop/server/asp/server01242000.asp).
Regards,
Alex Gorev,
Dundas Software.
|
|
|
|
|
hai all
i am using a list ctrl and 4 buttons(first,prev,next,last) for scrolling the items in the list ctrl.
what i want is whatever item selected previously (by clicking any of those 4 buttons)
should be deselect again if any of the button is pressed.And also the selected item is in gray colour.
i want to set my own color.this is not owner draw list ctrl.
but i am not able to get that.i used setitemstate to set the selection.
pls any of u can help me.
it's very urgent.
bye
satheesh
|
|
|
|
|
I have visual studio 6.0 installed. and i tried installing visual interdev. but it says version conflict.....what do I do??
Please help!!!!
|
|
|
|
|
Hi folks.
Okay, this is more of an idea that I have, so it should probably have been in the general discussion area. But however, this is fully to do with VC++, hence you're reading it here.
It so happens that most of us,in what little spare time we have, try to learn new things related to our work. The internet has changed the way we work too. My idea is to take advantage of this, and form a virtual developer team over the internet that likes to work on fun things in spare time-which would no doubt have intellectual value to the developer.
I suggest we can write a small program as a team, but while working across the internet. Communication will be primarily by e-mail, also by way of excellent electronic group sites, such as www.egroups.com. Finally, after we complete the program, we shall post it in Codeproject for the benefit of others. As noted before, the program will be written in VC++; hence a requirement becomes that the anyone joining this e-team is atleast a little familiar with VC++. As this program will be written by many working together across the net, the program will have to be of reasonable size.
Anyone interested? If so what program can we write? Come on, I am sure some folks would be more than interested in this-after all, Linux was made this way
Let me know what you think!! If I get enough responses that communicate interest, I shall create an e-group for all of us. We can take it from there. Bear in mind that SHOULD we form a team, the development of the program might be a fairly slow process-as we will be communicating across the net, as well as be working on this in only our spare time.
Please be aware that this venture is a NON-PROFIT one, solely cooked up for the fun of doing it, as well as for the learning value. Remember, if the e-team does come up with something interesting, we will be posting it in CodeProject for the benefit of others.
Hope to hear from y'all-we need IDEAS! Hope we gain some critical mass here.
Shanker.
|
|
|
|
|
Hi,
it's a cool idea.
Can you tell me more ?
|
|
|
|
|
Excellent idea!
This kinda goes along the lines of something I was thinking about for CodeProject but you've taken it a step further.
I will support this fully and if there is enough interest I can supply a dedicated mailing list, a section in the "Libraries and Projects", and some scripts to allow versions to be uploaded and updated.
Who's in?
|
|
|
|
|
Great Idea,
I really want to try this out. I can't work on it everyday, but it seems interesting to work on something with other people around the world.
|
|
|
|
|
Count me in!
I'm not totally familiar with SourceSafe...but, if it is possible...Chris could you run a SourceSafe server?
Frank
|
|
|
|
|
Great idea.
However, there are some /*minor*/ issues that can influence the people interested in this 'event'.
* What kind of subjects or target applications do you have in mind?
I am sure some people are more interested in graphical development and others in internet/intranet or operating (sub)system development, ...
For instance, I am interested in DVD, MPEG, video streaming issues, ...
* Where will the project development site be hosted
On codeproject ? I, for one, would prefer this. After all, the idea was launched here.
* how is it technically done ? (-> Chris, you can start 'brainstorming' now...)
Source'safe' across the net ???
or maybe with something like "Code Co-op" from http://www.relisoft.com ?
(Has anyone used it before ?)
* Charter.
I just wouldn't be 'boring old me' if I didn't nag about a clear non-profit charter.
What is being built, how, which (GPL) licence or free (not) copyrighted source code scheme,... blabla
GBO.
|
|
|
|
|
I think what we need is a fluid team with some possible core members. Each project may be completely different from the last, and so some members may opt out, while new members may join.
As to where it will be hosted - at CodeProject of course!
The issue of source code control can, I think, be dealt with using tools such as CVS. I am currently looking into this and Jerzy Kaczorowski is being incredibly helpful in this department.
Finally, I would prefer that the projects be available for use for free, as is the standard for CodeProject.
|
|
|
|
|
> I think what we need is a fluid team with some possible core members.
Sounds like a good idea. Because I must honestly say that the idea of writing 'another' installer is not that appealing to me.
> The issue of source code control can, I think, be dealt with using tools such as CVS.
cvs is kinda like "rcs" on Unix/Linux, yes?
I hope we can get a nice user-friendly UI to go with it...
|
|
|
|
|
>cvs is kinda like "rcs" on Unix/Linux, yes?
Except that is supports concurent development. That means that no locks are necessary, and many peoples can work on the same files at the same time, then CVS merges the things...
>I hope we can get a nice user-friendly UI to go with it...
WinCvs:
www.wincvs.org
CVS has a good solutions for internet development. In fact WinCvs itself is developed that way as well as CVS of course...
|
|
|
|
|
I am looking for some information on how to implement the computer system hardware classes and I am haveing ALOT of trouble finding
any info. I have looked on MSDN but it only shows me what some of the API's do not how to use them.
Can anyone help me with this one??
Cory
|
|
|
|
|
I'm drawing the text of a menu using DrawText. I have everything working nicely except that the tabs in the menu strings aren't the same length as the normal menu tabs are. I'll make a little picture of what this causes. 'Open' will be owner drawn and the rest will be normal.
Open---Ctrl+O
Save-------Ctrl+S
The owner drawn accelerator isn't aligned with normal accelerator... ignore the - I don't think the html will keep it spaced that way...
Is there any way I can draw it correctly?
Justin
|
|
|
|
|
Hi,
I have an MFC dialog application that uses an ActiveX component also written by me (in VB). The control has been updated to include some new methods and events. The original control was placed into the dialog resource with the dialog editor and Class Wizard generated the wrapper classes for it.
So now the control is updated how do I get the application to use the new control with the new methods available and new events in the dialog class?
Thanks
Sid
|
|
|
|
|
Hi,
Can anybody give me some informations or samples code about printing MSHFlexgrid data and structure
in VC++ ?
Thanks in advance
|
|
|
|
|
here i am doing a program with Windows Explorer style
my question is how to get context menu
when i right click on the empty part of the listview
if i right click an object things are under control
thx
|
|
|
|
|
Hello everyone:
I have a question about bringing a window containing an ActiveX control to the top if it is partially obscured by another window. It's kind of long but please bear with me.
For instance, say MyControl is my ActiveX Control I created that is inside a client consisting of a single window (we'll call it MyClient) - note that the client area of MyControl fills up the entire window of MyClient. Suppose another application's window obscures partially the MyClient window with MyControl in it (therefore, MyClient does not have focus). If I click on the non-obscured area of MyClient (which is actually clicking on the non-obscured client area of MyControl), how can I bring MyClient and coincidentally MyControl to the forefront and setfocus on MyClient?
Now, here comes the twist. MyControl follows the Single Document-View (SDI) architecture. That is, the client area of MyControl is actually a CScrollView, with a CDocument, as part of CSingleDocTemplate object created in the InitInstance of the MyControl's COleControlModule. The CMainFrame is derived from CFrameWnd, but it has no caption bar or border, thereby allowing for a more visually pleasing embedded appearance in the client.
So, what I did was handle the WM_LBUTTONUP handler of my derived CScrollView. I then propagated the the WM_LBUTTONUP msg up to my MyControl's derived COleControl class. There, I managed to get the IOleContainer interface pointer as illustrated below (CMyCtrl is derived from COleControl):
void CMyCtrl::OnLButtonUp(UINT nFlags, CPoint point)
{
IOleContainer* pContainer = NULL;
BOOL rc = FALSE;
if(SUCCEEDED(GetClientSite()->GetContainer(&pContainer)))
{
CWnd* pParent = GetParent();
if(pParent)
{
CRect parentrect, rect;
pParent->GetWindowRect(&parentrect);
GetWindowRect(&rect);
//pParent->SetWindowPos(&wndTop, parentrect.left, parentrect.top, parentrect.Width(), parentrect.Height(), SWP_NOMOVE | SWP_NOSIZE );
pParent->SetFocus();
}
}
if(pContainer)
pContainer->Release();
COleControl::OnLButtonUp(nFlags, point);
}
The "pParent->SetFocus()" works with the control inside a CWnd of a container application, but how can I make it work if MyControl is embedded in the _view of an SDI client application_? Is there anything that I can do with IOleContainer pointer pContainer to bring the container (be it a dialog, a window, or a CView) to the forefront when it is clicked on?
And here's the other thing - say that MyControl does not have focus and it is in MyClient's window. However, MyClient's window (that has MyControl in it) is partially obscured by another application's window, but the unobscured part of MyControl has an edit box (the edit box is a child MFC control and is part of MyControl's CScrollView) visible, and the user clicks on the edit box to set focus on it AND to bring MyClient to the top over the other application's window. How can I do this?
And to make things even more complicated, how can you do this without adding/changing code in MyClient, and only do it MyControl's codebase?
I know my message/query is kind of long, but I would appreciate any help that you can give me.
Thank you very much.
- Mike G
|
|
|
|
|
I am desperately looking for help as how to make my software 30 days demo (trial) version. How can I add security features. Can someone point me to some C++ classes or project.
Thank you all
James Khan
|
|
|
|
|
I've been using ShareLock by by Ken Nesbitt.
Go to http://www.nesbitt.com/products.html
Also look at "Install Maker" by Click Team at http://www.clickteam.com
|
|
|
|
|