Click here to Skip to main content
16,007,779 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: index not within bounds? Help !! Pin
Anonymous28-Jul-02 4:49
Anonymous28-Jul-02 4:49 
GeneralPort Numbers Pin
Waleed Eissa27-Jul-02 6:31
Waleed Eissa27-Jul-02 6:31 
GeneralRe: Port Numbers Pin
Anders Molin27-Jul-02 7:42
professionalAnders Molin27-Jul-02 7:42 
QuestionTimer Function Prototype ? Pin
hongheo7627-Jul-02 5:51
hongheo7627-Jul-02 5:51 
AnswerRe: Timer Function Prototype ? Pin
Michael Dunn27-Jul-02 6:09
sitebuilderMichael Dunn27-Jul-02 6:09 
AnswerRe: Timer Function Prototype ? Pin
includeh1027-Jul-02 7:10
includeh1027-Jul-02 7:10 
AnswerRe: Timer Function Prototype ? Pin
Branislav28-Jul-02 5:21
Branislav28-Jul-02 5:21 
GeneralChanging a static picture Pin
Anonymous27-Jul-02 5:04
Anonymous27-Jul-02 5:04 
Hello,

I have two icons that I wanna display based on the value of a check box. They're displayed in a static picture box. If the check box is checked, it displays one icon...you get the idea Smile | :) .

If I check the box after the app loads, it'll change the first time, but once the check box is clicked again, it won't load the other icon. I guess I need to overide a paint handler somewhere, but I'm not sure on how to do this.

Here's what I got:

HICON m_icon;<br />
<br />
if (m_enable = true)<br />
        m_icon = ::LoadIcon (AfxGetInstanceHandle(), <br />
                      MAKEINTRESOURCE(IDI_ON));<br />
    else if (m_enable = false)<br />
        m_icon = ::LoadIcon (AfxGetInstanceHandle(), <br />
                      MAKEINTRESOURCE(IDI_OFF));<br />
<br />
    ((CStatic *)(GetDlgItem (IDC_PIC)))->SetIcon(m_icon);<br />


Pretty stupid on my part, --probably real straightforward.
Thanks in advance.
Matt
GeneralRe: Changing a static picture Pin
Michael Dunn27-Jul-02 6:26
sitebuilderMichael Dunn27-Jul-02 6:26 
GeneralRe: Changing a static picture Pin
Anonymous27-Jul-02 7:20
Anonymous27-Jul-02 7:20 
GeneralRe: Changing a static picture Pin
l a u r e n28-Jul-02 0:42
l a u r e n28-Jul-02 0:42 
GeneralRe: Changing a static picture Pin
Anonymous28-Jul-02 4:55
Anonymous28-Jul-02 4:55 
GeneralRe: Changing a static picture Pin
l a u r e n28-Jul-02 5:00
l a u r e n28-Jul-02 5:00 
GeneralRe: Changing a static picture Pin
Anonymous29-Jul-02 4:57
Anonymous29-Jul-02 4:57 
Generalthanks and need info ... Pin
includeh1027-Jul-02 4:38
includeh1027-Jul-02 4:38 
GeneralRe: thanks and need info ... Pin
perlmunger27-Jul-02 5:07
perlmunger27-Jul-02 5:07 
Generaldialog boxes and fonts Pin
Gary Kirkham27-Jul-02 2:21
Gary Kirkham27-Jul-02 2:21 
GeneralRe: dialog boxes and fonts Pin
Gary Kirkham27-Jul-02 2:27
Gary Kirkham27-Jul-02 2:27 
GeneralRe: dialog boxes and fonts Pin
Shog927-Jul-02 6:15
sitebuilderShog927-Jul-02 6:15 
GeneralRe: dialog boxes and fonts Pin
l a u r e n28-Jul-02 0:44
l a u r e n28-Jul-02 0:44 
GeneralRe: dialog boxes and fonts Pin
Michael Dunn27-Jul-02 6:37
sitebuilderMichael Dunn27-Jul-02 6:37 
AnswerRe: how to trap command window that appears while executing a C++ prog... Pin
Nish Nishant26-Jul-02 23:45
sitebuilderNish Nishant26-Jul-02 23:45 
GeneralRe: how to trap command window that appears while executing a C++ prog... Pin
ColinDavies26-Jul-02 23:52
ColinDavies26-Jul-02 23:52 
GeneralRe: how to trap command window that appears while executing a C++ prog... Pin
Nish Nishant27-Jul-02 0:08
sitebuilderNish Nishant27-Jul-02 0:08 
GeneralRe: how to trap command window that appears while executing a C++ prog... Pin
ColinDavies27-Jul-02 0:13
ColinDavies27-Jul-02 0:13 

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.