|
Please tell me how can i do this?
|
|
|
|
|
If you let us know exactly what you want to achieve I'm sure I or someone else could help you. Why is it important to treat it as one single char?
|
|
|
|
|
just bcoz of this enter the length of string change from the original string.
and encounter the problem in sent and received char count when i m using this string to send sms.
|
|
|
|
|
Ok, you will have to translate the text yourself, replacing \r\n with \n. If you use MFC or ATL CString::Replace()[^] will do just fine.
|
|
|
|
|
Hi!
I've to show a confirmation Message Box(with Yes and No Buttons), on closing a Modeless Dialog. How to do this?
|
|
|
|
|
Checkout this article[^] and AfxMessageBox() on MSDN.
The best things in life are not things.
|
|
|
|
|
If you are using MFC then add handlers for the OK and/or Cancel buttons (OnOK, OnCancel) and use AfxMessageBox to query the user, if the user wishes to close the dialog, call the super method, if not, then don't.
E.g:
void CMyDialog::OnCancel()
{
if (AfxMessageBox(_T("Are you completely and absolutely super-sure you wish to close this great dialog?", MB_YESNO | MB_ICONQUESTION) == IDYES) __super::OnCancel();
}
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> //TODO: Implement signature here<
|
|
|
|
|
Code-o-mat wrote: void CMyDialog::OnCancel()
{
if (AfxMessageBox(_T("Are you completely and absolutely super-sure you wish to close this great dialog?", MB_YESNO | MB_ICONQUESTION) == IDYES) __super::OnCancel();
}
This works well. But my Project Name is coming on the caption of the Message Box. How to customize this caption?
|
|
|
|
|
Use MessageBox[^] instead of AfxMessageBox:
void CMyDialog::OnCancel()
{
if (MessageBox(m_hWnd, _T("Are you completely and absolutely super-sure you wish to close this great dialog?"), _T("The Question"), MB_YESNO | MB_ICONQUESTION) == IDYES) __super::OnCancel();
}
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> //TODO: Implement signature here<
|
|
|
|
|
pix_programmer wrote: How to customize this caption?
Try reading the MSDN documentation.
The best things in life are not things.
|
|
|
|
|
Hello
in WM_CLOSE (win32) / OnCancel() (MFC) add your message box. and according to the result returned, you can add your code.
Regards,
A. Gopinath.
|
|
|
|
|
Hmm, am I the only one who considers it weird if an attempt to close a dialog results in opening a dialog?
Sorry, just had to add this
|
|
|
|
|
Hehe, no, but I just saw the irony of it
|
|
|
|
|
i am writing small utility that will save webpage in local disk to view offline.. pls help me
|
|
|
|
|
Internet Explorer and other browsers do provide this facility.
Can you show us what have you done so far and did you have a look at the web browser control?
You talk about Being HUMAN. I have it in my name
AnsHUMAN
|
|
|
|
|
yes web browser having that interface to store in local drive. But how can i achieve same using vc++?...i can save html document of the link but some photos and style sheet all won't come ...
|
|
|
|
|
If you are working under windows, check out WinINet[^].
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> //TODO: Implement signature here<
|
|
|
|
|
Hi!
I want to add the Icon through code in MFC. Is it possible? I've to read the Icon file name from an XML file,and add the file as an Icon from VC++ code. I don't want to go and right click the "Ico" folder and add the file. How to add an Icon from code?
|
|
|
|
|
Use the LoadImage API to load the icon from the file and then use CWnd::SetIcon to the loaded icon for the window.
|
|
|
|
|
Add it to what?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> //TODO: Implement signature here<
|
|
|
|
|
A rather relevant question I might add.
|
|
|
|
|
Thanks.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> //TODO: Implement signature here<
|
|
|
|
|
Hi,
how to get System CPU_TYPE through C++ code? any method is available?
Please share ur idea and url.
Regards,
M.Mathivanan
|
|
|
|
|
Just grab it from the registry. Also, you could be more fortunate with the results of your searching. This information has been posted many, many, many times before.
HKEY_LOCAL_MACHINE->HARDWARE->DESCRIPTION->System->CentralProcessor
|
|
|
|
|