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

Search:

Type: Posts; User: FrOzeN89

Search: Search took 0.01 seconds.

  1. Re: [Concept] Automatically Attaching Objects to Parent Class

    Oh nice. I remember reading about how C++ gives no guarantees when it does something to code so I over-assumed that any hack-like stuff I do, such as relying on order-of-creation could be quite...
  2. [Concept] Automatically Attaching Objects to Parent Class

    In my program, I create controls by deriving base objects of them I've made. These controls are then are attached within the OnCreate() function via a method I've created.

    For example:

    class...
  3. Re: Smart Pointers / RAII / with Windows API like SendMessage

    Despite searching for a few hours before posting, naturally I find an answer 10 minutes later. Haha.

    This is the solution I came across, using a vector.

    My solution is now:

    std::wstring...
  4. Smart Pointers / RAII / with Windows API like SendMessage

    I'm writing code that requires me to pass a Buffer to Windows via SendMessage. I've been trying to ensure my app is RAII-compliant for good practice.

    In the current example I'm trying to write a...
  5. Replies
    2
    Views
    206

    Re: Member Function Delegate

    Thanks. I went with std::function. I overlooked that somehow. :p
  6. Replies
    2
    Views
    206

    Member Function Delegate

    Hi there,

    I'm trying to write a simple Delegate class with a Bind() and Invoke() function. For now it only needs to support a void class function with no parameters. I've searched around and found...
  7. Replies
    18
    Views
    1,431

    Re: Self-Deleting Objects with Inheritance

    Thanks for the replies!

    I've decided for the time being that I'm going to put this project design on hold, and focus on reading up on design patterns and looking into well-established wrappers...
  8. Replies
    18
    Views
    1,431

    Re: Self-Deleting Objects with Inheritance

    I just spent a while looking up as much RAII info as I could find, and then implemented an example of the std::shared_ptr. Though, this failed because the class isn't ready to be destroyed when the...
  9. Re: Compiler says there is no constructor, but it does have one.

    You need to place semicolons ' ; ' after your curly brackets ' { } ' inside your Idle class.
  10. Replies
    18
    Views
    1,431

    Re: Self-Deleting Objects with Inheritance

    First, before I get shot to pieces in regards to my "design pattern". Please understand all this is just me learning C++. I've only used it for less than 2 months and I accept that all my code for...
  11. Replies
    18
    Views
    1,431

    Self-Deleting Objects with Inheritance

    Hi there,

    I'm writing a bunch of classes like Form, Button, etc. All these are derived from a base Object class. I want to make these objects auto-delete, so I only have to declare the new...
  12. Replies
    0
    Views
    450

    Maximized MDI Window Title Bar Behaviour

    I'm writing an MDI Window and trying to get it's behaviour similar to what I thought was the default. I have attached two images as an example.

    The images on the left are examples of what I'm...
  13. Replies
    5
    Views
    1,242

    Re: Trouble with GetDIBits()

    Also, the fourth variable needs to be the image height (scanlines). So instead of:
    GetDIBits(MemDC,hBit,0,0,p,&bmi,DIB_RGB_COLORS); // IncorrectIt should be more like:...
  14. Replies
    5
    Views
    1,242

    Re: Trouble with GetDIBits()

    First, in your other thread COLORREF is 4-bytes, as it stores 32-bit values RGBA (RGB and Alpha for transparency). Both your examples declare 24-bit colour values, so you would need only 3-bytes per...
  15. Replies
    14
    Views
    955

    Re: Member function pointer assignment

    Yes, the function can be parsed into the constructor.


    class MyClass
    {
    typedef void(MyClass::*memFnPtr) ();

    public:
    MyClass(memFnPtr funcptr)
    : fnptr(funcptr)
  16. Replies
    6
    Views
    693

    Re: Creating a Property (Get/Set) Class

    Wow, thank you for all the input. I think I might stick to overloaded functions as I want to make my code relatively standard.

    The idea was so I could do things like Form.Width = 180, and it would...
  17. Replies
    6
    Views
    693

    Re: Creating a Property (Get/Set) Class

    I thought controlling public class variables would be quite common. Maybe I'm just too used to VB6 syntax. :sick:

    Is the standard for this type of use just to use the regular function overload...
  18. Replies
    6
    Views
    693

    Creating a Property (Get/Set) Class

    Hi there,

    I've just recently moved from Visual Basic 6 over to C++ and decided that I would try and write a class to mimic the Get/Set behavior seen in a variety of other programming languages. So...
Results 1 to 18 of 18


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center