|
then, delete the temporary files generated by Visual C++ (there a particular file, maybe .ncb, but i'm not sure, i can't remember which exactly to delete)...
dont erase the .dsp nor .dsw
|
|
|
|
|
Let me try this in a few hours ... it'd be very nice if this works
Thanks.
Norman Fung
|
|
|
|
|
toxcct wrote: then, delete the temporary files generated by Visual C++
ahhhh those were the good ole days... NOT!
led mike
|
|
|
|
|
Close the workspace, delete the workspace_name.ncb file, then reopen the workspace.
|
|
|
|
|
Dear All,
I am using MSXML. Here this below function asking binary string.
"spText = spDocOutput->createTextNode((_bstr_t)Data);"
I have Multibyte/Unicode strings only.
How can i write those string in an XML File using this above code ?
Kindly Help me.
Thanks.
Bye.
|
|
|
|
|
It is not so clear what you intend to do. Anyway, maybe the following overloads of the _bstr_t constructor will be useful:
_bstr_t::_bstr_t( const char* s2 ) throw( _com_error );
_bstr_t::_bstr_t( const wchar_t* s3 ) throw( _com_error );
|
|
|
|
|
Sakthiu wrote: Here this below function asking binary string.
BSTR is NOT "binary string".
BSTR is a string format similar to PASCAL strings where the first 4 bytes of the string specify its length and each character in the string is a wide character (that is, uses 2 bytes).
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
And it is also NULL terminated. But this is just academia...
|
|
|
|
|
I think you can try the save member of parent DOMDocument object, but it writes the entire XML document, not only your element. If you need just one element, I think you can obtain the XML representation of the node using xml property, probably like this:
_bstr_t xml = myNode->xml;
Then write this string using file functions. Note that in case of text node, the returned XML string probably will not differ very much from the value you passed to createTextNode function.
I hope this helps.
|
|
|
|
|
Don't use casts - especially C-style casts - unless you know exactly what you're doing. If you must cast without fully understanding the ramifications using static_cast instead is safer; but still not safe in all situations.
If you want to encode binary data in XML you'll have to encode it. For example you could base64 encode it.
Steve
|
|
|
|
|
Hie,
For logging purpose I am using a text file. I am going to perform following actions
1) Check if file already present
2) if not create a new file
3) if file exists , open it in appead mode.
4) Add data.
5) close the file
My concern if the file size is too big say 500MB. Will there be any performance hit on accessing file in appead mode from disk?
Vikram S
|
|
|
|
|
I have a parent and child window.Child window is having a figure in it.When i resize/restore the child window the figure also has to be scaled accordingly.How to do it?Plz help..........
|
|
|
|
|
Handle the WM_SIZE message and resize the figure there.
|
|
|
|
|
|
Hi all,
Could someone please help me with (information | use on) wildcards in VC++.
Thank you very much in advance.
Regards
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
what do you want to do with wildcards?
|
|
|
|
|
I want to get all the files with a certain extension (example: *.bir) and then my TCP/IP server must send those files to the remot client. Whats why I want to know how to use wildcards...
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Programm3r wrote: I want to get all the files with a certain extension (example: *.bir)
the FindFirstFile/FindNextFile API will do both of those things for you.
|
|
|
|
|
Thank you very much Chris ... I was not aware of that...
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Hi,
I'm having a DLL that exports a class. Each instance of this class should be able to create its own window. Therefore I created a WindowProc class member to process messages to the created window.
While trying to register a window class for my class I tried to configure the message processing by filling the lpfnWndProc field of WNDCLASSEX structure with a pointer to WindowProc. I couldn't get this to compile if the WindowProc function is not *static*. This is not acceptable because this means all instances of my class share the same WindowProc so I don't know which instance should process the messages.
What is the appropriate design to do what I want ?
Thanks
|
|
|
|
|
This is because the functions don't have the same prototype: for the member function, there is a implicit parameter passed, the this parameter (allowing the function to know to which instance it belongs to).
To overcome this problem, when you create your window (use CreateWindow), you can pass a pointer to user data. Pass the this parameter, so that the first time your static window procedure gets called, it will receive the instance of the class. Then, register this pointer with SetWindowLong (it will associate the instance pointer with the handle of the window):
if (Msg == WM_CREATE)<br />
SetWindowLong(hWnd, GWL_USERDATA,(long) ( (LPCREATESTRUCT(lParam))->lpCreateParams));
Then, after each call of your static procedure, you are able to retrieve the class instance and call a public non-static window procedure:
CMyClass* pClass = (CMyClass*)GetWindowLong(hWnd,GWL_USERDATA);
hWnd is the handle of the window passed as parameter to the procedure. Check the different functions in the doc for more details.
Hope this helps
|
|
|
|
|
Thanks,
This solves my problem. I might be using a "std::map<hwnd, cmyclass*="">" instead to find the class instance knowing the hwnd but the idea is the same. I mostly wanted to check that it's not a bad design have the same WindowProc for all my instances and therefore have to lookup the class instance everytime.
|
|
|
|
|
Tnarol wrote: I might be using a "std::map" instead
You'll have to make it static so that all instances share the same map than.
|
|
|
|
|
|
Hello !
I'm a student in a french engineering school (ECE) and we (me and some mates) are working on a project (a voice recognition lock).
We are actually looking for a source showing the use of Fast Fourier Transform.
We saw some very nice article about FFT in this site, but we need a real starting point, a simple program in C (something easy to compil, if possible )
With : an FFT algorithm
and : the frequency of the sound
As the project progress, we'd be happy to share with you our sources, and we'd be pleased to recieve answers and/or e-mails with anything that could help us.
Best regards,
|
|
|
|