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

Search:

Type: Posts; User: GCDEF

Page 1 of 80 1 2 3 4

Search: Search took 0.21 seconds.

  1. Replies
    5
    Views
    291

    Re: pass structure as array

    Why not define it with the correct parameter type? You could cast the unsigned char* to your struct, but that's not a good coding habit to get into.
  2. Re: Using command line to open the same application but different file

    Why use the command line to do that? As you've noticed, the command line will invoke another instance.
  3. Re: Using command line to open the same application but different file

    The default MFC code will do what you want without any extra coding on your part. Whatever you have changed, try removing it and using the default code.
  4. Replies
    25
    Views
    789

    Re: Stuck on one part of code.

    You should fix the broken stuff before adding more code. Just about any experienced programmer writes and debugs very small sections of code before moving on. As has been mentioned, your input...
  5. Replies
    25
    Views
    789

    Re: Stuck on one part of code.

    3 is greater than 2. 4 is greater than 3. You could gather all your inputs then grade all 10, or exit after three mistakes. That's a design choice that's up to you.

    As 2kaud mentioned, your...
  6. Re: Assignment due in 1 day (Not showing valid) ISBN errors also.

    You don't have any code that would validate the number. Have you been given an algorithm do to it?

    Please be a bit more specific about what's wrong.
  7. Re: Issues drawing background bitmap in edit box common control

    Here's code from one of my apps that works.
    m_pBkBrush is a member of my view class and is created in the view's constructor like this.

    m_pBkBrush = new CBrush(RGB(192, 192, 192));


    ...
  8. Re: Issues drawing background bitmap in edit box common control

    I'd try something like this


    HBRUSH CMyDialog::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
    {
    if(pWnd->GetDlgCtrlID() == edt1.GetDlgCtrlID())
    {
    pDC->SetBkMode(TRANSPARENT);...
  9. Replies
    10
    Views
    408

    Re: Retrieve dailog object in document class

    Am I talking to myself here. YOU"RE DOING IT BACKWARDS. Sheesh. If you ask for help, you should at least pay attention to those that are helping you.
  10. Replies
    10
    Views
    408

    Re: Retrieve dailog object in document class

    Did you read what I wrote? Get the document object from inside the dialog. Not the way you're doing it.
  11. Replies
    10
    Views
    408

    Re: Retrieve dailog object in document class

    That is bad design. You should get the document from the dialog. CDocuments shouldn't know anything about views or dialogs. They're for data.
  12. Re: What will happen if I brutally force to stop an application when ptrs are smart

    The Operating System will free memory owned by the application when it terminates, gracefully or otherwise.
  13. Replies
    3
    Views
    1,490

    Re: How can I delete CRichEditCtrl?

    Almost 17 years. That's got to be a record.
  14. Thread: File Exception

    by GCDEF
    Replies
    4
    Views
    318

    Re: File Exception

    No way to tell from what you posted. Press the break button and examine the state of the variables in the stack leading up to the exception. That should help you find out where you went wrong.
  15. Replies
    5
    Views
    479

    Re: passing on a variable at runtime

    Although they're usually frowned upon, you could use a global variable, or you could just pass it as an argument to functions that need it.
  16. Re: Stuck in my project:Fill the ship with products in c++ (max efficiency)

    Start by researching the bin packing or best fit algorithms.
  17. Re: How can I construct a timeout exception in C++?

    Get the current time when you enter the function. Check the current time in your loop in function. See how much time has elapsed. Throw an exception. Am I missing something?
  18. Re: Debug Error? Code runs fine in web based compilers but not in VS alphabet pyramid

    What does the debugger show you the values are? I think you'll find p is not what you're expecting.

    FWIW, using meaningful variable names makes your code much easier to understand.
  19. Replies
    4
    Views
    418

    Re: help in identifying the crash

    Again, there's really nothing we can help you with there. It's telling you there's something wrong with PublicIdInfo's destructor. Run it in the debugger and find out what.
  20. Replies
    4
    Views
    418

    Re: help in identifying the crash

    Not much anybody can do with that code. Try the debugger.
  21. Thread: Classes

    by GCDEF
    Replies
    18
    Views
    1,276

    Re: Classes

    It seems you're unclear on the difference between classes and objects. Think of classes as something like a blueprint for an object. They tell the compiler what your object is and what it can do,...
  22. Replies
    3
    Views
    301

    Re: Help reading txt in a linked list

    That's more code than I feel like wading through, but did you try the debugger?
  23. Thread: Output

    by GCDEF
    Replies
    1
    Views
    210

    Re: Output

    Did you have a question, or are you just practicing copying and pasting?
  24. Replies
    4
    Views
    369

    Re: Little problem with random numbers (BASIC)

    The semi-colon after if (menu == 1) essentially means the if statement will be ignored and you'll perform addition unconditionally.

    You're prompting for two numbers, random and second. You...
  25. Thread: For/if

    by GCDEF
    Replies
    4
    Views
    428

    Re: For/if

    I've already explained why. The second statement following your if will execute regardless whether the if statement evaluates true or false. Indentation is only for readability. It has no effect...
Results 1 to 25 of 2000
Page 1 of 80 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This a Codeguru.com survey!


HTML5 Development Center