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

Search:

Type: Posts; User: Dang.D.Khanh

Page 1 of 3 1 2 3

Search: Search took 0.08 seconds.

  1. Replies
    2
    Views
    5,783

    How to expand dropdownlist?

    Hi,
    During using owndraw with has string property, my combobox cannot expand.
    How can I fix this?


    Thanks you!
  2. Replies
    4
    Views
    4,227

    Re: Why Creatfont not working?

    Hi Sir,
    You can see I'm getting ideas from that post.
    The usage function are all there.

    CreateFont
    GetTextExtentPoint32
    DrawText
    I have used CFont instead of HFONT because result has not...
  3. Replies
    5
    Views
    4,444

    Re: How to get worksheet name?

    Thanks sir, I will keep it in mind. :(
  4. Replies
    4
    Views
    4,227

    Re: Why Creatfont not working?

    Hi Sir,
    I want to calculate the width of a string, the above code is what I have from this post.

    From h=11point I switch to 14.5pixel and calculate the width like the code, the problem is...
  5. Replies
    4
    Views
    4,227

    Why Creatfont not working?

    Hi,
    I'm using the font Calibri,
    I need to calculated fontwidth of CString L"testtextwidth" from the fontsize 14.5 and 16

    I used the Createfont function as follows:



    //initialize
    HDC hDC...
  6. Replies
    5
    Views
    4,444

    Re: How to get worksheet name?

    Hi Sirs,
    this code: hr = pDisp->GetIDsOfNames return S_OK,
    I checked but there is no more information to see in IDispatch, debugging is quite difficult.
    So maybe I should go back to MFC, I'll try...
  7. Replies
    5
    Views
    4,444

    How to get worksheet name?

    Hi,
    I'm having trouble locating the worksheet name ,
    My code uses as following:


    IDispatch* xlSheet; //<--get xlSheet ok

    VARIANT result4;
    VariantInit(&result4);
    ...
  8. Replies
    8
    Views
    5,028

    Re: How to kill Excel process?

    Thanks sir, I think it is a solution that works in most cases.
    my problem is solved .
  9. Replies
    4
    Views
    3,739

    Re: How to avoid Titlebar flicker?

    Thanks sir, I got it.
    so i will remove this function in my code.
  10. Replies
    4
    Views
    3,739

    Re: How to avoid Titlebar flicker?

    Hi Sir, I have updated the post.
    by Moving the focus through apps make titlebar's form flickering.

    Can I disable this?
  11. Replies
    4
    Views
    3,739

    How to avoid Titlebar flicker?

    Hi,
    In the the my code,from MFC form, I call the ::Setfocus(hwnd) function to focus another windows application only once.
    then i setfocus back to my MFC form.

    my code like this:

    HWND...
  12. Replies
    8
    Views
    5,028

    Re: How to kill Excel process?

    I'm using the code from this post,
    From old posts I see it's name is CreateDispatch but when I use it I see only name CreateInstance.

    I'm trying this answer, it might help me
  13. Replies
    8
    Views
    5,028

    Re: How to kill Excel process?

    Hi Sir,
    I'm using CreateInstance function from automate.
    I'm still investigating it. for the time being, I will monitor taskmanager and end this task manually if I get this case.
  14. Replies
    8
    Views
    5,028

    Re: How to kill Excel process?

    Thanks Sir,
    I'm trying your suggestion.
  15. Replies
    8
    Views
    5,028

    How to kill Excel process?

    Hi,
    I'm doing an action in first debug like this:
    1, Create excel instance.
    2, During debugging, turn it off suddenly.
    In some case, this processes still run in background,
    so when i use...
  16. Re: How to set excel column width?

    Hi,
    I'm missing the pixel factor. problem solved
  17. [RESOLVED] How to set excel column width?

    I have searched and used some formula: ClientToScreen,.. to find CPoint.
    My result:


    CPoint cp1 ;x-y (314;448)
    CPoint cp2 ;x-y (802;448)

    from this, Can I draw the CPoint on the screen to...
  18. Re: Problem with vector?

    Hi Sir,
    my problem is probably by 2 projects setting different (maybe the wizard changed it without me knowing).
    after matching MD and MDd now it works as i expected !.
  19. Re: Problem with vector?

    Hi Sir,
    I'm not sure but the class myclass is declared and implemented in another library .dll with dllexport,
    If I use this class in the same calling project the code runs fine.

    Can I use it as...
  20. Re: Problem with vector?

    Thanks sirs.
    I'll check it again.
  21. Re: Problem with vector?

    Hi,
    I'm using vs2019 -vs16.10
    Tried declaring 2D vector bounds but still can't pass function

    //setbound vector 12x3
    vector<vector<properties>> vr{rows, vector<properties>(cols) }; //properites...
  22. Re: Problem with vector?

    Hi Sir,
    This vector will be 12x3(rows/columns) after emplaceback .

    35994

    When I debug, this param always initializes a lot of elements like the following image.

    35995

    35996
  23. Re: Problem with vector?

    Hi,
    When I debug myfunction, the vector is automatically initialized like this image
    Is this a problem?

    35990
  24. [RESOLVED] Problem with vector?

    Hi,
    This problem took me a long time to fix but it didn't work ..
    I have a functions like this:


    struct ST1 //define global outsize class;
    {
    ///...int,bool,..
    CString abc = L"";
    ...
  25. Replies
    3
    Views
    4,378

    Re: How to initialize variant?

    Hi Sirs,

    I mistyped "," by "." but it doesn't work because of this error.

    35986

    but when Changing the type to avoid duplicate or using struct both works fine for me now.

    Thanks for...
Results 1 to 25 of 51
Page 1 of 3 1 2 3





Click Here to Expand Forum to Full Width

Featured