Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

Mohan Ramachandra

@Mohan Ramachandra
About
Posts
39
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • RedrawWindow + ListControl
    M Mohan Ramachandra

    What are you trying do? Looks like you are trying to change the background color. If that is the case handle WM_CTLCOLOR message.

    C / C++ / MFC help question

  • FullScrean listbox
    M Mohan Ramachandra

    Adding to the Niklas Lindquist suggestions in the below post GetClientRect API helps to obtain the client area of the Window. Get the parent window's client area and resize listbox according to it or the way you want.

    C / C++ / MFC question

  • FullScrean listbox
    M Mohan Ramachandra

    Resize the ListBox using MoveWindow API while changing from full screen to regular mode and vice versa.

    C / C++ / MFC question

  • Round Button
    M Mohan Ramachandra

    john5632 wrote:

    Button is coming with round edges but If button repaints it is becoming rectanglular shape button. What shall I do?

    I think your drawing the whole rectangular area of the button in OnDraw function. Draw only the round rectangular area of the button. OR Draw the button with the dialog background first and then draw the remaining things.

    C / C++ / MFC question

  • stream object
    M Mohan Ramachandra

    Typecast..

    char arrc[10];
    functionName((LPUNKNOWN) arrc);

    C / C++ / MFC data-structures

  • Error
    M Mohan Ramachandra

    john5632 wrote:

    mfc90.dll is not a valid Windows image

    Replace with a new DLL(mfc90.dll). The Dll that you are using might be corrupted.

    C / C++ / MFC help question

  • CButton changing background color
    M Mohan Ramachandra

    Try this

    // Add a CBrush member variable 
    CBrush m\_brushBK;
    

    In OnInitialUpdate function

    m\_brushBK.CreateSolidBrush(RGB(200,200,0));//Set brush color
    

    In the OnCtlColor function

    HBRUSH CtestDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
    {

    if(pWnd->GetDlgCtrlID()==IDC\_CHECK1)// Control ID of the Check box
    {
    	return m\_brushBK;
    }
    else
    {
    	HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);	
    	return hbr;
    }
    

    }

    C / C++ / MFC

  • Draw filled circle
    M Mohan Ramachandra

    Try this...

           CDC \*pDC = GetDC();
    	CRect rect;
    	GetClientRect(rect);
    	CBrush brush;
    	brush.CreateSolidBrush(RGB(255,0,0));
    	CBrush \*pOldBrush= pDC->SelectObject(&brush);
    	pDC->Ellipse(rect);
    	pDC->SelectObject(pOldBrush);
    	::ReleaseDC(m\_hWnd,pDC->m\_hDC );
    
    C / C++ / MFC question

  • CString conversion problem
    M Mohan Ramachandra

    Cedric Moonen wrote:

    No, calling GetBuffer is really a very bad practice. You shouldn't do that, the CString class already provides cast operators so there's no need to call GetBuffer !

    Thanks, I didn't know that

    C / C++ / MFC help question

  • Strange problem with pointers
    M Mohan Ramachandra

    Again you forgot to mention the type of buffer?

    C / C++ / MFC help question

  • CString conversion problem
    M Mohan Ramachandra

    Try this :)

        WCHAR disname\[100\]={0};
    CStringW name;
        name= m\_IniReader.getKeyValue(str,"VIEWNAME");
    wcscpy(disname, (LPCWSTR)name.GetBuffer(100));
    MessageBoxW(NULL,disname,disname,MB\_OK);
    name.ReleaseBuffer(100);
    
    C / C++ / MFC help question

  • CString conversion problem
    M Mohan Ramachandra

    How are you converting?

    C / C++ / MFC help question

  • VC++2008(graphics)!
    M Mohan Ramachandra

    I think you are trying to compile the code, which was written using turbo c++ compiler? Because

    anassamar wrote:

    'graphics.h':

    and

    anassamar wrote:

    I want to use the follwing functions: setcolor Graphmode Textmode , lineto ……………!!!!

    are graphical functions and header file provided in turbo c++ compiler.

    C / C++ / MFC c++ graphics help workspace

  • making a modelessdialog box as modal
    M Mohan Ramachandra

    Just call DoModal [^] member function of the dialog in the, menu message handler.

    C / C++ / MFC question

  • How to remove default icon in caption of MessageBox
    M Mohan Ramachandra

    am 2009 wrote:

    MB_TOPMOST property is ignored by vista. It is working fine on Windows XP,but not on Vista.

    I am using Vista and it's working fine.

    C / C++ / MFC tutorial question

  • How to remove default icon in caption of MessageBox
    M Mohan Ramachandra

    :thumbsup:

    C / C++ / MFC tutorial question

  • How to remove default icon in caption of MessageBox
    M Mohan Ramachandra

    Hope this one will help

    MessageBox(NULL,L"Please start application ",L"Test",MB_OK |MB_TOPMOST);

    MB_TOPMOST : Creates the message box with the WS_EX_TOPMOST window style.

    C / C++ / MFC tutorial question

  • How to set the ListCtrl's item color ?
    M Mohan Ramachandra

    You need to do custom draw in CListCtrl. This article in CP might help you [^]

    C / C++ / MFC question tutorial

  • mfc application hangs
    M Mohan Ramachandra

    Establish connection using thread AfxBeginThread . Then your main application thread won't stuck

    C / C++ / MFC c++ sysadmin help

  • UAC and restarting an external service in my MFC app
    M Mohan Ramachandra

    This one might help

    Sternocera wrote:

    ms_asmv2:requestedExecutionLevel level="highestAvailable"

    change to ms_asmv2:requestedExecutionLevel level="highestAvailable" uiAccess="true"

    C / C++ / MFC c++ com sysadmin security business
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups