|
CString test;
std::string test2 (test);
if you would like to have a program which works well with CStrings, std::strings and char arrays the best is that you pass all the var's as const char* (LPCSTR in windows if you prefer this).. all of them can be casted to a const char* (CString and char - array implicetly, the std::string with the c_str() member function)
if you need to change a string value in a function, use
* a char array (you can use this on any platform, including mfc)
* a std::string if you don't car bout the mfc..
i've heard that there should be some CString ports to other platforms.. but i don't know anything else bout this...
hope this helps a little bit otherwise ask a little bit more detailed..
bernhard
"I'm from the South Bronx, and I don't care what you say: those cows look dangerous." U.S. Secretary of State Colin Powell at George Bush's ranch in Texas
|
|
|
|
|
Thanks for the feedback.
I also committed the crime of posting a programming question in the Lounge.
|
|
|
|
|
This is what I actually need:-
1024 bit public key/private key encryption
It should run on Win 98, 2000, (and maybe even XP)
Are there any C++ libraries that offer this?
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Crypto++ has about anything you'd ever want about criptography, it's free and simple to use --we used it for a project and it works like a charm.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquín M López Muñoz wrote:
Crypto++ has about anything you'd ever want about criptography, it's free and simple to use --we used it for a project and it works like a charm.
Thanks Joaq. I hope it works in Win98. I am gonna chk it out anyway! Right now I am struggling with PGP SDK
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Managed to download an old SDK.
I find a lot of Key Ring management functions. But they all say that the keys are read and written from the user's keyring. Does this mean that to use te PGP functions, the target machine must actually have PGP installed? I thought if I just distributed some DLLs things would work fine
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Keyrings are simply files, one for public keys and another for private keys.
|
|
|
|
|
markkuk wrote:
Keyrings are simply files, one for public keys and another for private keys.
How do I tell PGP where to look for these files?
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Is it possible for an Application B to remove a systray icon installed by another application A. If so how?
Thanks
|
|
|
|
|
One option (the right thing to do) would be to kill application A and possibly force a refresh of the systray.
Another option would be to kill Explorer.exe if it doesn't manage to kill itself somehow. But then when it restarts you would of course have no app-specific tray images.
|
|
|
|
|
Hi!
I have developed an application that run fine in the windows 95/98.
But it does not work on the Windows 2000/XP.
Does somebody would be able to tell me that what i have to do with this application to run on both 95/98 and 2000/XP.
Any help would be greatly approcaiated.
|
|
|
|
|
Anonymous wrote:
I have developed an application that run fine in the windows 95/98.
But it does not work on the Windows 2000/XP.
Does somebody would be able to tell me that what i have to do with this application to run on both 95/98 and 2000/XP.
What part of it is not working?
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
1.may be you have not enough rights to run your app.
example: you called ExitWindows()function to shutdown windows. but this need rights to run on win 2k/xp....
2.you use some function that win2k doesn't permit to
use directly!
can you tell me the detail information of your app?
|
|
|
|
|
Could be many things. Some of the registry keys on NT have different names. You may not have a required DLL that is installed on 95/98. Memory is handled differently; you could be stepping on something. The more details you provide, the better the answer you're likely to get on the forum.
|
|
|
|
|
How do you create these XP error bubbles? and are those supported on Win2K and WinNT?
I am refering to these bubble-like messages that appear when an error occurs or when there is a window or msn update? it seems to be the new way of reporting things as opposed to Message boxes which users have to click on.
thanks
|
|
|
|
|
The standard way is to use the TTS_BALLOON style for a tooltip control. Check MSDN. The downside is it's a bit cumbersome, and only works on systems with IE5 or later installed.
There are several articles on CP describing custom implementations; of course i'm going to recommend my own: Balloon Help as a non-modal replacement for MessageBox(), but i link to several others within the article.
--------
A closed mouth gathers no foot. --Shog9 --
|
|
|
|
|
Hi.
What is the best way to update the background color of one or more static/edit control in a dialog box? For example, I have a static control in a dialog box that I use to depict font color. If the user sets the font to have green color, than the user will see a static control that is green. Initially, I use WM_CTLCOLOR to update the color of the static control. The problem is it only works when the dialog first initializes. Once it has been initialized, I cannot figure out how to update the static control after the user have selected a different color. I try PostMessage(WM_CTLCOLOR, 0, 0), however, the program crashes. It seems ON_WM_CTLCOLOR only works when the dialog is initialized.
Here is the code.
-----
HBRUSH CMyDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CPropertyPage::OnCtlColor(pDC, pWnd, nCtlColor);
if (pWnd->GetDlgCtrlID() == IDC_STATICCOLOR)
{
// m_pBrush is a pointer to a brush object I use containing the
// font color I the user wants
if (m_pBrush != NULL)
{
delete m_pBrush;
m_pBrush = NULL;
}
m_pBrush = new CBrush(m_Color);
hbr = static_cast<hbrush>(m_pBrush->GetSafeHandle());
}
-----
Please post if you have any idea on a possible solution.
Thanks,
Kuphryn
|
|
|
|
|
Have you tried invalidating the control in order to force a repaint. Better yet you could force a repaint of your entire dialog window with this:
RedrawWindow(hDlg, NULL, NULL, RDW_ERASE | RDW_INVALIDATE | RDW_ERASENOW | RDW_REDRAWNOW | RDW_ALLCHILDREN);
This will force your window and all of its children to redraw, which should generate WM_CTLCOLOR messages for each of the controls.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Thanks.
Your first pointer of invalidating was correct. The solution is to call Invalidate(). It repaints everything as designed.
I would have never thought of using Invalidate
(). I have always thought that it calls OnDraw() or
OnPaint().
Thanks to jimmy leung of MSDN Newsgroups for that solution too.
Kuphryn
|
|
|
|
|
How can I eliminate the "gangload area" from an EXE (FON) file I am creating?
Is there a flag that should be used with TLINK or MS LINK? Or is there an appropriate entry
that should be placed in the .DEF file?
EXEHDR.EXE reports that there is always a gangload area created starting at 0x200 of size 0x600.
This area substantially increases the file size to no avail.
gjr
|
|
|
|
|
the cfiledialog only can return a file path ,but i want rechive the directory path. how to do it? thanks.
|
|
|
|
|
SHBrowseForFolder
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
I want to parse the HTML page using MSHTML. before I can parse, so I use IPersistMoniker to load URL.
Then the problem arises, if the URL is not existed. IPersistMoniker still load it, and said it had completed. how can tell the loaded pages is for non-existed URL from correct URL ?
|
|
|
|
|
Have you looked at IsValidURL ?
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Hi there:
I have a compiled DLL created with C++. Is there a way to look inside to see what it's made off?
Thanks
A reasonable man adapts himself to the world. An unreasonable one persists, trying to adapt the world to himself. That is why all the progress in the world depends on the unreasonable men.
|
|
|
|