|
i already checked.is there any option for that.
Thanks
nitin
|
|
|
|
|
NiceNaidu wrote: ve u checked these articles http://www.codeproject.com/threads/#Inter%2DProcess+Communication[^]
BREW and IPC is some kinda different
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Send me as early as possible
#sankar#
|
|
|
|
|
Where do you want to select the numbers from?
If you want to generate random number's use rand()
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
sankarRao wrote: Send me as early as possible
Post the description of problem not...
Send me as early as possible
use the modulas(%) operator with rand() to get the numbers in the range like
int i=rand()%5;<br />
i is between 0 to 4.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
hi all plz help me
i want to change color of a particular control on which text is displayed but problem is that when i try folloeing code it will change color only of the text's background but not of all control plz tel me code for this
HBRUSH CAfterone::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
pDC->SetBkColor(RGB(0, 0, 0));
// TODO: Return a different brush if the default is not desired
return hbr;
}
Please mail me
|
|
|
|
|
u should return a brush of required color to do that
CBrush bkBrush( RGB(0,0,0));<br />
<br />
<br />
HBRUSH CAfterone::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) <br />
{<br />
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);<br />
<br />
pDC->SetBkColor(RGB(0, 0, 0));<br />
<br />
return bkBrush;<br />
<br />
}
nave
|
|
|
|
|
<br />
CPaintDC dc(this);
dc.SetTextColor(RGB(0,0,200));<br />
dc.TextOutW(10,10,_T("test"),4);<br /> and Here[^]
whitesky
|
|
|
|
|
HBRUSH CAfterone::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
if(pWnd->GetDlgCtrlID()==/*Put your control id Here ex IDC_EDIT1*/)
// return your color brush here
// TODO: Return a different brush if the default is not desired
return hbr;
}
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
i want only to change edit box color not text color
this will change all dialog box coloto black
i want to change only edit control color but not its text color
plz tel me how this possible
Please mail me
|
|
|
|
|
Here's the code snippet : To change only the background color
HBRUSH CTestDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
HBRUSH hBr=CreateSolidBrush (RGB(255,0,0));
if(pWnd->GetDlgCtrlID ()== IDC_EDIT1)
{
pDC->SetBkColor (RGB(255,0,0));
hbr=hBr;
}
return hbr;
}
Is it OK!
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
yogendra kaushik wrote: i want only to change edit box color not text color
this will change all dialog box coloto black
i want to change only edit control color but not its text color
plz tel me how this possible
The following code changes the color of the all the EDIT controls of the dialog CtestMFCDlg.
HBRUSH CtestMFCDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)<br />
{<br />
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);<br />
if(nCtlColor== CTLCOLOR_EDIT )<br />
hbr=CreateSolidBrush(RGB(0,100,0));<br />
return hbr;<br />
}
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
A_Laxmanhbr=CreateSolidBrush(RGB(0,100,0));
this will generate handle leake...Isn't it?
nave
|
|
|
|
|
you need to WM_CTLCOLOREDIT message
whitesky
|
|
|
|
|
See the following answer posted in the same page...
Here[^]
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
yogendra kaushik wrote: i want to change color of a particular control
I think following code will solve ur problem
if(pWnd->GetDlgCtrlID()==IDC_EDIT1)<br />
{<br />
CRect rect;<br />
pWnd->GetClientRect(&rect);<br />
pDC->FillSolidRect(&rect,RGB(255,0,0));<br />
pWnd->ReleaseDC(pDC); <br />
}<br />
put this code in OnCtlColor ().
This wil give you desired output.
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|
|
thanks a lot
mut if i want to change color of many edit boxes then i had to use if statement for each or there is some other techniqe to sole it plz send me code
Please mail me
|
|
|
|
|
send me as early as possible
#sankar#
|
|
|
|
|
try EnumChildWindows.
Regards,
FarPointer
Blog:http://farpointer.blogspot.com/
|
|
|
|
|
|
Use FindWindow() or
use CWnd* GetDlgItem(int nID)
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
-- modified at 5:33 Monday 19th June, 2006
|
|
|
|
|
sankarRao wrote: How we can get the handle of child window
See the following API in case of Dialog's Child window
HWND GetDlgItem( HWND hDlg, int nIDDlgItem);
what do you mean send me as early as possible ?? is this you description of your question.. please ...we are not here for providing full solutions but suggestions....we are also developers like you.
Knock out 't' from can't,
You can if you think you can
-- modified at 5:44 Monday 19th June, 2006
|
|
|
|
|
A_Laxman...we are also developers like you.
Speak for yourself.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
I am unable to find any sample code covering the change of color in text output. I would be grasteful for any pointers.
Raymond Mercier
|
|
|
|