|
can u give me small example.so that i can understand well.
ram.
|
|
|
|
|
I have already provided the example. You just need to add these lines of code in the OnCtlColor method(See My previous post) to change the color of the static controls on the dialog.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
once when i entering the text into to static .the back ground of that text is changing to my dialog color
ram
-- modified at 4:25 Wednesday 5th July, 2006
|
|
|
|
|
|
yah i done it once if i enter the text into the satic text then the back ground upto the text is changing to dialog background colour.
ram.
|
|
|
|
|
Can you show OnCtlcolor how you use this event with functions
whitesky
|
|
|
|
|
thank u for ur eply
HBRUSH CSree::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
if (pWnd->GetDlgCtrlID () == IDC_STATIC1)
return CreateSolidBrush (RGB(255,255,255));
if (pWnd->GetDlgCtrlID () == IDC_STATIC2)
return CreateSolidBrush (RGB(255,0,0));
return CreateSolidBrush (RGB(0,255,255));}
|
|
|
|
|
See here after this code whats happen
<br />
HBRUSH CssDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)<br />
{<br />
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);<br />
pDC->SetTextColor(RGB(104,144,244));
return CreateSolidBrush(RGB(53,97,244));<br />
}<br />
whitesky
|
|
|
|
|
no change .
once wew enter the text the background upto text is changed to the original color of the dialog.
|
|
|
|
|
I think (im not sure) maybe your problem isnt ctlcolor
whitesky
|
|
|
|
|
i will explain my problem clearly.
iam using two staic control one for icon and another for text.
i keep the static control color to white,and dialog to blue,after that i change the static caption to Ram.after that if i compile we are getting ram instatic the background of ram is changed to original Dialog box colour that means not blue.
ram.
|
|
|
|
|
when you run onctlcolor the background is blue and when you use pDC->settextcolor() you can change color from static
but i think you need to WM_CTLCOLORSTATIC for static i think if you use this event
your problem is solve
whitesky
|
|
|
|
|
i got it by using
pDC->SetBkMode( TRANSPARENT);
thank u very much,WHITESKY.
ram.
|
|
|
|
|
Hi folks!
I have an MFC activeX control where I want to send an array of UDT (structure). My problem is that I have to use VARIANT compatible data types. As far as I know this means that I should wrap a SafeArray into a Variant and send a pointer to this variant to the client.
My problem is how can I add elements of a UDT to this array in such a way that when the client recieves the array he can easily extract the elements of the UDT one by one.
My UDT or structure looks like this;
struct product {
int weight;
float price;
} ;
Hope I made my problem clear!
Thanks for any help!
|
|
|
|
|
Is there anyone that knows, please help me out!
|
|
|
|
|
Hi all,
I have a Tree View and List View as a Splitter View. I have menus for both of them i want to implement Custum Command Routing both of the Views.
Please Help me out.
uday.
|
|
|
|
|
Hi
Can i recieve my msn messenger contact list by providing it my username and password by using my own messenger application?
We Believe in Excellence
www.aqueelmirza.cjb.net
|
|
|
|
|
|
hi all plz tell me ..........
i want to know that i hve open certain windows and now i want to make a button on which when i click all opened windos are minimized
and a made second button on which when i click all windows are maximized
plz tell me how i can do this
plz send me example for this................
Ashish Dogra
MCA
Noida
|
|
|
|
|
EnumWindows()
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
PostMessage(FindWindow("Shell_TrayWnd", NULL), WM_COMMAND,<br />
MAKELONG(415, 0), 0);<br />
<br />
PostMessage(FindWindow("Shell_TrayWnd", NULL), WM_COMMAND,<br />
MAKELONG(416, 0), 0);
reference : http://www.borngeek.com/coding/window/minimize_all.html[^]
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
thanks sir but as i try this an error that postmessage will not take four parameters will appear
plz tell me
Ashish Dogra
MCA
Noida
|
|
|
|
|
try Using ::PostMessage
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
Replace the above code with this.
::PostMessage(FindWindow("Shell_TrayWnd", NULL)->GetSafeHwnd(), WM_COMMAND,MAKELONG(415, 0), 0);<br />
<br />
::PostMessage(FindWindow("Shell_TrayWnd", NULL)->GetSafeHwnd(), WM_COMMAND,MAKELONG(416, 0), 0);
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
sir plz tell me
sir as u try this code iwill not giving any error
but sir as i run my application and open windows and then i press the button
it will minimisze all now to maximize telme how
Ashish Dogra
MCA
Noida
-- modified at 3:13 Wednesday 5th July, 2006
|
|
|
|