Click here to Skip to main content
14,390,083 members

C / C++ / MFC

 
AnswerRe: 2 forms link between label and textbox Pin
jamesmc153516-Jul-15 6:01
Memberjamesmc153516-Jul-15 6:01 
GeneralRe: 2 forms link between label and textbox Pin
David Crow16-Jul-15 6:10
MemberDavid Crow16-Jul-15 6:10 
GeneralRe: 2 forms link between label and textbox Pin
jamesmc153516-Jul-15 6:15
Memberjamesmc153516-Jul-15 6:15 
AnswerRe: 2 forms link between label and textbox Pin
jamesmc153516-Jul-15 6:03
Memberjamesmc153516-Jul-15 6:03 
AnswerRe: 2 forms link between label and textbox Pin
Richard Andrew x6416-Jul-15 14:08
professionalRichard Andrew x6416-Jul-15 14:08 
GeneralRe: 2 forms link between label and textbox Pin
jamesmc153516-Jul-15 21:42
Memberjamesmc153516-Jul-15 21:42 
GeneralRe: 2 forms link between label and textbox Pin
Richard MacCutchan17-Jul-15 4:27
mveRichard MacCutchan17-Jul-15 4:27 
QuestionColoring scrollbar with DrawThemeBackground Pin
_Flaviu15-Jul-15 2:14
Member_Flaviu15-Jul-15 2:14 
I am struggling for some while to coloring a control scrollbar, with DrawThemeBackground. (any control, no matter what) ... here is the trial:
void CMyControl::OnDraw(CDC* pDC)
{
// draw control
	HTHEME hTheme = OpenThemeData(m_hWnd, L"WINDOW");
//	HTHEME hTheme = OpenThemeData(m_hWnd, L"MFCGridCtrl");
	if(NULL != hTheme)
	{
		if(WS_VSCROLL & GetStyle())
		{
			SCROLLBARINFO si;
			si.cbSize = sizeof(SCROLLBARINFO);
			GetScrollBarInfo(OBJID_VSCROLL, &si);
			CRect rect(si.rcScrollBar);
			pDC->FillSolidRect(&rect, RGB(255, 0, 0));
			HRESULT hResult = DrawThemeBackground(hTheme, pDC->GetSafeHdc(), SBP_LOWERTRACKVERT, SCRBS_NORMAL, &rect, NULL);
			if(S_OK == hResult)
				TRACE("ok\n");
			else
				TRACE("not ok !\n");
		}
		CloseThemeData(hTheme);
	}
}

And I always get not ok ! ... What I'am doing wrong here ? The scrollbar rectangle are ok, I verified ... can you help me ? Thank you.
SuggestionRe: Coloring scrollbar with DrawThemeBackground Pin
Jochen Arndt15-Jul-15 2:39
mveJochen Arndt15-Jul-15 2:39 
GeneralRe: Coloring scrollbar with DrawThemeBackground Pin
_Flaviu15-Jul-15 3:33
Member_Flaviu15-Jul-15 3:33 
GeneralRe: Coloring scrollbar with DrawThemeBackground Pin
Jochen Arndt15-Jul-15 4:15
mveJochen Arndt15-Jul-15 4:15 
GeneralRe: Coloring scrollbar with DrawThemeBackground Pin
_Flaviu15-Jul-15 8:06
Member_Flaviu15-Jul-15 8:06 
GeneralRe: Coloring scrollbar with DrawThemeBackground Pin
_Flaviu11-Aug-15 0:57
Member_Flaviu11-Aug-15 0:57 
AnswerRe: Coloring scrollbar with DrawThemeBackground Pin
CPallini15-Jul-15 2:42
mveCPallini15-Jul-15 2:42 
GeneralRe: Coloring scrollbar with DrawThemeBackground Pin
_Flaviu15-Jul-15 8:08
Member_Flaviu15-Jul-15 8:08 
QuestionProject compiles but VS IDE shows red error lines Pin
AmbiguousName13-Jul-15 21:40
MemberAmbiguousName13-Jul-15 21:40 
AnswerRe: Project compiles but VS IDE shows red error lines Pin
Stefan_Lang13-Jul-15 23:02
MemberStefan_Lang13-Jul-15 23:02 
AnswerRe: Project compiles but VS IDE shows red error lines Pin
AmbiguousName14-Jul-15 1:06
MemberAmbiguousName14-Jul-15 1:06 
GeneralRe: Project compiles but VS IDE shows red error lines Pin
Stefan_Lang14-Jul-15 1:41
MemberStefan_Lang14-Jul-15 1:41 
GeneralRe: Project compiles but VS IDE shows red error lines Pin
Jochen Arndt14-Jul-15 1:53
mveJochen Arndt14-Jul-15 1:53 
AnswerRe: Project compiles but VS IDE shows red error lines Pin
Richard MacCutchan13-Jul-15 23:13
mveRichard MacCutchan13-Jul-15 23:13 
QuestionHow to search large database without SQL or alike. Just asking. Pin
Vaclav_13-Jul-15 8:44
MemberVaclav_13-Jul-15 8:44 
GeneralRe: How to search large database without SQL or alike. Just asking. Pin
PIEBALDconsult13-Jul-15 9:10
professionalPIEBALDconsult13-Jul-15 9:10 
AnswerRe: How to search large database without SQL or alike. Just asking. Pin
Richard MacCutchan13-Jul-15 23:11
mveRichard MacCutchan13-Jul-15 23:11 
AnswerRe: How to search large database without SQL or alike. Just asking. Pin
jschell15-Jul-15 11:36
Memberjschell15-Jul-15 11:36 

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.