Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: sunnysky

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Re: How to Enable/Disable Menu Item 2 in OnUpdate Handler of Menu Item 1?

    In "My Profile", I am shown as a member. But I don't know why I am a "Guest" when posting.
  2. Re: How to Enable/Disable Menu Item 2 in OnUpdate Handler of Menu Item 1?

    Sorry for the mistake in the previous post and this repost. I can't edit my posts.

    I got it work. Below is the code I tried. Two flag variables m_bShowFeatures and m_bShowSmallFetures are...
  3. Re: How to Enable/Disable Menu Item 2 in OnUpdate Handler of Menu Item 1?

    Thanks.

    But this probably doesn't work. In this case, when Menu Item 2 is grayed, it cannot be enabled again.
  4. Re: How to Enable/Disable Menu Item 2 in OnUpdate Handler of Menu Item 1?

    It's not a copy/paste. I made it clearer in the next post.
  5. Re: How to Enable/Disable Menu Item 2 in OnUpdate Handler of Menu Item 1?

    I changed the OP.
  6. Re: How to Enable/Disable Menu Item 2 in OnUpdate Handler of Menu Item 1?

    Hi GCDEF,

    I don't get method 1 using same handler. Menu item 1 is clicked, so OnUpdateMenu1() is called. But when I click menu item 2, I don't want OnUpdateMenu1() to be called. I don't...
  7. Re: How to Enable/Disable Menu Item 2 in OnUpdate Handler of Menu Item 1?

    I don't understand post #6 either.
  8. Re: How to Enable/Disable Menu Item 2 in OnUpdate Handler of Menu Item 1?

    I have tried post #2, but I can't locate the menu.

    I also wanted to try your solution 1 in post #4, but I am not clear on how to implement a state to have both update handlers invoked.

    I don't...
  9. Re: How to Enable/Disable Menu Item 2 in OnUpdate Handler of Menu Item 1?

    I have two menu items. When item 1 is updated, I want item 2 to be enabled/disabled. In the OnUpdate handler of menu item 1, I have tried to use "t_pMenu = pCmdUI->m_pMenu;", "t_pMenu =...
  10. Re: How to Enable/Disable Menu Item 2 in OnUpdate Handler of Menu Item 1?

    Because clicking menu item 1 won't invoke OnUpdateMenuItem2.
  11. How to Enable/Disable Menu Item 2 in OnUpdate Handler of Menu Item 1?

    I have two menu items. When item 1 is disabled, I want item 2 to be disabled as well. In the OnUpdate handler of menu item 1, I have tried to use "t_pMenu = pCmdUI->m_pMenu;", "t_pMenu =...
  12. How Can I Disable WM_CONTEXTMENU Handler of CEdit?

    Do I have create a new class inheriting CEdit?
  13. Re: CString::Format() Cannot Align Well Vertically

    Hello Friends,

    It's the font. After I changed the font to courier new, everything works.

    Thanks a lot for all the help.
    Brian
  14. Re: CString::Format() Cannot Align Well Vertically

    When I use printf(), there is no leading zero in the console output. I think the leading zero in the format string doesn't work since it is left justified.
  15. Re: CString::Format() Cannot Align Well Vertically

    I tried "%-07d%-20.3f%-07d%-20.3f%.3f\r\n" in GUI, and the problem is the same. The leading "0" doesn't make difference here.
  16. Re: CString::Format() Cannot Align Well Vertically

    In GUI, I use "\r\n" though.
  17. Re: CString::Format() Cannot Align Well Vertically

    Both give me the same result in GUI and console.
  18. Re: CString::Format() Cannot Align Well Vertically

    printf() works well.


    #include <stdio.h>

    int main()
    {

    printf("%-7s%-20s%-7s%-20s%s\n", "CalNo", "CalA (in)", "CalNo", "CalB (in)", "A+B (in)");
  19. CString::Format() Cannot Align Well Vertically

    Hi,

    I am trying to display some data in text format on a dialog and I am using a CString to do it. Below is how I coded it.



    CString outputStr;
    CString auxStr;

    // Add header
  20. Replies
    10
    Views
    447

    Re: Problem in Displaying Bit Values

    Thanks OReubens,

    Let's say our image only have 256 distinct colors (actually only 64 colors in our application). To use 16/24/32bit display, we just specify 256 colors in the BITMAPINFO color...
  21. Re: Why is CreateDIBSection() Failing in My Code?

    Hi OReubens,

    According to Petzold's book, we can create a dib section without a DC as long as we use DIB_RGB_COLORS.

    I think biBitCount = 8 specifies maximum numbers of the image to be 256...
  22. Replies
    10
    Views
    447

    Re: Problem in Displaying Bit Values

    I still don't understand why the color table of BITMAPINFO need to be specified. We already have the palette. Aren't the values pointed by pvBits immediately mapped to a color in the palette? ...
  23. Replies
    10
    Views
    447

    Re: Problem in Displaying Bit Values

    I figured out. I missed the initialization of the color table implemented by the following code.


    WORD* color = (WORD*) pbmiDIB->bmiColors;

    for (int i=0; i<256; i++) {
    *(color++) = i;
    ...
  24. Re: Why is CreateDIBSection() Failing in My Code?

    Ok. I found the reason. It's the parameters for CreateDIBSection(). Since the first paramter is NULL, I should use DIB_RGB_COLORS for the third parameter. Otherwise, I should provide something...
  25. Why is CreateDIBSection() Failing in My Code?

    Hello, below is a block of my code. I don't understand why CreateDIBSection() returns NULL. Thanks a lot in advance.


    pPackedDib = (BITMAPINFO *)(malloc (sizeof(BITMAPINFOHEADER) +...
Results 1 to 25 of 66
Page 1 of 3 1 2 3


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center