|
Your post is confusing
jbem wrote: I use SHA1CryptoServiceProvider() which is managed code
There are no functions that are managed code. Perhaps you can post the code and link to the MSDN documentation[^] for what you are using. That way we can be clear what you are doing.
led mike
|
|
|
|
|
Never mind. I meant CLI integration with .net etc. In any event I ripped out the CRT requirement I imposed on myself by using MS's .net crypto services, in so doing nearly halfed my executable size and replaced the functionality with some native C++. In the end the problem wasn't what I thought. I tracked it down to one uninitialized variable. For whatever reason in the IDE it ran fine but outside it didn't. The wonders of random variable values..
|
|
|
|
|
Hi,
I am using CDateTimeCtrl to display current time, but do not want to display the seconds. How can I do that?
|
|
|
|
|
MPTP wrote: How can I do that?
By using the SetFormat() method.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Does this [^] help?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I used like
CString formatStr= _T("''hh':'mm'");
m_TimePicker.SetFormat(formatStr);
But am/pm is not coming.
|
|
|
|
|
MPTP wrote: But am/pm is not coming.
Because you've not specified such. Use a 't' for that.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Dear All,
I am experiencing a strange problem using CTreeCtrl. I have a dialog in which I have changed the background colour to black using OnCtlColor method.
After that, I have placed a CTreeCtrl and set the properties "HasLines", "HasButtons" and "LinesAtRoot" to true. When I run the program to show the dialog I got Debug Assertion error and when I debug it shows error on the DoDataExhange method and sometimes on the dlgdata.cpp.
But when I change the properties to false there is no debug assertion error. Also, if I didn't change the background using the OnCtlColor and set the properties "HasLines", "HasButtons" and "LinesAtRoot" to true it works fine.
I am very confused with this behaviour. I need background color black for the dialog and want the properties to set TRUE. Please help me to sort out this issue.
Many thanks in advance.
Code snippet for OnCtlColor
HBRUSH MuxInfo::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
UpdateData(TRUE);
if (pWnd->GetDlgCtrlID() )
{
if (m_bFirstTime == TRUE)
pDC->SetTextColor(RGB(0,0,0));
else
{
pDC->SetTextColor(RGB(GetRValue(m_crColor),GetGValue(m_crColor),
GetBValue(m_crColor)));
pDC->SetBkColor(RGB(255 - GetRValue(m_crColor),
255 - GetGValue(m_crColor), 255 - GetBValue(m_crColor)));
}
}
return m_brush;
return hbr;
}
|
|
|
|
|
you should put the conditions accordingly on nCtlColor
valid values are :
- CTLCOLOR_BTN Button control
- CTLCOLOR_DLG Dialog box
- CTLCOLOR_EDIT Edit control
- CTLCOLOR_LISTBOX List-box control
- CTLCOLOR_MSGBOX Message box
- CTLCOLOR_SCROLLBAR Scroll-bar control
- CTLCOLOR_STATIC Static control
use CTreeCtrl member function SetBkColor(..) to set the background color of tree control.
[added]
one more correction after the conditions return CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
for default case which you don't wish to handle.
bhanu_8509 wrote: return m_brush; // Paint the dialog black!!
// TODO: Return a different brush if the default is not desired
return hbr;
consecutive returns does not make any sense.
[/added]
Regards,
Sandip.
|
|
|
|
|
I want to get hash values from two string. I am using the following code snippet for that purpose
locale loc("English_US");
LONG lValue1 = use_facet< collate<_TCHAR> >(loc).hash(&lpszString1, &lpszString1[_tcslen(lpszString1) - 1]);
LONG lValue2 = use_facet< collate<_TCHAR> >(loc).hash(&lpszString2, &lpszString2[_tcslen(lpszString2) - 1]);
This is working fine. But in a few XP system this piece of code is getting hanged. Do you have any clue what could be the possible reason.
Thanks.
modified on Tuesday, September 23, 2008 8:35 AM
|
|
|
|
|
Hello,
i looking for a multicolumn combo box(something like in VBA), is there any known article for this??
Thanks in advance!
termal
|
|
|
|
|
|
Hi,
thanks for help!
regards
termal
|
|
|
|
|
I'm trying to use RasDial to connect through a modem to a network
my code:
RASDIALPARAMS rdParams;
rdParams.dwSize = sizeof(RASDIALPARAMS);
rdParams.szEntryName[0] = '\0';
lstrcpy(rdParams.szPhoneNumber, strPhoneNr);
rdParams.szCallbackNumber[0] = '\0';
lstrcpy( rdParams.szUserName, strUserNr);
lstrcpy( rdParams.szPassword, strPassword);
rdParams.szDomain[0] = '\0';
HRASCONN hRasConn = NULL;
dwRet = RasDial( NULL, NULL, &rdParams, NULL, NULL, &hRasConn );
The RasDial call results in a XP bluescreen. Anybody ever got this error? What should i check for?
Thanks
|
|
|
|
|
eusto wrote: The RasDial call results in a XP bluescreen.
Does this mean that RasDial() is not returning?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Yes, it is not returning. My whole computer dies.
The fix for me is to use the phone book feature of windows:
RASDIALPARAMS rdParams;
rdParams.dwSize = sizeof(RASDIALPARAMS);
lstrcpy(rdParams.szEntryName,strPredefinedConnectionName);
rdParams.szPhoneNumber[0] = 0;
rdParams.szPhoneNumber[0] = 0;
rdParams.szUserName[0] = 0;
rdParams.szPassword[0] = 0;
rdParams.szCallbackNumber[0] = '\0';
rdParams.szDomain[0] = '\0';
HRASCONN hRasConn = NULL;
dwRet = RasDial( NULL,
"C:\\Documents and Settings\\"
"All Users\\Application Data\\"
"Microsoft\\Network\\Connections\\Pbk\\rasphone.pbk",
&rdParams,
NULL,
NULL,
&hRasConn
);
It's a bit frustrating that i can't use this to work with "on the fly" dialup connections. The windows blue screen really scares me
|
|
|
|
|
So the only difference is the second argument? MSDN states that if this parameter is NULL , the function uses the current default phone-book file. The default phone-book file is the one selected by the user in the User Preferences property sheet of the Dial-Up Networking dialog box. Do you have this set up?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
The difference is in the way i specify the connection to use. I'm telling RasDial to use the strPredefinedConnectionName (ex: a connection named MyDialup that appears in network connections) from the specified phone book.
I've read that in MSDN also but i couldn't find the dialog for this setting. Do you think that the blue screen error is caused by the fact that my default user does not have a phonebook configured?
|
|
|
|
|
eusto wrote: Do you think that the blue screen error is caused by the fact that my default user does not have a phonebook configured?
I would hope not. The BSOD is when Windows has gotten really angry and something totally unexpected has happened in some code. Telling Windows to use a file that does not exist should simply result in a normal "error" message box (i.e., failing gracefully).
I'm sorry I do not have any better suggestions.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Thanks man. I'll try to read further on this matter and i'll post my answer here
|
|
|
|
|
Hi,
I have a static text which is being initialized during runtime.
I want to change the font size of the static text.
Please tell how to do it.
Thanks & Regards.
Dhiraj Kumar Saini
|
|
|
|
|
with SetFont(), if it doesnt work make CStatic derived class to draww yourself as wanted.
Greetings from Germany
|
|
|
|
|
Hi all,
I am working on vc2008 and when i run its exe on any other machine it gives side by side configration error. I have tried both release and debug mode.
thanks in advance
|
|
|
|
|
missing redistributable libs ?
|
|
|
|
|