Click here to Skip to main content
15,909,737 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to set background color to the Dlg?? Pin
Hamid_RT25-Jun-06 23:00
Hamid_RT25-Jun-06 23:00 
GeneralRe: how to set background color to the Dlg?? Pin
Viorel.25-Jun-06 23:19
Viorel.25-Jun-06 23:19 
AnswerRe: how to set background color to the Dlg?? Pin
Hamid_RT25-Jun-06 22:31
Hamid_RT25-Jun-06 22:31 
GeneralRe: how to set background color to the Dlg?? Pin
Sarath C25-Jun-06 22:49
Sarath C25-Jun-06 22:49 
GeneralRe: how to set background color to the Dlg?? Pin
Hamid_RT25-Jun-06 22:58
Hamid_RT25-Jun-06 22:58 
GeneralRe: how to set background color to the Dlg?? Pin
Sarath C25-Jun-06 23:23
Sarath C25-Jun-06 23:23 
GeneralRe: how to set background color to the Dlg?? Pin
Hamid_RT25-Jun-06 23:36
Hamid_RT25-Jun-06 23:36 
AnswerRe: how to set background color to the Dlg?? Pin
ovidiucucu26-Jun-06 1:43
ovidiucucu26-Jun-06 1:43 
Hi there,

Here is an exotic one:
BOOL CMyCoolApp::InitInstance()
{
   WNDCLASS wc;
   // Get the info for this class.
   // #32770 is the default class name for dialogs boxes.
   ::GetClassInfo(m_hInstance, _T("#32770"), &wc);
   // Change the name of the class.
   wc.lpszClassName = _T("My cool Blue Dialog class");

   // change the class background color
   CBrush brush(RGB(0,0,255));
   wc.hbrBackground = brush;
   brush.Detach();
   // chage also the class window procedure 
   wc.lpfnWndProc   = DefWindowProc; 
   // Register this class.
   AfxRegisterClass(&wc);
   // ...and finally...
   /* --------------------------------------------------------
      Add CLASS statement in DIALOG resource like for example
   -----------------------------------------------------------
      IDD_ABOUTBOX DIALOG DISCARDABLE  0, 0, 235, 55
      STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
      CAPTION "About My Cool App"
      CLASS "My cool Blue Dialog class"
   */
// ...
}

Have fun! Wink | ;)

Ovidiu Cucu
Microsoft MVP - Visual C++
Question"Force file output" option in Visual Studio.NET Pin
dashprasannajit25-Jun-06 22:07
dashprasannajit25-Jun-06 22:07 
AnswerRe: "Force file output" option in Visual Studio.NET Pin
Viorel.25-Jun-06 22:25
Viorel.25-Jun-06 22:25 
Questionregarding FileDialog Pin
happy_ram25-Jun-06 21:32
happy_ram25-Jun-06 21:32 
AnswerRe: regarding FileDialog Pin
kakan25-Jun-06 21:36
professionalkakan25-Jun-06 21:36 
GeneralRe: regarding FileDialog Pin
happy_ram25-Jun-06 21:42
happy_ram25-Jun-06 21:42 
GeneralRe: regarding FileDialog Pin
kakan25-Jun-06 21:49
professionalkakan25-Jun-06 21:49 
GeneralRe: regarding FileDialog Pin
happy_ram25-Jun-06 22:20
happy_ram25-Jun-06 22:20 
GeneralRe: regarding FileDialog Pin
kakan25-Jun-06 22:27
professionalkakan25-Jun-06 22:27 
GeneralRe: regarding FileDialog Pin
happy_ram25-Jun-06 22:41
happy_ram25-Jun-06 22:41 
GeneralRe: regarding FileDialog Pin
kakan25-Jun-06 22:49
professionalkakan25-Jun-06 22:49 
GeneralRe: regarding FileDialog Pin
happy_ram25-Jun-06 23:27
happy_ram25-Jun-06 23:27 
GeneralRe: regarding FileDialog Pin
kakan25-Jun-06 23:45
professionalkakan25-Jun-06 23:45 
GeneralRe: regarding FileDialog Pin
happy_ram26-Jun-06 0:48
happy_ram26-Jun-06 0:48 
QuestionRe: regarding FileDialog Pin
Hamid_RT25-Jun-06 22:37
Hamid_RT25-Jun-06 22:37 
AnswerRe: regarding FileDialog Pin
Viorel.25-Jun-06 21:37
Viorel.25-Jun-06 21:37 
GeneralRe: regarding FileDialog Pin
happy_ram25-Jun-06 21:47
happy_ram25-Jun-06 21:47 
QuestionHow to save bitmap in Black/White Pin
Praveenkumar T.G25-Jun-06 21:07
Praveenkumar T.G25-Jun-06 21:07 

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.