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

Search:

Type: Posts; User: pdk5

Page 1 of 21 1 2 3 4

Search: Search took 0.06 seconds.

  1. Replies
    1
    Views
    814

    const expr debug in visual studio

    Hello experts

    I found the workaround for this.

    VS still doesnot show the const expr local variables via debugger.

    Thanks
    pdk
  2. Replies
    1
    Views
    2,248

    MFC combox, user typed value

    Hello,

    Ive a legacy combobox of CBS_DROPDOWN type.

    And somehow, user typed value is not getting updated.

    I tried to write a small example code in VS2015, where, the event handler doesnot...
  3. Re: Number of leading zeros in binary representation of a number

    Thankyou Kaud, yes ie why I asked here, as I know this may be trivial. But you and this forum, just not solves them, and helps with lot of info.
    Thanks a lot again for your time and patience
  4. Re: Number of leading zeros in binary representation of a number

    Thankyou very much kaud for the reply and inputs . Helped me a lot.

    Yes, i found that solution is geeksforgeeks.

    Thankyou very much for the nice solution. We currently moved to visual studio...
  5. Re: Number of leading zeros in binary representation of a number

    Also i found an issue, if i pass "0", the while is infinite loop. May be for loop till the number of bits is better (which breaks, if "1" is encountered)
  6. Number of leading zeros in binary representation of a number

    Hello,

    I was trying solve the above problem. I came across a solution in the google:




    // C++ program of number of leading zeros in
    // binary representation of a given number
    #include...
  7. Thread: COM tutorial

    by pdk5
    Replies
    4
    Views
    2,473

    Re: COM tutorial

    Currently Im getting compile error, CLSID_AddObject not defined in the Exports.cpp file. :::

    I guess I know this answer, as I need to register the COM object.

    As per the instructions, the...
  8. Thread: COM tutorial

    by pdk5
    Replies
    4
    Views
    2,473

    Re: COM tutorial

    I found one issue and fixed it:
    In the AddObj.cpp, the static_cast target type was missing and I added the following and made that file compile.


    HRESULT __stdcall CAddObj::QueryInterface(
    ...
  9. Thread: COM tutorial

    by pdk5
    Replies
    4
    Views
    2,473

    Re: COM tutorial

    Thankyou very much Victor for looking into this.

    Yes, even i couldnot download them, as i mentioned in my post. So I tried to cut paste the code to my VS and compiled. I could use the MIDL, and...
  10. Thread: COM tutorial

    by pdk5
    Replies
    4
    Views
    2,473

    COM tutorial

    Hello All,
    I was trying to implement the following COM tutorial using the visual studio 2022.
    https://www.codeguru.com/soap/step-by-step-com-tutorial/#Intro

    But getting some issues.
    Also the ...
  11. Replies
    1
    Views
    2,384

    DrawText MFC formatting

    Hello,

    The DrawText related q's !. With the help from this forum, i had got things working ok :). Thankyou very much :)
    I am removing the code as I got soln myself and as the code may be...
  12. Replies
    1
    Views
    2,327

    Re: DrawText - Problem with background color

    Btw, Now the background color changes for the entire rectangle with the followig code change.




    void EmfCellListRend::DrawRectangle(EmfCellListRendDrawingParams* pParams, TDC& dc,...
  13. Replies
    1
    Views
    2,327

    DrawText - Problem with background color

    Hello,

    I have the following code:
    I am trying to change the background colour for the rectangle (of the DrawText), but the background colour only comes when there is text in the rectangle.


    ...
  14. Thread: Help with mfc

    by pdk5
    Replies
    28
    Views
    8,489

    Re: Help with mfc

    @ovidiucucu : Thankyou very much for the comments . You being expert in this area, felt so bad about legacy code, you can think of my situation :cry:
    I will add a new topic for this issue :)
    ...
  15. Thread: Help with mfc

    by pdk5
    Replies
    28
    Views
    8,489

    Re: Help with mfc

    @ovidiucucu : Thankyou very much. I will go through this and try this idea. Just wanted to say, thankyou very much for your valuable time and patience in helping me. Really appreciated
  16. Thread: Help with mfc

    by pdk5
    Replies
    28
    Views
    8,489

    Re: Help with mfc

    @ovidiucucu : Thankyou very much for the help. And yes, the help with the book, which i will try to read.
    @kaud : Thanks for the help and reference books.

    Btw, sorry for the delay.
    I am yet to...
  17. Thread: Help with mfc

    by pdk5
    Replies
    28
    Views
    8,489

    Re: Help with mfc

    Thankyou very much kaud, ill check..

    I also need to make sure the co-ordinates need to match the screen co-ordinates :confused:
  18. Thread: Help with mfc

    by pdk5
    Replies
    28
    Views
    8,489

    Re: Help with mfc

    Sorry, but I actually donot understand the legacy concepts .. (but i was told, some code, still inherits from owl :confused: ).

    Btw, now i am trying to see if i can use the ScreenToClient to move...
  19. Thread: Help with mfc

    by pdk5
    Replies
    28
    Views
    8,489

    Re: Help with mfc

    Btw, Im trying to position the rectangle, on parent dialog at the top right. Then the issue is , i donot know the size of parent dialog. :mad:

    36062
  20. Thread: Help with mfc

    by pdk5
    Replies
    28
    Views
    8,489

    Re: Help with mfc

    Thankyou kaud :)
    Were using visual studio . Mostly MFC, but there is legacy owl still there. Not sure how VS handles that :)
  21. Thread: Help with mfc

    by pdk5
    Replies
    28
    Views
    8,489

    Re: Help with mfc

    Thankyou very much. (somehow my email is getting filled with spam and not getting notify when there is response, i need to sort that out.) sorry for the delay.

    ovidiucucu : I tried the new font...
  22. Thread: Help with mfc

    by pdk5
    Replies
    28
    Views
    8,489

    Re: Help with mfc

    @ ovidiucucu, Victor Or Arjay, could you please help with how to convert the owl context TDC to MFC drawing context. The above code doesnot change the font.
  23. Thread: Help with mfc

    by pdk5
    Replies
    28
    Views
    8,489

    Re: Help with mfc

    I tried to the following way : But it didnot work ( means font remained unchanged)



    void EmfCellListRend::DrawRectangle(EmfCellListRendDrawingParams* pParams, TDC& dc, CEmfCellList...
  24. Thread: Help with mfc

    by pdk5
    Replies
    28
    Views
    8,489

    Re: Help with mfc

    Thankyou very much Victor. I tried to extract the HDC from the owl context.

    But somehow it doesnot work



    HDC hdc = dc.GetHDC();
    CFont* pCurrent = hdc.GetCurrentFont();

    LOGFONT lf ;
  25. Thread: Help with mfc

    by pdk5
    Replies
    28
    Views
    8,489

    Re: Help with mfc

    @ovidiucucu : Thankyou very much. Sorry i missed the above post.

    Btw, I had my drawtext working with the following code:



    void EmfCellListRend::DrawRectangle(EmfCellListRendDrawingParams*...
Results 1 to 25 of 502
Page 1 of 21 1 2 3 4





Click Here to Expand Forum to Full Width

Featured