|
How to change back ground color of a toolbar?
I created a class derived from CToolbar and added q function for WM_CTLCOLOR message, but it didn't work!
|
|
|
|
|
What about drawing the background yourself in response to WM_ERASEBKGND?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi all,
I'm trying to establish a remote connection using SQLConnect(). I have also set the SQL_ATTR_CONNECTION_TIMEOUT attribute using SQLSetConnectAttr() function. There seems to be no effect on that statement. If there is no connection, the SQLConnect() is not getting timedout, it keeps on waiting until the connection gets established back.
I'm using VC++ 6.0 with ODBC 3.x
Could anyone help on this issue?
thanks in advance,
Rajesh
|
|
|
|
|
Platform SDK 2003 february has a sample codeat SQLConnect() function, take a look at that!
|
|
|
|
|
I want to change a perticular row color at some event.
so i used
OnCustomdrawMyList(NMHDR *pNMHDR,LRESULT *pResult)
in its definition i wrote
else if ( CDDS_ITEMPREPAINT == pLVCD->nmcd.dwDrawStage )
{
COLORREF crText;
if((pLVCD->nmcd.dwItemSpec % 3) == 0)
{
switch(app->RowColor)
{
case COLRED:
crText = RGB(200,0,0);
break;
case COLGREEN:
crText = RGB(0,170,0);
break;
case COLORANGE:
crText = RGB(255,128,66);
default:
crText = RGB(200,0,0);
}
pLVCD->clrText = crText;
*pResult = CDRF_DODEFAULT;
}
}
it works fine it the total number of rows are 3. If there are more than 3 rows, and if i am executing the code ( my expectation from this code is to change the color of the first row.) 0th row,4th row,8th row... are being changed their colors.
Why is it happening like that. Is there any solution for this?
KIRAN PINJARLA
|
|
|
|
|
kiran.pinjarla wrote: Why is it happening like that. Is there any solution for this?
Hint: Have you investigated the if((pLVCD->nmcd.dwItemSpec % 3) == 0) statement?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
i found my silly mistake.
if((pLVCD->nmcd.dwItemSpec % 3) == 0) should be
if((pLVCD->nmcd.dwItemSpec) == 0)
Thank you.
KIRAN PINJARLA
|
|
|
|
|
Hi,
Can I enable/disable all controls in a group box with a single call (method/API), or I need to call separate enable disable method for each control.
Best Regards,
Mushq
Mushtaque Ahmed Nizamani
Software Engineer
Ultimus Pakistan
"English is my second language; please excuse any grammatical or spelling mistakes"
|
|
|
|
|
You will have to do it separately for each control.
"a child will grow up to become an adult, but you can never stop the adult from acting like a child"
|
|
|
|
|
there's a class around here that overloads the enabling/disabling event, which searches every CWnd object which is located within the groupbox, and then enables/disables them...
search codeproject articles...
|
|
|
|
|
See here.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hello,
i have an existing and running DOS-Application, which i added to another (MFC) Project
Now i have some String-Casting problems
like: can't convert CHAR*[] to char*[] or char[1024] to LPWSTR
If i built the DOS-Applic alone, it works, if i built the MFC-Applic within the DOS-Applic
i get these errors
Is there a special feature to make a "automatic casting" ?
Big thanks for help
|
|
|
|
|
Change your application from unicode to multibyte . you can do it from the project settings. Hopes it works
If u can Dream... U can do it
|
|
|
|
|
you say you cannot convert from one to another type.
how are you accomplishing so ?
|
|
|
|
|
It was indeed the Unicode to MultiByte property
At the DOS-Project it's set to Multibyte and at the MFC-Project as default to Unicode.
Nevertheless thanks for your help guys
|
|
|
|
|
Try
void func( LPSTR lpsz )
{
USES_CONVERSION;
...
LPWSTR x = A2W(lpsz)
// Do something with x
...
}
(From MSDN)
- NS -
|
|
|
|
|
sprintf(dest,(LPCTSTR)CString_variable);
see the format of sprintf.
hope it works for you.
|
|
|
|
|
A lot of results to resolve my problem
This site is really great :->
|
|
|
|
|
Hi Everybody.
I have some trouble for mixing the input level of a microphone connected to the sound card of my laptop. My laptop is a Dell D420 with SigmaTel Audio soundcard.
While trying to use the function put_MixLevel( ) of the IAMAudioInputMixer interface, the hr result return is E_NOTIMPL.
I tried to reinstall the driver, and also tried to do the same thing with a USB sound card (Hercules Muse Pocket LT), it's still the same result.
However, while trying to use this function with a usb headset or with a webcam, it worked perfectly. Does anybody knows what is wrong?? How can I fix the problem and a the end use this function with my soundcard?
Thanks in advance.
|
|
|
|
|
I need to browse to page in hosted web browse rcontrol to HTTPS page with
invalid certificate. How can I silently accept it ?
The silent mode disables the popup but it revokes the certificate.
Adding this certificate to accepted certificates manually does not help, I
need general solution for any site.
Is there some interface I can implement to handle this or some registry key
I can change?
Thank you!
rrrado
|
|
|
|
|
DId u tried IObjectSafety ,not sure.
If u can Dream... U can do it
|
|
|
|
|
it seems this interface is for some AciveX controls, not SSL/HTTPS
rrrado
|
|
|
|
|
if your certificate is out of date, why would you enforce the security of the web site ?!
|
|
|
|
|
some sites are invalid (self-signed) certificates and surfer can do nothing about it,
he wants the software to work
rrrado
|
|
|
|
|
but obviously, it's not your fault...
you don't have to adapt your code one's problems. someone has to fix the website, not you to try to pass at any cost
|
|
|
|