|
Maybe I am not explaining this correctly or do not not understand your solution. I will try to explain with example:
When I click on a button in my main form (CUsbDlg) it run the following:
void CUsbDlg::OnFormatBlock0()
{
CUsbIo cUsb;
//Setup the usb communication (load the bix file)
if(!cUsb.CommunicationSetup())
The problem is that I need cUsb to update a Static text box on the CUsbDlg form. There are items that happen within the CommunicationSetup that may take some time. I need to let the user know where we are in the process.
Eric
|
|
|
|
|
braune wrote: The problem is that I need cUsb to update a Static text box on the CUsbDlg form.
Ok, so what's the problem? One way to achieve what you want is to have the CUsbIo class post messages back to CUsbDlg . In the handler for those messages, update the static controls.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hello all,
I am trying to read excel file through my code.i have used CRecordSet class for that, but when i m trying to use Open function and passing null in place of sql; statement is give abort error dbcore.cpp. How to solve it....
can anybody please help me in this
Thanks in advance
|
|
|
|
|
|
I was trying in this example only. There is a open function in this example
which opens the connection
m_sSql.Format("SELECT * FROM [%s$A1:IV65536]", m_sSheetName);
try
{
m_rSheet->Open(CRecordset::forwardOnly, m_sSql, CRecordset::readOnly);
}
here in try block it passes m_sSql (sql command).
when i pass NULL instead of sql command it gives abort error.
Acutally i m trying to read my excel sheet without using sql command...
|
|
|
|
|
neha.agarwal27 wrote: ...give abort error dbcore.cpp.
Are you referring to an assertion?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi there !!
I would like to seek some help to understand if there are direct Windows API (C++) to create a zip file from multiple files.
I have a set of files which i want to package into one zip file programmatically.
Please let me know what is the best possible way to to get this done.
Thanks and Regards,
Jai Praful Ved
|
|
|
|
|
As far as I know there is no windows API support for handling ZIP files.
Windows just supports cab files.
I you want to process zip files from c++ you should zlib which is free.
Just google for "zlib" or see
<http: en.wikipedia.org="" wiki="" zlib="">
|
|
|
|
|
Will I be able to use zlib library to make a package out of a number of files into one zip file ?
Let me give you some details. I have a set of files and folders with data. I want to programmatically package these files and folders into a single zip file. The zlib works for buffers and I have a set of files and folders to work with......
Please guide me !!
Regards,
Jai Praful Ved
|
|
|
|
|
|
Hello,
I have derived a class from CWnd to make a dialog box.I was not able to derive a class from CDialog since it needed a dialog resource ID which I don't have.So I derived a class from CWnd .
But how do I make the window behave like a dialog where the user will not be able to activate any other window before closing this window(dialog).
Thanks
Prithaa
|
|
|
|
|
If you need Dialog behaviour, it will be better if you derive from CDialog. The ID is automatically set by the assistant if you are using it, but you can set it dinamically too. Take a look to the function (VC++ 6 help quote)
CDialog::CreateIndirect ():
Creates a modeless dialog box from a dialog-box template in memory (not resource-based).
CDialog::InitModalIndirect ():
Creates a modal dialog box from a dialog-box template in memory (not resource-based). The parameters are stored until the function DoModal is called.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
Thanks Nelek
So do you mean that I can derive a class from CDialog without any resource template and call the function InitModalIndirect().But this function requires lpDialogTemplate, so I should make that structure and add the windows
controls as I want them in the class.
Will it be that simple?
Pritha
|
|
|
|
|
It should, but I can not say it will :P
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
Thanks Nelek
I will try that.
Prithaa
Bye
|
|
|
|
|
Just one thing more, as well you should try to write new messages with new questions... if it is something related with this... please tell me here about the new message, I will have a email if something is added to this post. It is to avoid not reading a message related
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
Hi, I recently posted an article (http://www.codeproject.com/useritems/VC2003MeyersSingletonBug.asp) and one of the comments raised a question that I cannot find a definitive answer for. I'm hoping somebody can help here. The question is:
In C++, if an inline class member function that contains a local static variable is included in a header which is included in more than one CPP file, does the linker garuantee that the static variable is treated as a single instance?
So in foo.h:
class foo
{
public:
int bar()
{
static int i = 0;
++i;
return i;
}
};
And in fooA.cpp:
#include "foo.h"
extern void fooB();
int main()
{
foo f;
printf ( "%i", f.bar());
fooB();
return 0;
};
And in fooB.cpp:
#include "foo.h"
void fooB()
{
foo f;
printf ( "%i", f.bar());
};
Should I get the output:
12
Or:
11
BTW, I know what actually happens in my similar real code - I get "12" which is what I expect. But I'd like to know if this is C++ standard behaviour, undefined in the standard or just an MS compiler quirk. Thanks for reading.
|
|
|
|
|
I can't speak to the standard but the MS compiler simply ignores the inlineness of the function. In fact is never 'gaurentees' to inline anything even if you __declspec(inline) or __forceinline. This may be one of the reasons.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
FWIW, GCC seems to behave the way I expect (links the static as a single global instance) as well (also with optimisations enabled).
|
|
|
|
|
Hi,
I'm using one COM component(exe), which implements the connection points also.
I have a client which implements Sink interface . The event the server fires is a method with a single argument BSTR. When the server fires the event, client gets the notification, but the BSTR value is invalid(empty string).
The problem is also seen with ULONG parameter also(where the value is garbage). Please suggest a solution, and please suggest if it is a good idea to have parameters in the event notifications.
Also if two clients are connected to the server, only the client which caused the event to be fired is getting the notification.
Thanks and regards,
Raja Pratap.
|
|
|
|
|
It's a little while since I did any COM connection points but if your data isn't getting through then I guess it's a marshalling issue. Check you Proxy/Stub implementation. Parameters in the event notifications should definitely work.
The Server end needs a loop to notify all the clients for each event. Most of the samples leave this out as they simplify to one client.
5 years ago I had to implement reverse connection points with no documentation so I remember how painful this can be.;)
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
hi can anyone tell me any article for creating setup project(msu installaer file creation) in visual studio 2005. pls help me
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
|
that page not found. my problem is i am creating a msi package. when i install this the path where the package installed should be added in registry
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|