|
OK, I accept the title is really a good way to receive the pat and response "Oh, isn't that sweet". Sorry, I was referring to the libraries.
I only intended to recieve an answer such as: If you want to speed the "code A" using C++ standard libraries (not C and not MFC) use option1, option2, ...etc.
Actually, I need a very fast reading/writing process because I manage big files and I do not only read files, I make other complex memory manipulations for every line I read.
According to your answer, it means that the only solution is to use MFC, because I could demonstrate it is faster than C++ standard libraries. I do not feel happy because my intention to use standard C++ libraries for manipulating files (GUI is not important) will be deferred. May be, in a LINUX or UNIX environment it works faster but, in my work, we use Windows platform.
Thank you for your comments.
|
|
|
|
|
How to convert char * to LPWSTR for func. NetWkstaUserEnum??
|
|
|
|
|
Try MultiByteToWideChar function
regards
|
|
|
|
|
If you have ATL installed, take a look at AtlA2WHelper.
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
If you're using MFC, you can use CString to do it, just call AllocSysString.
Either way, you can cast to _bstr_t in order to do this conversion. Just #include <comdef.h>
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
search for "String Conversion Macros" in MSDN
or locate in Visual C++/Reference/ATL/Reference
|
|
|
|
|
Hello,
I want to Know the Events that called, when i press the Close button from the Print Preview Button......
As if user presses both Print and Close button from the Print Preview window toolbar. the event that is called named
OnEndPrintPreview
and
OnEndPrinting
Actuallyu i want to differentiate both Events....
Thanks in Advance...
|
|
|
|
|
Hi,
I am facing a problem in Printing. That I have to make the pages of the data that i want to display in the form of the CStringList. Now when the Actual Printing Functions is called I check this by Using afxMessagebox that do textout the exactly string that i want to display and one more intertersting thing is that the print preview data is also diplaying but on the printer when I gave the print command neither from Print preview data is comming out on the printer page nor from Print method.
Can Any one help me...
|
|
|
|
|
I use the following statement to show the property of a file. But it does not work.
ShellExecute(AfxGetApp()->GetMainWnd()->m_hWnd,"properties","c:\\autoexec.bat",NULL,NULL,SW_SHOWDEFAULT);
How to resolve the trouble?
Thanks.
Maer
|
|
|
|
|
Try using ShellExecuteEx.
I didn't see properties listed for ShellExecute, but I did see it listed for ShellExecuteEx.
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
Thanks again.
Can you give me a simple example to show how to invoke the "property" message box?
Best regards.
Maer
|
|
|
|
|
Try
ShellExecute(AfxGetMainWnd()->GetSafeHwnd(),"properties","c:\\autoexec.bat",NULL,NULL,SW_SHOWNORMAL);
|
|
|
|
|
Thank again.
I have tried your method, but it has no effect.
(I am using Win Me.)
Can you help?
Maer
|
|
|
|
|
Sirs,
I wanna download files from a given url and save them to disc by means of an MFC app.
Thanks to this great site the technical part is extremely easy.
However, before downloading it must be figured out which files are of interest.
One way is to check the first file for links and go after them. The other is to download all existing files from a given location, e.g. download all files from www.codeproject.com/internet/
Are there any tricks to figure out number and url of files of a given location?
Thanks for your help in advance.
Bunburry
A subject that is beautiful in itself gives no suggestion to the Artist. It lacks imperfection. (O.Wilde)
|
|
|
|
|
Even though I use MSLU, I have a special need for a FormatMessageW wrapper routine that will convent the parameter list from UNICODE to ASNI to allow FormatMessageA to be invoked.
Has anybody see this out there?
It wouldn't be that hard to write, but why reinvent the wheel.
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
I am looking to create a sticky notes program for personal use. I am wondering if anyone has any leads or starts on how I can custom dialogs, kind of like Outlook Notes..... Anything would be great. Thank you.
|
|
|
|
|
Hey guys
I was wondering if anyone new how to add an extra menu on to the right click menu. What i mean is when you right click and put your cursor on the send to text it pops up another message well does anyone know how to do your own ones.
Cheers
Peter
|
|
|
|
|
Not sure if this is what you are asking for.
You want to add your own "Sent To" items for the file explorer?
To do that, just add normal shortcuts to the users profile directory tree in the "SentTo" folder. One of the SH folder routines should help you get the actual directory name for the current and all users.
On my system, the directory is:
"C:\Documents And Settings\Tim Smith\SendTo"
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
In your handler for the right click use TrackPopupMenu.
Below is a piece of code I pinched from one of my applications. You will probably have to play with the value of pt which will determine the position of the to top left of the menu.
CPoint pt;
GetCursorPos(&pt);
CMenu* pM = new CMenu;
pM->CreatePopupMenu();
CString str;
str.LoadString(IDS_EDITIMAGE);
pM->AppendMenu(MF_STRING, IDM_EDITIMAGE, (LPCTSTR)str);
str.LoadString(IDS_DELETE);
pM->AppendMenu(MF_STRING, IDM_DELETE, (LPCTSTR)str);
str.LoadString(IDS_PRINTIMAGE);
pM->AppendMenu(MF_STRING, IDM_PRINTIMAGE, (LPCTSTR)str);
if(GetDocument()->IsMailAvailable())
{
pM->AppendMenu(MF_SEPARATOR);
str.LoadString(IDS_SENDPICTURE);
pM->AppendMenu(MF_STRING, IDM_SENDPICTURE, (LPCTSTR)str);
}
pM->AppendMenu(MF_SEPARATOR);
UINT nID = IsThereExtraFileType( hItem, IDB_NOTES ) ? IDS_EDITNOTES : IDS_ADDNOTES;
str.LoadString( nID );
pM->AppendMenu(MF_STRING, IDM_ADDNOTES, (LPCTSTR)str);
nID = IsThereExtraFileType( hItem, IDB_VOICE ) ? IDS_REPLACEVOICE : IDS_ADDVOICE;
str.LoadString( nID );
pM->AppendMenu(MF_STRING, IDM_ADDVOICE, (LPCTSTR)str);
// if( IsThereExtraFileType( hItem, IDB_VOICE ))
// {
// str.LoadString( IDS_PLAYVOICE );
// pM->AppendMenu(MF_STRING, IDM_PLAYVOICE, (LPCTSTR)str);
// }
pM->AppendMenu(MF_SEPARATOR);
str.LoadString(IDS_PROPERTIES);
pM->AppendMenu(MF_STRING, IDM_PROPERTIES, (LPCTSTR)str);
pM->TrackPopupMenu( TPM_LEFTALIGN|TPM_LEFTBUTTON, pt.x, pt.y, this );
pM->DestroyMenu();
delete pM;
Happy programming!!
|
|
|
|
|
Excuse me that I post question in this forum, but I didn't find an answer for it.
Does anybody know how to connect two PCs with Window 200 via cros-over cable.
10x,
|
|
|
|
|
Hi,
I do know, you need the following:
HW
1. Eithernet card on the two PCs
2. Cross Cable ( make sure that what you have is a cross cable)
SW
1. Create a new LAN Connection on the first PC, and give it a dummy IP address, for example 10.10.0.1.
2. Create a new LAN Connection on the second PC, and give it a dummy IP address, this time you have to use the same presvious IP except the last number, for example 10.10.0.2.
3. Add the same user name and password on both PCs.
4. Share a folder on the PC that you want to access.
Note: You have to restart both PCs after you change the IP addresses, and make sure that you don't login to any domain, you just login to the Local Machine.
Enjoy ,
ShadiK.
Shadi Al-Kahwaji
|
|
|
|
|
Hi there!
I know that this could be done with the DialogBox(...) macro and the DialogBoxParam(...) function. However, does anybody know a solution to make windows created via CreateWindow[Ex](...) modal?
Thanks in advance ...
---------------------------------------------------
- Pipe -
|
|
|
|
|
I believe DoModal is a spinlock internaly, ugly though that may be.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Why do you need 'modality'? Do you want to bypass the main message loop or your goal is just to disable one window when other is active?
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
the second one ...
I have an application that at a certain moment could consist of dozens of windows that allow the user to manipulate many things at once. The Dialog is to choose a folder from the local drives to extract some items to. While the user chooses I want all those other windows to be inaccesible. Since the application supports DLL's that are not neccessarily mine I'm not alwas able to say how many windows are to be disabled. Thats why I need a thread-modal Extract-To dialog ... Do you know any workarounds or good solutions to this?
many thanks for incoming advice ...
---------------------------------------------------
- Pipe -
|
|
|
|