I have a string (std::string) that needs to be checked to see if the value in the string is a valid date/time. What is the best way to validate a date/time in C++.
Can an ADO recordset be created using arrays? If so, how.
I have only created ADO recordsets with data from a database...and this was in VB.
I am trying to avoid creating a temporary table.
More details:
const std::vector< std::vector< std::string > > &myData.
I want to get myData into a...
How is this done in C++?
I have std::string that has newline characters in it.
I want to split the string into a vector of strings. I want to split everytime I see the newline character.
How can this be done?
Thanks.
What is the difference between an idl file odl file?
Btw, I am working with Visual C++ using MFC.
I have a odl file in my project...but the type library is not being created. How does it know to create the tlb file? Do I specify it in my mak file or something?
Please help...
Thanks.
This may be a strange question...
From a client application, is there a way to uninclude a file that was included in the header file of a class that is being used by the client?
Hi.
I want to retrieve the value of an edit control from a class that is different from the one that is controlling the dialog.
Class A displays dialogB controlled by Class B.
EditControl is in dialog B.
When I use GetDlgItemText from Class B OnButtonClick event I can retrieve the value of...
In C++, how do I declare a function that has an optional parameter?
I searched the knowledge base and was not able to find anything about optional parameters.
Does setting the default value of the parameter in the function declaration automatically make it optional?
void MyFunction(const...
I have the following lines in my code:
LPUNKNOWN unkSinkPtr;
sinkPtr = new myClass();
unkSinkPtr = sinkPtr->GetIDispatch(FALSE);
GetIDispatch returns a pointer to the IDispatch object associated with the CCmdTarget object.
Do you know exactly where the memory gets allocated?
Is it in my code...
When I use AfxConnectionAdvise, I receive the error 'undeclared identifier' when compiling. I have included afxwin.h in my file... Does any one know what else I need?
Here is the piece of code.
classB* sinkPtr;
LPUNKNOWN unkSinkPtr;
DWORD dwCookie;
sinkPtr = new classB();
if (sinkPtr)
{...
I want to implement an event handler of a third party SDK. All I want to do is call a function in another class when the event occurs. I do not want to display a dialog or anything of that sort.
I am new to C++ and I am confused... it was quite easy to implement an event handler in VB.
I am...
I am using MFC.
When I compile my project, I recieve the following error.
1189: Windows.h already included. MFC aps must not #include <windows.h>.
I have tried including <afx.h> and <afxwin.h> and that doesn't seem to make the error go away.
Any ideas?
I am new to C++... please help.
I am using Visual C++ (using MFC).
FunctionA looks like this.
FunctionA(Long* pVal)
I know I can call function A like so..
long bRet;
FunctionA(&bRet);
However if I want to pass the return value as a parameter of another function (FunctionB) call... how do I...
I am not sure if this is the correct forum for this questions...
I wanted to know about the windows services...
Can a service be started/restarted by any operator or only my a sys admin?
When a service fails during startup, is the user notified or is it only written to the log?
I am very new at C++. So please ignore my ignorance.
In my class, I am trying to use the CCmdTarget Class. When I build, I receive an error saying "base class undefined". What does this mean and how to do I resolve it?
Please help.
I have found this site to be useful when I was working on VB 6 and ASP... now I am working on C++ (I am new at this).
I noticed there is no C++ forum here.
Does anyone have any recommendations for c++ forums?
I want to change the color (grey) of the checkbox... not just the attached text but rather the actual checkbox.
Is there a way to do this?
maybe an API function?
I am playing with the MDIChild stuff...but am not getting anywhere.
Question:
I'm using VB6 to create a document...specifically a powerpoint presentation. I want the document to be saved to a certain directory or atleast be defaulted to that directory. How do I specify the defalult directory where I want the document to be saved? I want to do this without...
Currently, I'm using .bmp files to save my screen captures.
These files are large.
What is a good image file to use that
* doesn't take up too much space
* of good quality
* minimal loading time
Any recommendations...? .jpg, .gif, .rle,....
I have the following code...
dim file as string
dim result as integer
file = "C:myFile.bmp"
Picture1.Picture = LoadPicture(file)
result = StretchBlt(Picture2.hdc, 0, 0, 150, 130, Picture1.hdc, 0, 0, 8055, 4095, SRCPAINT)
Picture2.Refresh
When I run the code, Picture2 displays a...
Is there a GetThumbnailImage method for the Image object?
From looking at the help files, it seems as though there is such a method. However, it doesn't show up as a method under the image object.... Anyone know?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.