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

C / C++ / MFC

 
AnswerRe: ReadOnly Radio button Pin
Code-o-mat3-Jun-10 22:12
Code-o-mat3-Jun-10 22:12 
GeneralRe: ReadOnly Radio button Pin
Niklas L3-Jun-10 22:21
Niklas L3-Jun-10 22:21 
GeneralRe: ReadOnly Radio button Pin
Code-o-mat3-Jun-10 22:23
Code-o-mat3-Jun-10 22:23 
GeneralRe: ReadOnly Radio button Pin
Niklas L3-Jun-10 22:35
Niklas L3-Jun-10 22:35 
GeneralRe: ReadOnly Radio button Pin
Anu_Bala3-Jun-10 22:38
Anu_Bala3-Jun-10 22:38 
GeneralRe: ReadOnly Radio button Pin
Code-o-mat3-Jun-10 22:47
Code-o-mat3-Jun-10 22:47 
GeneralRe: ReadOnly Radio button Pin
Anu_Bala3-Jun-10 23:51
Anu_Bala3-Jun-10 23:51 
GeneralRe: ReadOnly Radio button Pin
Code-o-mat4-Jun-10 0:08
Code-o-mat4-Jun-10 0:08 
Derive a class from CButton, handle those messages in this derived class and use it for your radio.
Something like this:
CReadOnlyRadio: public CButton
{
public:
  DECLARE_MESSAGE_MAP()
  void OnLButtonDown(UINT nFlags, CPoint point) { /*Nothing here on purpose*/ }
  void OnLButtonUp(UINT nFlags, CPoint point) { /*Nothing here on purpose*/ }
  void OnLButtonDblClk(UINT nFlags, CPoint point) { /*Nothing here on purpose*/ }
  void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) { /*Nothing here on purpose*/ }
  void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags) { /*Nothing here on purpose*/ }
  void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) { /*Nothing here on purpose*/ }
};
...
BEGIN_MESSAGE_MAP(CReadOnlyRadio, CButton)
  ON_WM_LBUTTONDOWN()
  ON_WM_LBUTTONUP()
  ON_WM_LBUTTONDBLCLK()
  ON_WM_KEYDOWN()
  ON_WM_KEYUP()
  ON_WM_CHAR()
END_MESSAGE_MAP()
...
class CMyFancyDialog: public CDialog
{
 ...
 DoDataExchange(CDataExchange* pDX);
 CReadOnlyRadio  m_ReadOnlyRadio;
 ...
};
...
void CMyFancyDialog::DoDataExchange(CDataExchange* pDX)
{
  CDialog::DoDataExchange(pDX);
  ...
  DDX_Control(pDX, IDC_READONLY_RADIO, m_ReadOnlyRadio);
  ...
}
...

Hope it is understandable...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Computers are evil, EVIL i tell you!! <

GeneralRe: ReadOnly Radio button Pin
Rick York4-Jun-10 8:11
mveRick York4-Jun-10 8:11 
GeneralRe: ReadOnly Radio button Pin
Code-o-mat4-Jun-10 9:12
Code-o-mat4-Jun-10 9:12 
GeneralRe: ReadOnly Radio button Pin
Rick York4-Jun-10 9:38
mveRick York4-Jun-10 9:38 
GeneralRe: ReadOnly Radio button Pin
Code-o-mat4-Jun-10 9:50
Code-o-mat4-Jun-10 9:50 
Questionunresolved external symbol sqlcxt Pin
ravi1204863-Jun-10 19:54
ravi1204863-Jun-10 19:54 
AnswerRe: unresolved external symbol sqlcxt Pin
«_Superman_»3-Jun-10 19:57
professional«_Superman_»3-Jun-10 19:57 
GeneralRe: unresolved external symbol sqlcxt Pin
ravi1204863-Jun-10 20:38
ravi1204863-Jun-10 20:38 
GeneralRe: unresolved external symbol sqlcxt Pin
«_Superman_»3-Jun-10 20:39
professional«_Superman_»3-Jun-10 20:39 
GeneralRe: unresolved external symbol sqlcxt Pin
ravi1204863-Jun-10 20:57
ravi1204863-Jun-10 20:57 
GeneralRe: unresolved external symbol sqlcxt Pin
«_Superman_»3-Jun-10 20:59
professional«_Superman_»3-Jun-10 20:59 
GeneralRe: unresolved external symbol sqlcxt Pin
ravi1204863-Jun-10 22:24
ravi1204863-Jun-10 22:24 
GeneralRe: unresolved external symbol sqlcxt Pin
«_Superman_»3-Jun-10 22:34
professional«_Superman_»3-Jun-10 22:34 
GeneralRe: unresolved external symbol sqlcxt Pin
ravi1204863-Jun-10 22:36
ravi1204863-Jun-10 22:36 
Questiondecompliler dll to c++ Pin
arun_pk3-Jun-10 19:34
arun_pk3-Jun-10 19:34 
AnswerRe: decompliler dll to c++ Pin
«_Superman_»3-Jun-10 19:42
professional«_Superman_»3-Jun-10 19:42 
GeneralRe: decompliler dll to c++ Pin
arun_pk3-Jun-10 19:45
arun_pk3-Jun-10 19:45 
QuestionDatabase problem Pin
Sakhalean3-Jun-10 18:58
Sakhalean3-Jun-10 18:58 

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.