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
J

JoneLe86

@JoneLe86
About
Posts
27
Topics
12
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • does listivew_???? make handles leak...?
    J JoneLe86

    I am dealing with tons of functions, and i am using sendmessage and other macros as well, but somehow each time i use sendmessage the handles in taskmanger get increased, even using createfont as this

    Hfont = createfont(.....)
    deleteobject(Hfont)

    but as i know deleteobject will delete the Gdi object, but what abut its handle? I am not sure why this happens, even this

    listview_setitemcount(.....)

    bty I am destroying my HWND object each time i use X button, so i make a new one (I have no problem with Gdi they all fine) except those handles? has anyone faced this? Update; now 100% sure that using sendmessage(....) increasing my handles 1 time, but why?

    C / C++ / MFC graphics help question announcement

  • how to lock function?
    J JoneLe86

    i can lock a thread, but how about single function? int Func(int par) just want to lock it so other function do not call it until it finish, is that possible?

    C / C++ / MFC tutorial question

  • listview with tooltip
    J JoneLe86

    hello, I found out that listview has tooltip (duaaaaaa) http://blogs.msdn.com/b/alexdan/archive/2006/05/16/adding-tooltips-to-a-list-view-control.aspx[^] but how in the world it works? my listview is ONWERDRAW and extended styles lVS_EX_INFOTIP | LVS_EX_LABLETIP, I have been told that I will get an LVN_GETINFOTIP notification, which i do not get it at all, my questions are (Did i miss something?) and (How that tooltip works? I mean does it work when i leave the arrow of item or what?) there are some articles but they did not explain that working with API and C++ nothing else thank

    C / C++ / MFC c++ wpf com json question

  • 1-Can I reverse drawtext function? 2-How to know the length of data in your app
    J JoneLe86

    about the 2 question.. Yes i did mean that, but what if i want the size of written code inside a section? not the size of the section.. it's oky even if it before loading to the memory... basically not the extra 0000 in the size just the raw code.... this what i am trying to find out...?

    C / C++ / MFC tutorial question

  • How to get text of special symbol font?
    J JoneLe86

    just wondering A or W? the third parameter (LPSTR) or (LPWSTR) check that out...

    C / C++ / MFC tutorial question

  • 1-Can I reverse drawtext function? 2-How to know the length of data in your app
    J JoneLe86

    Hello amazing people, just have 2 questions 1- assuming I use Drawtext to output a text on HDC, is it possible to reverse that? i meant get that text which i drawn from HDC not from the buffer? 2- How in the world we know the length of executed code in an app? is it SizeOfRawData or what/? I know how to use DOS header and the NTheader.. but i still do not know the length exactly, it seems that it's different if do calculation, I am sure that i did it wrong.... Thanks...

    C / C++ / MFC tutorial question

  • What does (need to clear the background) mean?
    J JoneLe86

    OMG man (After all that Time) I finally got what I am looking for thanks so much.. those info helped me a lot :thumbsup::thumbsup::thumbsup::thumbsup::thumbsup:

    C / C++ / MFC help question com tutorial lounge

  • Real Problem in Listview dealing with tons of data
    J JoneLe86

    I will check that Out, thanks for those links :)

    C / C++ / MFC help question com graphics data-structures

  • Real Problem in Listview dealing with tons of data
    J JoneLe86

    Thanks A lot :) I did that...

    C / C++ / MFC help question com graphics data-structures

  • Real Problem in Listview dealing with tons of data
    J JoneLe86

    i did not even think about that?!!! the thing is as soon as my program rich 10000 objects then that bug appears so, and if i am not wrong i remember that win7 it's 10000 as default so, by increasing that it will fix it 100%, which can be done from the registry thanks I really appreciate that, and i do like this site better than stackoverflow, since they think that they are the best and as soon as you ask question they consider you as a jerk (down vote) anyway thanks a lot....

    C / C++ / MFC help question com graphics data-structures

  • Real Problem in Listview dealing with tons of data
    J JoneLe86

    Question has been solved Thanks everyone for those comments :) it helped me a lot, I am considering users here asthe most amazing users ever! :thumbsup::thumbsup::thumbsup::thumbsup::thumbsup: oky I have a list view (using MDI also) and I am drawing everything from scratch, everything works amazingly, but recently when i tried to print tons of data, i the list went crazy, and it seems the whole app went crazy not just the listview, I tried to disable all the features in my app and that bug still there basically the program has a highlight row and that row in blue, that bug changes it to another color, and i cannot use the editing text method and when I minimize the list, it does not come back, as if the whole program got busted? bty, its not form custom draw cuz i did check every single line... http://oi43.tinypic.com/25zibrl.jpg[^] what made it weird that even the menu went black? i am sure that if it a listview problem it wont change the menu color?? is the listview has a specific stack size or heap size in onwerdata? i dunno what i am saying but the list works fine in some cases except when i deal with more data, any ideas why that happens? :( edit1: I tried update the whole list with the whole program and nothing happened (if it paints issues redrawing the whole app will help but did not work here?) edit2: some has almost same problem and he wrote (I am using a CListView in my application. When I run the application and it gets a lot of items in it's CListView (3 or 4 thousand at least) the application's windows go all stange. From then after all Menus in all applications (including taskbar and desktop menus) are displayed with black bars over most of their items, moving the mouse down over them removes most of the black bars. Thanks for any help.) but no one answered him?

    C / C++ / MFC help question com graphics data-structures

  • get the function address from it's name using IMAGE_IMPORT_DESCRIPTOR
    J JoneLe86

    :thumbsup: thanks

    C / C++ / MFC performance question

  • get the function address from it's name using IMAGE_IMPORT_DESCRIPTOR
    J JoneLe86

    I can get the linked functions in any file by using IMAGE_IMPORT_DESCRIPTOR, but how in this world I can get their addresses? Assuming AddAtomA is the target .... Asm code: (jmp dword ptr ds:004050b8)in memory address of 004050b8 is 779B9EB8 which is function AddAtomA so is there any way to show the AddAtomA address while using IMAGE_IMPORT_DESCRIPTOR or showing the place where it will be called in the program?

    C / C++ / MFC performance question

  • What does (need to clear the background) mean?
    J JoneLe86

    Thanks for this info.. You must fill the cell rect with the background color before drawing the text. SetBkColor(lpCD->nmcd.hdc, GetBkColor()); ExtTextOut(lpCD->nmcd.hdc, 0, 0, ETO_OPAQUE, &iR, NULL, 0, NULL); but may function looks like this fillrect(); //i am using this to fill out the specific rect settextcolor(); //then I set the text color Drawtext() //then I draw the text (1) if use ExtTextOut then there is no need to drawtext? ExtTextOut(lpCD->nmcd.hdc, 0, 0, ETO_OPAQUE, &iR, Buffer, strlen(Buffer), NULL); (2) i used SetBkColor(lpCD->nmcd.hdc, GetBkColor(..)); nothing happened, i do not set a bk color in my listview, i did set a row color manually... so If I do SetBkColor(lpCD->nmcd.hdc, RGB(255,0,0)); the whole list bk changed to red? maybe the method i use is wrong..

    C / C++ / MFC help question com tutorial lounge

  • What does (need to clear the background) mean?
    J JoneLe86

    thanks for this info... do you know what I should do? i still do get what i want, the more i click on them the more bold the become.....

    C / C++ / MFC help question com tutorial lounge

  • What does (need to clear the background) mean?
    J JoneLe86

    cuz I am coloring those buffers?!

    C / C++ / MFC help question com tutorial lounge

  • How to use listview_insertgroup with custom draw?
    J JoneLe86

    thanks Richard MacCutchan for your replay,,, it seems that there are some ways Undocumented List View Features[^] which are not documented

    C / C++ / MFC c++ tutorial php question

  • What does (need to clear the background) mean?
    J JoneLe86

    here is the question I did ask before: I have a listview REPORT with fullrowselect style everything works fine, but after i used customdraw I faced a problem such pic included, it seems I click on the item col 3 it becomes bold and more bold.. Picture[^] if i use listview_update the bold text from the col 3 will be gone so why happens? and i just want to click on the raw without having that bold problem? any ideas? The Code

    if (lpNMHdr->code == NM_CUSTOMDRAW)
    {
    LPNMLVCUSTOMDRAW lpCD = (LPNMLVCUSTOMDRAW)lpNMHdr;
    if (lpCD->nmcd.dwDrawStage == CDDS_PREPAINT)
    {
    return CDRF_NOTIFYITEMDRAW;
    }

    if (lpCD->nmcd.dwDrawStage == CDDS\_ITEMPREPAINT)
    {
        return CDRF\_NOTIFYSUBITEMDRAW;
    }
    
    if (lpCD->nmcd.dwDrawStage == (CDDS\_ITEMPREPAINT|CDDS\_SUBITEM))
    {
        if (lpCD->iSubItem == 0) //detect which subitem is being drawn
        {
            LPCTSTR lpcszBuf1 = \_T("example");
            LPCTSTR lpcszBuf2 = \_T("text");
    
            RECT iR = { 0 };
            ListView\_GetSubItemRect(lpCD->nmcd.hdr.hwndFrom, lpCD->nmcd.dwItemSpec, lpCD->iSubItem, LVIR\_BOUNDS, &iR);
    
            SetBkMode(lpCD->nmcd.hdc, TRANSPARENT);
    
            SIZE sz = { 0 };
            GetTextExtentPoint32(lpCD->nmcd.hdc, lpcszBuf1, 7, &sz);
    
            SetTextColor(lpCD->nmcd.hdc, RGB(255, 0, 0));                   
            DrawText(lpCD->nmcd.hdc, lpcszBuf1, -1, &iR, DT\_LEFT);
    
            iR.left += sz.cx;
    
            SetTextColor(lpCD->nmcd.hdc, RGB(0, 255, 0));                   
            DrawText(lpCD->nmcd.hdc, lpcszBuf2, -1, &iR, DT\_LEFT);                  
    
            return CDRF\_SKIPDEFAULT;
        }
    }
    

    So someone answered me: If you draw it yourself you need to clear the background as well, which you are not doing. Try using OPAQUE instead of TRANSPARENT. However, I used OPAQUE but it does not help a lot so, I am trying now with clear the background: the message is wm_ERASEBACKGROUND but what I suppose to do? should I add the code there or what?

    C / C++ / MFC help question com tutorial lounge

  • How to use listview_insertgroup with custom draw?
    J JoneLe86

    I have a listview with custom draw (virtual list)option and i know how to output the items using drawtext() function, but what about the groups? I have googled but Int find anything, all the examples are MFC or without custom draw?! I just want a native example or method about that thanks edit.. you got to be kidding with me?! I found a comment in says it impossible LOL http://windows-tech.info/14/45a29ec939d2ff8f.php[^] is that true?

    C / C++ / MFC c++ tutorial php question

  • Tab control with custom draw?
    J JoneLe86

    I want to make the flat control (2D look) instead of (3D), I can draw a rectangle or changing the color using custom draw

    (DRAWITEMSTRUCT)

    but the changes behind the tab as the picture below, the black is my rectangle http://social.msdn.microsoft.com/Forums/getfile/305523[Tab control 1 ] I have changed my rectangle to OPAQUE but still the same thing By the way the whole tab has that (3D), I have no idea why?? http://social.msdn.microsoft.com/Forums/getfile/305526[Tab control 2] Can I remove that 3D look from the tab control? And if the DRAWCUSTOM should deal with that Why my rectangle behind the tab it supposed to be on it for covering that tab? Edit: using

    TCS_faltbutton

    and

    TCS_BUTTONS

    does not solve this

    C / C++ / MFC com question lounge
  • Login

  • Don't have an account? Register

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