Click here to Skip to main content
15,895,370 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCustom icon for an app Pin
Alton Williams1-Mar-05 7:07
Alton Williams1-Mar-05 7:07 
GeneralRe: Custom icon for an app Pin
Blake Miller1-Mar-05 7:19
Blake Miller1-Mar-05 7:19 
GeneralRe: Custom icon for an app Pin
Alton Williams1-Mar-05 7:31
Alton Williams1-Mar-05 7:31 
GeneralRe: Custom icon for an app Pin
Michael Dunn1-Mar-05 7:36
sitebuilderMichael Dunn1-Mar-05 7:36 
GeneralRe: Custom icon for an app Pin
David Crow1-Mar-05 9:07
David Crow1-Mar-05 9:07 
QuestionSetting checkbox state in OnInitDialog? Pin
1-Mar-05 6:59
suss1-Mar-05 6:59 
AnswerRe: Setting checkbox state in OnInitDialog? Pin
Blake Miller1-Mar-05 7:23
Blake Miller1-Mar-05 7:23 
GeneralRe: Setting checkbox state in OnInitDialog? Pin
Member 16972731-Mar-05 7:33
Member 16972731-Mar-05 7:33 
Blaine,
Thank you for taking the time to answer this simple question. When I tried to implement your suggestion I got this ...

4030R TestingDlg.cpp
C:\CCViews\ggerber_view\cmd_proc\4030R Hemi Test\4030R TestingDlg.cpp(123) : error C2664: 'void __thiscall CWnd::GetDlgItem(int,struct HWND__ ** ) const' : cannot convert parameter 1 from 'struct HWND__ *' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
C:\CCViews\ggerber_view\cmd_proc\4030R Hemi Test\4030R TestingDlg.cpp(124) : error C2065: 'wParam' : undeclared identifier
Error executing cl.exe.

Here is my OnInitDialog Function Code ...

BOOL C4030RDlg::OnInitDialog()
{
CDialog::OnInitDialog();

// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, true); // Set big icon
SetIcon(m_hIcon, false); // Set small icon

// TODO: Add extra initialization here
hDlgWnd = GetSafeHwnd();

THREADINFO* ptp = new THREADINFO;
ptp->hWnd = hDlgWnd;
g_pThread = AfxBeginThread(ThreadPanelRead, ptp, THREAD_PRIORITY_NORMAL, 0, CREATE_SUSPENDED);

// Creates a 12-point-Courier-font
m_Font.CreatePointFont(120, _T("Arial Bold"));

// Set Font without a member variable
GetDlgItem(IDC_EDIT_L5)->SetFont(&m_Font);
GetDlgItem(IDC_EDIT_L4)->SetFont(&m_Font);
GetDlgItem(IDC_EDIT_L3)->SetFont(&m_Font);
GetDlgItem(IDC_EDIT_L2)->SetFont(&m_Font);
GetDlgItem(IDC_EDIT_L1)->SetFont(&m_Font);

GetDlgItem(IDC_EDIT_R5)->SetFont(&m_Font);
GetDlgItem(IDC_EDIT_R4)->SetFont(&m_Font);
GetDlgItem(IDC_EDIT_R3)->SetFont(&m_Font);
GetDlgItem(IDC_EDIT_R2)->SetFont(&m_Font);
GetDlgItem(IDC_EDIT_R1)->SetFont(&m_Font);

GetDlgItem(IDC_STATUS)->SetFont(&m_Font);
GetDlgItem(IDC_TRIG_MODE)->SetFont(&m_Font);

HWND hWndControl = GetDlgItem(this->m_hWnd, IDC_CHECK1);
SendMessage(hWndControl, IDC_CHECK1, BM_SETCHECK, wParam, BST_CHECKED, 0);

g_bContAquire = false;
g_nTriggerSource = UNKNOWN_TRIGGER;


return true; // return true unless you set the focus to a control
}

I hope this helps and again thanks for helping out a newbie ...

Greg
GeneralRe: Setting checkbox state in OnInitDialog? Pin
Blake Miller1-Mar-05 7:41
Blake Miller1-Mar-05 7:41 
AnswerRe: Setting checkbox state in OnInitDialog? Pin
Ravi Bhavnani1-Mar-05 7:27
professionalRavi Bhavnani1-Mar-05 7:27 
GeneralRe: Setting checkbox state in OnInitDialog? Pin
Member 16972731-Mar-05 7:58
Member 16972731-Mar-05 7:58 
AnswerRe: Setting checkbox state in OnInitDialog? Pin
Alton Williams1-Mar-05 7:27
Alton Williams1-Mar-05 7:27 
GeneralRe: Setting checkbox state in OnInitDialog? Pin
Member 16972731-Mar-05 7:58
Member 16972731-Mar-05 7:58 
GeneralRe: Setting checkbox state in OnInitDialog? Pin
David Crow1-Mar-05 9:05
David Crow1-Mar-05 9:05 
QuestionWhat format is this file in and how to open it in C++ Pin
Member 121962521-Mar-05 6:58
Member 121962521-Mar-05 6:58 
AnswerRe: What format is this file in and how to open it in C++ Pin
Michael Dunn1-Mar-05 7:41
sitebuilderMichael Dunn1-Mar-05 7:41 
GeneralRe: What format is this file in and how to open it in C++ Pin
Tommy2d1-Mar-05 9:54
Tommy2d1-Mar-05 9:54 
GeneralRe: What format is this file in and how to open it in C++ Pin
Michael Dunn1-Mar-05 10:44
sitebuilderMichael Dunn1-Mar-05 10:44 
GeneralRe: What format is this file in and how to open it in C++ Pin
Tommy2k1-Mar-05 12:19
Tommy2k1-Mar-05 12:19 
GeneralRe: What format is this file in and how to open it in C++ Pin
normanS1-Mar-05 20:51
normanS1-Mar-05 20:51 
GeneralRe: What format is this file in and how to open it in C++ Pin
Tommy2d2-Mar-05 4:58
Tommy2d2-Mar-05 4:58 
QuestionWhat format is this file in and how to open it in C++ Pin
Member 121962521-Mar-05 6:58
Member 121962521-Mar-05 6:58 
GeneralAdding a button to all active windows... Pin
price1-Mar-05 6:34
price1-Mar-05 6:34 
GeneralForce delete file Pin
User 17288841-Mar-05 5:32
User 17288841-Mar-05 5:32 
GeneralRe: Force delete file Pin
David Crow1-Mar-05 6:02
David Crow1-Mar-05 6:02 

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.