|
zahid_ash wrote: my app is MFC dialoged based. would it recevied the arguments?Or should I build the console mode app to receive the arguments? but my preffered is Dialoged based?
try _ _ argv and _ _ argc. (Underscore are continuous, I have separated them to improve readability)
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
I am working with the serpent encryption algorithm for the first time, and I wish I could find a tutorial on programming with serpent. Also, I am not going out and buying a book on serpent for this current project. I think I am just missing something simple, but I am not sure what.
When I call the serpent encryption code:
Serpent::Encryption();
I get the following errors:
'Serpent' is not a class or a namespace name
'Encryption' identifier not found
Hopefully someone knows what I am doing wrong.
Thanks.
btw, I am programming in .net
|
|
|
|
|
It looks like you're not including the header file which contains Serpent's function declarations and class definitions.
Steve
|
|
|
|
|
using:
#include <Serpent.h>
which includes:
typedef Serpent::Encryption Serpentencryption<br />
typedef Serpend::Decryption Serpentdecryption
ps. Thanks for the help
|
|
|
|
|
I use movewindow to change tree width,when tree width is smaller than its item width,hscrollbar is still not visable.
What should i do to show scrool bar when tree width is smaller than its item.
|
|
|
|
|
Has it got the WS_HSCROLL and WS_VSCROLL styles set?
Steve
|
|
|
|
|
Yes. I use movewidow() changeing the size of tree. After that,How to judge whether show scrollbar according expanded nodes ?
How to get the widest item ? I want to use it to judge whether show scroll bar.
|
|
|
|
|
Hi, I'm a beginner in using threads. I have a dll which I have to pass in some parameters, which i will call at a pt of the application. But i would like to allow the user to be able to quit the application even in the midst of the dll operation. So i shld use a thread rite? but I am not sure how abt going it.
how am i going to use the AfxBeginThread??
|
|
|
|
|
This is a broad and complex issue.
Steve
|
|
|
|
|
I mean shld i use user-interface or worker thread?
or do u have any reference to recommend me?
|
|
|
|
|
|
Use the following definition format for the THread procedure
UINT Threadproc(LPVOID pparam){return 0;}
and call the thread as
AfxBeginThread(Threadproc,this);
Remember this is worker thread
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Telling someone how to start a thread without mentioning threading issues such as synchronisation is like giving a child a gun to play with. I don’t mean any disrespect to the person who asked the question by saying this; but writing multithreaded programs is hard and full of potential pitfalls that simply don’t exist in a single threaded application. For example, even something as simple as incrementing a counter is potentially dangerous in a multithreaded program.
Steve
|
|
|
|
|
See Here[^]maybe it is some helpful to you
whitesky
|
|
|
|
|
WhiteSky wrote: See Here[^]maybe it is some helpful to you
I agree with Mr Stephen [HERE][^] for same!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
KongHL wrote: how am i going to use the AfxBeginThread??
Like this:
<br />
AfxBeginThread(CRuntimeClass* pThreadClass,<br />
int nPriority, UINT nStackSize, DWORD dwCreateFlags,<br />
LPSECURITY_ATTRIBUTES lpSecurityAttrs)<br />
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
How do you specify file names to CFtpConnection::PutFile that have blank characters. Blanks are common to make file names readable now days, but the usual tricks like putting the sting in quotes does not allow it to work. Has anyone found a way to deal with this?
Thanks
Ray
|
|
|
|
|
Copy the file name into CString and then pass this Cstring variable to the function.
CFtpConnection::PutFile
Cheers
"Peace of mind through Technology"
|
|
|
|
|
Thanks for the input Gnaesh,
I am calling CFtpConnection::PutFile with two arguements, both are CString. When I have a file name without blank characters embedded, then it works fine, but if I have a blank, then I get the following error:
PutFile failed for "C:\C3ilex\EOScada\Displays\Sample Demo Display Index.DXF" with 12003, 200 Type set to I.
200 PORT command Successful.
550 Sample Demo Display Index.DXF: Access is denied.
The message is generated with the following call:
GetApp()->LogFtpError(_T("PutFile"), lpszPathName, error, true); (lpszPathNmae is the file name with path.
Any more thoughts?
Thanks
Ray
|
|
|
|
|
If you are assigning static path in PutFile as:
"C:\C3ilex\EOScada\Displays\Sample Demo Display Index.DXF" it won't work.
For that you have to give the string as :
"C:\\C3ilex\\EOScada\\Displays\\Sample Demo Display Index.DXF"
Cheers
"Peace of mind through Technology"
|
|
|
|
|
Thanks again, but are you saying that if I don't have blanks in the name, for example if I were to use:
C:\C3ilex\EOScada\Displays\Sample_Demo_Display_Index.DXF
you would expect it to work, but if I used:
C:\C3ilex\EOScada\Displays\Sample Demo Display Index.DXF
you would expect it to fail?
Thanks
Ray
|
|
|
|
|
Thanks for the help. I think I am out of the woods on this now!
Thanks
Ray
|
|
|
|
|
I'm trying to figure out how to do a few operations using functions and arrays: cardinality, union, intersection, difference, subsetOf, properSubsetOf, and elementOf. I'm using integer arrays but i have no clue how to get this started. any help would be great
pp944
|
|
|
|
|
Use STL. For example the following will calculate the intersection of two sets:
--------------------------
// Console.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <algorithm>
#include <iterator>
using namespace std;
int main(int argc, char* argv[])
{
int set1[] = {1, 2, 8, 3, 7, 11};
int *pSet1End = set1+(sizeof(set1)/sizeof(*set1));
int set2[] = {7, 9, 16, 2, 15, 8};
int *pSet2End = set2+(sizeof(set2)/sizeof(*set2));
// Must be sorted to use set operations.
sort(set1, pSet1End);
sort(set2, pSet2End);
// Calculate and output the intersection.
set_intersection(
set1, pSet1End, // The first set
set2, pSet2End, // The second set
ostream_iterator<int>(cout, "\n") // Where to put the results
);
return 0;
}
Steve
|
|
|
|
|
I have a problem in reading parallel port with Microsoft Visual C++ 6.0,
for reading or writing the parallel port I use small assembly code and it work correctly,then i defined a windows timer that its routine, called minimum every 1 mili second and in that i use readport function , i couldnt find any timer less than this amount,
so this is a problem for me because i want to read parallel port nearly every 20 Microseconds .
is this type of timer exist????
or get me some idea about using interrupt on this event.
thnx
|
|
|
|