Click here to Skip to main content
15,921,113 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Map Container & Sorting :: STL Pin
jhwurmbach10-Sep-02 4:04
jhwurmbach10-Sep-02 4:04 
GeneralRe: Map Container & Sorting :: STL Pin
Alexandru Savescu10-Sep-02 4:48
Alexandru Savescu10-Sep-02 4:48 
GeneralRe: Map Container & Sorting :: STL Pin
valikac10-Sep-02 10:19
valikac10-Sep-02 10:19 
QuestionHow to change editbox's background color when it is set to read-only? Pin
Vincent Ye9-Sep-02 9:19
Vincent Ye9-Sep-02 9:19 
AnswerRe: How to change editbox's background color when it is set to read-only? Pin
Carlos Antollini9-Sep-02 9:34
Carlos Antollini9-Sep-02 9:34 
AnswerRe: How to change editbox's background color when it is set to read-only? Pin
adamUK9-Sep-02 9:39
adamUK9-Sep-02 9:39 
GeneralRe: How to change editbox's background color when it is set to read-only? Pin
Vincent Ye9-Sep-02 9:45
Vincent Ye9-Sep-02 9:45 
GeneralRe: How to change editbox's background color when it is set to read-only? Pin
adamUK9-Sep-02 10:04
adamUK9-Sep-02 10:04 
Hmm.. I am doing the same... the following code paints a white background in IDC_USER and IDC_KEY which are read only (I didn't want them to be gray) and paints everything else with a blue background. They are Enabled though (i.e. EnableWindow(TRUE)).

HBRUSH CCncloginDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) <br />
{<br />
	HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);<br />
	HWND hWnd=pWnd->GetSafeHwnd();<br />
	// TODO: Change any attributes of the DC here<br />
	if(nCtlColor==CTLCOLOR_EDIT || hWnd==GetDlgItem(IDC_USER)->GetSafeHwnd() || hWnd==GetDlgItem(IDC_KEY)->GetSafeHwnd())<br />
	{<br />
		pDC->SetBkColor(RGB(255,255,255));<br />
		hbr=(HBRUSH)m_brBrush;<br />
	}<br />
	else<br />
	{<br />
		pDC->SetBkColor(RGB(128,128,200));<br />
		hbr=(HBRUSH)m_brBrush2;<br />
	}<br />
	// TODO: Return a different brush if the default is not desired<br />
	return hbr;<br />
}


Sounds mysterious! If you work out what's up then post it. I would be interested to hear what it was.

Smile | :)

Adam.

"I spent a lot of my money on booze, birds and fast cars. The rest I just squandered"
George Best.
GeneralAccess listbox from view's class Pin
danag9-Sep-02 9:15
danag9-Sep-02 9:15 
GeneralRe: Access listbox from view's class Pin
Dave Bryant9-Sep-02 11:13
Dave Bryant9-Sep-02 11:13 
GeneralRe: Access listbox from view's class Pin
danag9-Sep-02 13:47
danag9-Sep-02 13:47 
GeneralRe: Access listbox from view's class Pin
Dave Bryant9-Sep-02 13:54
Dave Bryant9-Sep-02 13:54 
GeneralSplitter Window Drawing Pin
insanely4209-Sep-02 9:05
insanely4209-Sep-02 9:05 
GeneralRe: Splitter Window Drawing Pin
.dan.g.9-Sep-02 14:15
professional.dan.g.9-Sep-02 14:15 
GeneralEncrypting Packets. Pin
Mike Doner9-Sep-02 9:01
Mike Doner9-Sep-02 9:01 
GeneralRe: Encrypting Packets. Pin
Joaquín M López Muñoz9-Sep-02 9:11
Joaquín M López Muñoz9-Sep-02 9:11 
GeneralAccess violation reading location 0x00000110. Please help. Pin
Redeemer-dk9-Sep-02 8:57
Redeemer-dk9-Sep-02 8:57 
GeneralRe: Access violation reading location 0x00000110. Please help. Pin
jhwurmbach10-Sep-02 4:09
jhwurmbach10-Sep-02 4:09 
GeneralProblem Find Resources In Extension DLL From ATL Exe Server Pin
Bill S9-Sep-02 8:09
professionalBill S9-Sep-02 8:09 
GeneralRe: Problem Find Resources In Extension DLL From ATL Exe Server Pin
Tomasz Sowinski9-Sep-02 8:21
Tomasz Sowinski9-Sep-02 8:21 
GeneralRe: Problem Find Resources In Extension DLL From ATL Exe Server Pin
Bill S9-Sep-02 8:23
professionalBill S9-Sep-02 8:23 
GeneralRe: Problem Find Resources In Extension DLL From ATL Exe Server Pin
Tomasz Sowinski9-Sep-02 8:30
Tomasz Sowinski9-Sep-02 8:30 
GeneralRe: Problem Find Resources In Extension DLL From ATL Exe Server Pin
Bill S9-Sep-02 8:37
professionalBill S9-Sep-02 8:37 
GeneralDialog Based Apps - Menu & Windows :: MFC Pin
valikac9-Sep-02 7:56
valikac9-Sep-02 7:56 
GeneralRe: Dialog Based Apps - Menu & Windows :: MFC Pin
dazinith9-Sep-02 8:16
dazinith9-Sep-02 8:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.