Click here to Skip to main content
15,887,135 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCreating MPEG-1 from series of JPEG Pin
yudhisthira27-Mar-07 1:04
yudhisthira27-Mar-07 1:04 
AnswerRe: Creating MPEG-1 from series of JPEG Pin
Mark Salsbery27-Mar-07 7:17
Mark Salsbery27-Mar-07 7:17 
GeneralRe: Creating MPEG-1 from series of JPEG Pin
yudhisthira27-Mar-07 18:40
yudhisthira27-Mar-07 18:40 
GeneralRe: Creating MPEG-1 from series of JPEG Pin
Mark Salsbery28-Mar-07 6:57
Mark Salsbery28-Mar-07 6:57 
QuestionHow to send messages to windows Pin
Goggelmoggel27-Mar-07 0:57
Goggelmoggel27-Mar-07 0:57 
AnswerRe: How to send messages to windows Pin
Naveen27-Mar-07 1:03
Naveen27-Mar-07 1:03 
GeneralRe: How to send messages to windows Pin
Goggelmoggel27-Mar-07 1:27
Goggelmoggel27-Mar-07 1:27 
QuestionBackground color of a property page Pin
Farhat Aisha27-Mar-07 0:56
Farhat Aisha27-Mar-07 0:56 
Hi,
I want to get the background color of a property page (from its child). I have written the following code which works fine if the child is in a dialog but not for the property page
Here is my code (taken from //http://www.thescripts.com/forum/thread281595.html)

//methods in the child control
bool getColorMethod1()
{
bool bRet=false;
if (GetParent())
{
CDC* pParentDC=GetParent()->GetDC();
if (pParentDC)
{
HBRUSH hbrush;
hbrush =(HBRUSH) GetParent()->SendMessage(WM_CTLCOLORDLG,(WPARAM)pParentDC->m_hDC,(LPARAM) GetParent()->m_hWnd);
if (hbrush)
{
LOGBRUSH lb;
if ((BOOL)GetObject(hbrush, sizeof(lb), &lb))
{
if (BS_SOLID == lb.lbStyle)
{
m_clr = lb.lbColor;
bRet = true;
}
}
}
ReleaseDC(pParentDC);
}
}
return bRet;
}

bool getColorMethod2()
{
bool bRet=false;
CWnd *pParentWnd=GetParent();
if (pParentWnd)
{
CDC* pParentDC=GetParent()->GetDC();
if (pParentDC)
{
CDC memDC;
CBitmap memBitmap;
CBitmap* oldBmp;
CRect rc;

pParentWnd->GetClientRect(&rc);
memDC.CreateCompatibleDC(pParentDC);
memBitmap.CreateCompatibleBitmap(pParentDC,rc.Width(),rc.Height());
oldBmp=memDC.SelectObject(&memBitmap);
if (pParentWnd->SendMessage(WM_ERASEBKGND, (WPARAM)memDC.m_hDC, 0))
{
m_clr=memDC.GetPixel( 0, 0);
bRet=true;
}
memDC.SelectObject(oldBmp);
memBitmap.DeleteObject();
memDC.DeleteDC();

ReleaseDC(pParentDC);
}
}
return bRet;
}

None of the above methods are returning me the correct color for the control on the property page but they work fine on the dialog
So can any body pleeeeeeaaaaaaaaaase help
Thanks
AnswerRe: Background color of a property page Pin
prasad_som27-Mar-07 2:20
prasad_som27-Mar-07 2:20 
QuestionUsing Excel from C++ Pin
BusyDeveloper27-Mar-07 0:44
BusyDeveloper27-Mar-07 0:44 
AnswerRe: Using Excel from C++ Pin
Roger Stoltz27-Mar-07 2:30
Roger Stoltz27-Mar-07 2:30 
GeneralRe: Using Excel from C++ Pin
BusyDeveloper27-Mar-07 20:12
BusyDeveloper27-Mar-07 20:12 
QuestionRe: Using Excel from C++ Pin
Roger Stoltz27-Mar-07 20:47
Roger Stoltz27-Mar-07 20:47 
AnswerRe: Using Excel from C++ Pin
BusyDeveloper27-Mar-07 22:09
BusyDeveloper27-Mar-07 22:09 
GeneralRe: Using Excel from C++ Pin
Roger Stoltz27-Mar-07 23:01
Roger Stoltz27-Mar-07 23:01 
GeneralRe: Using Excel from C++ Pin
BusyDeveloper28-Mar-07 22:46
BusyDeveloper28-Mar-07 22:46 
QuestionDestroyWindow & Focus Pin
baerten27-Mar-07 0:15
baerten27-Mar-07 0:15 
QuestionAbout storing file content Pin
siddharthsan26-Mar-07 23:37
siddharthsan26-Mar-07 23:37 
AnswerRe: About storing file content Pin
David Crow27-Mar-07 2:54
David Crow27-Mar-07 2:54 
Questionto call GlobalAlloc Pin
zon_cpp26-Mar-07 23:17
zon_cpp26-Mar-07 23:17 
AnswerRe: to call GlobalAlloc Pin
toxcct26-Mar-07 23:21
toxcct26-Mar-07 23:21 
GeneralRe: to call GlobalAlloc Pin
zon_cpp27-Mar-07 0:03
zon_cpp27-Mar-07 0:03 
GeneralRe: to call GlobalAlloc Pin
toxcct27-Mar-07 0:12
toxcct27-Mar-07 0:12 
QuestionRe: to call GlobalAlloc Pin
zon_cpp27-Mar-07 0:27
zon_cpp27-Mar-07 0:27 
AnswerRe: to call GlobalAlloc Pin
toxcct27-Mar-07 0:33
toxcct27-Mar-07 0:33 

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.