|
Use the Copy member function of CObArray:
CStringArray info;
info.Copy(m_Proc.Getinfo(m_arrFileName, m_arrPassword);
Getinfo must return a CStringArray.
Try it.
-Dominik
|
|
|
|
|
Thank you for your answer Dominik.
I want to ask you another question that I write Getinfo function to return CStringArray.
CStringArray CCrypt::Getinfo(const CStringArray& fileName, const CStringArray& password) <br />
{<br />
CStringArray privkeyinfo;<br />
..<br />
..<br />
..<br />
return privkeyinfo;<br />
}
But when I compile there are error message show
error C2558: class 'CStringArray' : no copy constructor available
Do you know how to solve my problem?
|
|
|
|
|
The code you posted should work... are you sure that the error comes from this part?
|
|
|
|
|
You're getting this error because CStringArray doesn't support copy constructing and thus cannot be used as a return value. I would change the function so it takes the return value as a reference parameter instead:
<br />
void CCrypt::Getinfo(<br />
const CStringArray& fileName, <br />
const CStringArray& password,<br />
CStringArray& r_privKeyInfo )<br />
{<br />
}<br />
Then call it like this:
<br />
CStringArray arrPrivKeyInfo;<br />
m_Proc.Getinfo(m_arrFileName, m_arrPassword, arrPrivKeyInfo );<br />
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
Forgive my ignorance for what has probably a simple answer...
I'm using the GetLocalTime API to print current system date:
SYSTEMTIME st;
::GetLocalTime (&st);
sprintf (m_date, "%02d/%02d/%2d",st.wMonth,st.wDay,st.wYear);
m_doc->nParseTime [url_info.URL_Index] = GetTickCount ();
Presently the date prints as "11/02/2002" How would I change to have date displayed as "11/02/02"?
Thanks Much Everyone
|
|
|
|
|
Simply do the following:
m_date[6] = m_date[8];
m_date[7] = m_date[9];
m_date[8] = 0;
This would change 11/02/2002 to 11/02/02.
OR
You use a specialized time formating function like this
size_t strftime( char *strDest, size_t maxsize, const char *format, const struct tm *timeptr );
-Dominik
|
|
|
|
|
I was wondering if it is possible to add an menu item to the right-click popup menu in VC6.
I've taken a brief look at the WinTabs add-in (not it's code - the application itself), and it doesnt appear to put anything into the popup menu of the vc6 editor, the same goes for WorkspaceWhiz 2.12.
If there's a way - I'd love to have *any* information of ideas about how I could extend the popup.
Thanks!
--
John Clayton
|
|
|
|
|
hi
i am writing my own dialogbox for printsetup. i have the problem to set "dmFields" member in the DEVMODE structure for orientation and copies.how can i assign my values to these memebers. please help me. if i give
pDevMode->dmFields=DM_ORIENTATION
pDevMode->dmFields=m_orientation.(m_orientation contains either 1 or 0);
but it's not setting with my value
please give help
thank you
|
|
|
|
|
Hi
Usually if you set a breakpoint in your program and hit F5, the program ist being started and debugged, so that you can watch variables, return values etc. Until yesterday I always had a small floating window (toolbar) in debug mode, where I could jump to the next function, to the end of the function and so on. But I accidently hit the [x]-button on that window, so that it disappeared. How do I make it visible again? I use VC6.
I know this question is stupid, but I didn't find a menu entry for reactivating it yet
thanks in advance
modified 12-Sep-18 21:01pm.
|
|
|
|
|
ehhhhhh, not too sure what you mean but you could try in the View->Debug menu or you could try using the Step In, Step Out and Step Over F9,F10,F11 keys. It sounds like thats what you're trying to do at least.
|
|
|
|
|
It seemed you closed debug window. you can make it show again as follow:
1. click Tools/Customize...
2. Select Toolbars tab
3. check debug in Toolbars, it will show immediatly
good luck!
|
|
|
|
|
You are my hero of the day, thanks!
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I have an application that uses a custom image format.
What I am trying to do is make it possible to switch to
'thumbnails' in an explorer window, and have it show the thumbnails,
or when selected show it as a preview in the left pane (just like JPG's
and GIF's do already). How do I go about doing this? Just register the file type? or do I need to fiddle with the .net system.drawing.image encoder class?
Thanks!
|
|
|
|
|
Forgot to Add: I REALLY want this custom fileformat to be openable by
the 'windows picture and fax viewer' as well.
|
|
|
|
|
|
the code is simple:
vector<int> ivec;
int ival;
while (cin >> ival)
ivec.push_back( ival );
when i run this program, provide input, say, 1 2 3 4 5 6,then, what key should i use to end input?
Thanks for your time!
|
|
|
|
|
You would have to define an exit code, for example 9999 which must be entered to exit. The code would look like:
vector ivec;
int ival;
cout << "Enter 9999 to break.";
while(cin >> ival)
{
if(ival == 9999) break;
ivec.push_back(ival);
}
The Control-C combination always works, but it breaks your complete program, so the code above is much better.
-Dominik
|
|
|
|
|
Homework's a bitch, isn't it?
Software Zen: delete this;
|
|
|
|
|
I am new TCP IP Programming
I have captured the IP Packets and HEADER information
But i unable to see data Part of packet can any one tell me how an see
data part of packet or where i can read about it
|
|
|
|
|
Try searching the MSDN for "Windows Sockets".
Software Zen: delete this;
|
|
|
|
|
hello all
I have just purchased the Vc++ .net standard edition.
well, if i create a new project with the wizard i can easily change the 'use MFC as a shared DLL' option to 'use static MFC linking' and quickly rebuild my application in order to get one self-contained EXE.
On the other hand, when i load some VC++ samples (the ones supplied with the product ie: commoncontrols sample etc.) they have set the 'use MCF as a shared DLL' option on as a default, so i can build them and get the EXE needing the MFCxx.dll at runtime to work fine.
Now, if in these sample projects I switch the 'use MFC statically linking' option, even if that is correctly displayed in the project settings property page (General page), the resulting built executable still actually shows its dependencies on the MFC DLL (I can see them both using the 'dependency walker' and directly from the EXE size which is smaller than the statically linked one).
I noticed that under the c/c++ preprocessor property page all of these sample projects have always the _AFXDLL flag enabled: but if i cut it (as the wizard generated projects dont' have that flag enabled) the output windows warns that i have to use the /MD option (instead of the /MT one used by the wizard projects). So I use /MD and the project is built and I can launch it, but i wonder if this is really OK, as, as i said, the wizard projects actually use /MT (besides not having the _AFXDLL flag on).
Any info/tips about the above will be greatly appreciated, as i'd like to statically link the sample projects
thanks in adavance
|
|
|
|
|
Mondrianx wrote:
So I use /MD and the project is built and I can launch it, but i wonder if this is really OK
That's ok. _AFXDLL works in conjunction with /MD (/MDd in debug).
_AFXDLL is to tell you don't statically link with MFCxx.lib, thus MFCxx.dll will be automatically loaded at run-time. But that's not enough since the C run-time (msvcrt) needs to be configured as well, hence the /MD compiler switch.
That's what is usually done when you switch from "use mfc as shared dll" to "use static mfc linking". I guess if it doesn't do exactly that, that's because you've a limited version : there's one product called VC++.NET but there are several license limitations[^]. From what I remember, one of the licenses is just for learning, not for actual app building and ditributions, hence what you see. The fact is, while a given limited edition may not allow you to do several things using the GUI, it is already known that you most of the time can managed to do them anyway using cmdline options, such like what you did!
How low can you go ? (MS rant)
|
|
|
|
|
Hello all!
I have a little problem in my project (VC++ 6.0).
I want to show user a dialog box with question "exit app or not" when he tries to close application.
Where shoult I write a handle to this event?
Thank you!
Dmitry Timin
|
|
|
|
|
I believe you can do this by overriding the default OnClose() method (WM_CLOSE message)in the main frame window of your application. Then call the CFrameWnd::OnClose () method if the user clicks "OK".
- Anatari
|
|
|
|
|
how will you differ if user clicked exit or the computer is going shutdown? a message box would than be totaly anoying.
|
|
|
|