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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
L

Larry J Siddens

@Larry J Siddens
About
Posts
116
Topics
22
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Access array data
    L Larry J Siddens

    In your last line: nom3ac = swt; You're setting the variable nom3ac to the address of the start of the array (or the address of swt[0].) Is this correct?

    Larry J. Siddens

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

  • Access array data
    L Larry J Siddens

    Yes. Say you have an array: int p[] = { 5, 4, 3, 2, 1 }; then to get the 3rd element use: int x = p[2]; This will set x to 3. Remember, arrays start at index 0 instead of 1. To loop through for( int 1 = 0; i < 5; i++ ) { x = p[i]; }

    Larry J. Siddens

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

  • Access array data
    L Larry J Siddens

    Without actually seeing your code and if you are using

    swt[0-16]

    Then the actual index into the array is -16.

    Larry J. Siddens

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

  • size of dialog in resource editor
    L Larry J Siddens

    Also, make sure that you have the whole dialog selected and not one of the controls. I have had many brain farts and not done this...

    Larry J. Siddens

    C / C++ / MFC c++ tutorial question learning

  • size of dialog in resource editor
    L Larry J Siddens

    When you have the dialog open, look down on the status bar. There are several sets of numbers. The right most is the size, the next to the left is the location.

    Larry J. Siddens

    C / C++ / MFC c++ tutorial question learning

  • Use object of an external class
    L Larry J Siddens

    If I under stand your question correctly, you have something like this...

    class MyClass
    {
    public:
    MyClass() { ... }
    ~MyClass() { ... }

    void myFunction( ... );
    int  getInt();
    void setInt( int x );
    

    private:
    int myInt;
    }

    And you have your .cpp file. Then you do something like this (different source file):

    #include "myClass.h"

    MyClass myObject;

    ... Other stuff...

    Then to have it global.

    #include "MyClass.h"

    extern MyClass myObject;

    Is this what your trying to do? Larry J. Siddens

    C / C++ / MFC c++ question

  • a
    L Larry J Siddens

    b Larry J. Siddens

    C / C++ / MFC

  • CDC::StartPage() and CDC::EndPage()
    L Larry J Siddens

    If I understand you correctly, you have a handle to a printer and want to use the CDC. Look at CDC::Attach(). This takes the handle (HDC) and attaches it to the CDC so you can use it just like any other CDC. When you get done, you can use the CDC::Detach(). Unless you wish the ~CDC() to close it for you. Hope this helps. Larry J. Siddens

    C / C++ / MFC help question career

  • CDC::StartPage() and CDC::EndPage()
    L Larry J Siddens

    You also need to do a CDC::StartDoc() which informs the device a new job is starting. Then you do a CDC::StartPage() which informs the device a new page is being printed. When don, you need to do an CDC::EndPage() for the end of a page and CDC::EndDoc() to inform the device that it has everything. Take a look at the MSDN CDC::StartDoc documentation. There is an example in there. Hope this helps. Larry J. Siddens

    C / C++ / MFC help question career

  • Transparent Ellipse
    L Larry J Siddens

    Try: pdc->SelectStockObject( NULL_BRUSH ); Larry J. Siddens

    C / C++ / MFC help

  • CString pre-pend
    L Larry J Siddens

    You can also use the Insert. Insert( int, PCXSTR ); Insert( int, XCHAR ); Example: CString test( "is a test" ); test.Insert( 0, "This " ); Larry J. Siddens

    C / C++ / MFC

  • virtual function override intended?
    L Larry J Siddens

    Email me your code (all that I need is for compiling) and I will take a look. Larry J. Siddens

    C / C++ / MFC question

  • virtual function override intended?
    L Larry J Siddens

    Try putting virtual in front of the declaration. EX: virtual BOOL Create(CWnd* pParentWnd, const RECT& rect, UINT nID, DWORD dwStyle /*=WS_VISIBLE*/, int nMinVal, int nMaxVal); Hope this helps. Larry J. Siddens

    C / C++ / MFC question

  • Excel Class Object in a C++ component
    L Larry J Siddens

    The Fun begins! LOL You need to use the Excel Object model. Search the MSDN for these KB's. KB309301 KB194906 KB308407 KB307473 Just to name a few. These should help get you started. You can also search on "Excel Object Model". Good Luck! Larry J. Siddens

    C / C++ / MFC question c++

  • how i can catch right button click on CButton ? (mfc)
    L Larry J Siddens

    Create a new class and inheriate the CButton class... class CMyButton : public CButton { . . . } Then capture on the WM_RBUTTONDOWN message. Using the wizard for VC6.0 and the properties for VS2003. In there do what you need to do. Hope this helps. Larry J. Siddens

    C / C++ / MFC c++ help question

  • Accessing the registry from a dll?
    L Larry J Siddens

    Take a look at the CRegKey class. Larry J. Siddens

    C / C++ / MFC question c++ windows-admin

  • ActiveX Spreadsheet Control Help
    L Larry J Siddens

    Hi Guys, Not sure if this is the best place to post this question, but I gotta start somewhere. Here at work, we are using an ActiveX Spreadsheet control, but I cannot seem to find any information on its interfaces and the like. Can someone point me in the direction of where I can get some information about this control. We are using C++/MFC on the VC++ 7.1 system. So, what ever version of the control comes with that setup. Much appericated. :-D Larry J. Siddens

    C / C++ / MFC c++ com help question announcement

  • Deloyment Question
    L Larry J Siddens

    I have a question about deployment of a C# application. I see in the MSDN how to create a shortcut to the desktop, but for the life of me, I cannot see how to setup the Start menu. Can anyone please point me into the right direction? Thanks Larry J. Siddens

    C# question csharp sysadmin tutorial workspace

  • Debugger problem
    L Larry J Siddens

    The only thing I can think of, which I bet you have tried. Rebuild the whole project. Larry J. Siddens

    C / C++ / MFC help debugging question

  • void main
    L Larry J Siddens

    Sounds like all you want to have is your app start once the linking processs has completed in the DevStudio. Correct? If so, then use the short cut Ctrl+F5 (unless it is mapped somewhere else). This compiles/links and then starts the app. Larry J. Siddens

    C / C++ / MFC c++ help question
  • Login

  • Don't have an account? Register

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