|
Hello people,
I was wandering if you could give me some advice which collection to use.
In my MFC application I'm reading a CSV file, but I don't know how many columns a row has got. I would also like to store different datatypes in my collection.
In C# I realised this with a 2 dimensional Arraylist, but I don't think there is an MFC equivalent, is there?
Regards,
Paul
I would like to have a funny signature
|
|
|
|
|
|
You're asking me?
I can try.
|
|
|
|
|
I think it was presented as a confirmation rather than an outright question. Sort of like asking "How about a list of lists?"
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hai ...everybody can any body help me for socket programming using multithread.
shan
|
|
|
|
|
<title>
this is a simple html file. must be specified a file url.so the file must be found at local drive or a remote url.
my question is that if I load an image file into memory,how can I show the html correctly in the browser with the image src loaded from momeory?
Thank you all very much.
Thank you all very much.
Thank you all very much.
Thank you all very much.
|
|
|
|
|
if you are generating the html and giving it to the browser, one suggestion is that you write the image to a file and put it in the src attribute.
What is that ?
-prakash
|
|
|
|
|
Do you have to display the bitmap in a browser? Or are you using an embedded web browser control?
If it's the latter, consider using Eugene Pustovoyt's excellent CPPHtmlStatic[^] control instead and use the <bmp handle=""> tag to display your bitmap.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Thank you.
But I mean this is a html file. must be specified a file url.
Actually, the file must be found at local drive or a remote url.
but now,
my question is that if I already have the img file loaded in memory,
how can I show the html correctly in the browser(microsoft webbrowser control) which load the image directly from memory not the file on local drive?
|
|
|
|
|
Anyone plz help me out with how to decrypt a string in vc++ urgently?
|
|
|
|
|
|
hai Alok Sir
actually if i enter into the text box a string like 'a' and press the encrypt button..
the output i get is 113.
so if i enter 113 for decryption i should get back the result as 'a' itself...
if i give something like 'asd' as string for encryption..
i am not getting it back while decrypting.
Neha
|
|
|
|
|
Some things:
1: What encryption algorithm do you use?
2: Are you entering all the values / strings in one edit box?
3: Smells like homework!
4: If you do enter all the values / strings in one edit box, the algorithm will never work unless you restrict to alphabetical characters and no numerical characters.
I also got the blogging virus..[^]
|
|
|
|
|
Hallo Bob
I am using the RSA Algorithm...
i want to encrypt and decrypt the alphabetical characters and numerical characters to and from the database.
Regards,
Neha
|
|
|
|
|
Hello,
As I recall from my Encryption classes at school, you need 2 numbers:
1: Prime number 1 (q)
2: Prime number 2 (p)(different than q)
With these numbers you have to do some magic and voila public key encryption and decryption...
The algorithm can be found here[^]
With this information, you have to implement you own encryption and decryption functions. Hope this helps.
I also got the blogging virus..[^]
|
|
|
|
|
|
hai Alok
I am using the RSA Algorithm...
i want to encrypt and decrypt the alphabetical characters and numerical characters to and from the database.
Regards,
Neha
|
|
|
|
|
|
Hai Alok,
Actually I got an RSA pgm from the internet for encrypting and decrypting into a file.But what actually i need is to encrypt and decrypt to and from the Access database.
Regards,
Neha
|
|
|
|
|
Simple Logic:-
Retriving Text
Get data from Access--> Apply Decryption --> show Text
Saving Text
Text->Apply encryption ->save data.
Now tell me at which point you facing problem!!!! and what
[Vote One Here, Complete my Survey....]
Alok Gupta visit me at http://www.thisisalok.tk
"I Think Believe this Will Help"
|
|
|
|
|
Alok,
I am not getting the decrypted part.
|
|
|
|
|
|
Alok,
I am not getting the decrypted one while retrieving from the database...
Regards,
neha
|
|
|
|
|
Hi,
I created a macro to extract all text along with the speakernotes to a textfile. When I run this macro from visual basic it processed the (very large) powerpoint presentation in 5 sec.
Now I programmed exactly the same thing in Visual C++ but it takes 40 seconds to process the same file
Detail: I am not running my program in debug mode so that doesn't slow the process down
Anyone who has an explanation for this ??
The macro in VB and my code in C++ is attached to the post.
Note that I use Disphelper to communicate with the COM objects
Macro to extract all text and speakernotes in Visual Basic
----------------------------------------------------------
Sub ExportText()
Dim oPres As Presentation
Dim oSlides As Slides
Dim oSld As Slide 'Slide Object
Dim oShp As Shape 'Shape Object
Dim oShp2 As Shape 'Shape Object
Dim NotesText As String
Dim iFile As Integer 'File handle for output
iFile = FreeFile 'Get a free file number
Dim PathSep As String
Dim FileNum As Integer
PathSep = "\"
Set oPres = ActivePresentation
Set oSlides = oPres.Slides
FileNum = FreeFile
'Open output file
' NOTE: errors here if file hasn't been saved
Open oPres.Path & PathSep & "AllText.TXT" For Output As FileNum
For Each oSld In oSlides 'Loop thru each slide
For Each oShp In oSld.Shapes 'Loop thru each shape on slide
'Check to see if shape has a text frame and text
If oShp.HasTextFrame And oShp.TextFrame.HasText Then
Print #iFile, oShp.TextFrame.TextRange
End If ' Has text frame/Has text
Next oShp
For Each oShp2 In oSld.NotesPage.Shapes
If oShp2.HasTextFrame And oShp2.TextFrame.HasText Then
Print #iFile, oShp2.TextFrame.TextRange
End If ' Has text frame/Has text
Next oShp2
Next oSld
'Close output file
Close #iFile
End Sub
Same thing programmed in C++
-----------------------------
void Converter::convertPPT(const string &s1, const string &s2)
{
CDhInitialize init;
CDispPtr ppApp, ppPres, ppSlides, ppSlide, ppShape1, ppShape2;
dhToggleExceptions(TRUE);
//dhToggleExceptions(FALSE);
try
{
const char * inpath = s1.c_str();
const char * outpath = s2.c_str();
dhCheck( dhCreateObject(L"PowerPoint.Application", NULL, &ppApp) );
dhPutValue(ppApp, L".Assistant.On = %b", FALSE);
dhGetValue(L"%o", &ppPres, ppApp, L".Presentations.Open(%s,%d,%d,%d)", inpath,0,0,0);
remove(outpath);
ofstream outfile(outpath, ios::app);
const char * text = "";
bool one, two;
FOR_EACH(ppSlide, ppPres, L".Slides")
{
FOR_EACH(ppShape1, ppSlide, L".Shapes")
{
dhGetValue(L"%b", &one, ppShape1, L".HasTextFrame");
if (one)
{
dhGetValue(L"%b", &two, ppShape1, L".TextFrame.HasText");
if (two)
{
dhGetValue(L"%T", &text, ppShape1, L".TextFrame.TextRange");
outfile << text << endl;
}
}
} NEXT(ppShape1);
FOR_EACH(ppShape2, ppSlide, L".NotesPage.Shapes")
{
dhGetValue(L"%b", &one, ppShape2, L".HasTextFrame");
if (one)
{
dhGetValue(L"%b", &two, ppShape2, L".TextFrame.HasText");
if (two)
{
dhGetValue(L"%T", &text, ppShape2, L".TextFrame.TextRange");
outfile << text << endl;
}
}
} NEXT(ppShape2);
} NEXT (ppSlide);
outfile.close();
}
catch (string errstr)
{ cerr << "Fatal error details:" << endl << errstr << endl; }
dhCallMethod(ppApp, L".Quit");
}
|
|
|
|
|
hello
can someone please tell me what is wrong with this function I wrote:
<br />
<br />
BOOL scan(char *url2search4)<br />
<br />
{<br />
MessageBox(0,url2search4,"a",MB_OK);<br />
<br />
INTERNET_CACHE_ENTRY_INFO icei;<br />
<br />
HANDLE the_cache_handle;<br />
<br />
unsigned long buffer_size=10324;<br />
<br />
the_cache_handle =FindFirstUrlCacheEntry(NULL,&icei,&buffer_size);<br />
<br />
if(the_cache_handle==NULL)<br />
{<br />
DisplayError(GetLastError());<br />
return FALSE;<br />
}<br />
<br />
<br />
while(FindNextUrlCacheEntry(the_cache_handle,&icei,&buffer_size))<br />
<br />
{<br />
MessageBox(0,icei.lpszSourceUrlName,"uite ce am gasit",MB_OK);<br />
<br />
if(strstr(icei.lpszSourceUrlName,url2search4)==0)<br />
{<br />
<br />
MessageBox(0,"egal","equal",MB_OK);<br />
return TRUE;<br />
}<br />
<br />
}<br />
<br />
return FALSE;<br />
}<br />
<br />
everything builds ok and runs but I never get to actually find a url even thought when I go to
C:\Documents and Settings\[MyUserName].000\Local Settings\Temporary Internet Files
I can see it there
Similar functions from Wininet.h work, like DeleteUrlCacheEntry
No matter what I do the_cache_handle is always NULL and the GetLastError fucntion returns "this parrameter is incorect"
here is the Display Error Function also if you think this might help
<br />
<br />
void DisplayError(DWORD dwError ) <br />
{<br />
<br />
LPTSTR lpBuffer = NULL;<br />
<br />
FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, dwError,<br />
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &lpBuffer, 0, NULL );<br />
if(dwError!=0) MessageBox(GetActiveWindow(), lpBuffer, "Error", MB_OK|MB_ICONERROR);<br />
LocalFree( lpBuffer );<br />
<br />
<br />
}<br />
Please help
thank you in advance
|
|
|
|
|