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

Search:

Type: Posts; User: Helmut Danzl

Page 1 of 2 1 2

Search: Search took 0.03 seconds.

  1. Replies
    4
    Views
    1,054

    This example is wrong because a Unicode character...

    This example is wrong because a Unicode character array and a BSTR are not the same thing!!!

    A BSTR is a pointer to the beginning of the unicode character array but it is preceded by a 4-byte...
  2. Replies
    13
    Views
    2,007

    Yes, you can use CDatabase::SetQueryTimeout (or...

    Yes, you can use CDatabase::SetQueryTimeout (or CDaoDatabase::SetQueryTimeout to set the number of seconds to allow before a query attempt times out.

    Even if it is not stated explicitly in the...
  3. Shouldn't it be for(it = pList->begin(); it !=...

    Shouldn't it be
    for(it = pList->begin(); it != pList->end(); it++ /* not ++it */) ??

    I think your loop is running beyond the list because you are using a pre-increment operator.
    Now it is more...
  4. Replies
    4
    Views
    820

    I'm quite sure that the way is correct. You only...

    I'm quite sure that the way is correct. You only have to play with your parameters in FindResource.
    You have inserted a custom resource and gave it a name, right.
    Use this name as second parameter...
  5. Replies
    2
    Views
    1,132

    Use GetParentFrame() to obtain the CWnd* pointer...

    Use GetParentFrame() to obtain the CWnd* pointer of your MDI-frame and call GetMenu() on this window.
  6. The documentation of the OPENFILENAME structure...

    The documentation of the OPENFILENAME structure says for the lpstrFile member:
    "If the buffer is too small, the function [GetOpenFileName] returns FALSE and the CommDlgExtendedError function returns...
  7. Replies
    4
    Views
    820

    Use FindResource or FindResourceEx to obtain a...

    Use FindResource or FindResourceEx to obtain a handle of your resource, then LoadResource and LockResource.
    The last method gives you a void* to your resource data.
  8. Replies
    1
    Views
    565

    ModifyStyle is declared as BOOL ModifyStyle(...

    ModifyStyle is declared as
    BOOL ModifyStyle( DWORD dwRemove, DWORD dwAdd, UINT nFlags = 0 );

    So if you want to remove the maximize/minimize box you have to exchange your parameters.

    There is...
  9. COM is based on RPC and RPC requires marshalling...

    COM is based on RPC and RPC requires marshalling and unmarshalling of function parameters from the caller to the callee and back.
    So COM has build in support to marshall standard data types but if...
  10. Replies
    2
    Views
    610

    I believe the problem is that you are using MAPI...

    I believe the problem is that you are using MAPI which requires a MAPI provider (usually the e-mail client installed on your system like Outlook, ...).
    So you always have to cope with the behaviour...
  11. Replies
    1
    Views
    1,269

    Completely rebuild your project (menu Build -...

    Completely rebuild your project (menu Build - Rebuild all)

    or

    delete all your files in the Debug/Release subdirectory
  12. Use WM_KEYUP and VK_SNAPSHOT: BOOL...

    Use WM_KEYUP and VK_SNAPSHOT:

    BOOL CxxxView::PreTranslateMessage(MSG* pMsg)
    {
    if (pMsg->message == WM_KEYUP && pMsg->wParam == VK_SNAPSHOT)
    ...
    }

    I used Spy++ to find out which message are...
  13. Replies
    2
    Views
    569

    Is it true that your are asking what data type to...

    Is it true that your are asking what data type to use?

    If yes then use char or unsigned char; __int8 is also a valid type name which is recognized by VC++. These datatypes occupy 1 byte and...
  14. Replies
    2
    Views
    640

    Hi, you have to subclass your edit control: ...

    Hi,

    you have to subclass your edit control:

    - Declare a new class which inherits from CEdit.
    class CMyEdit : public CEdit {
    ...
    };

    - Declare a member variable m_myEdit of class CMyEdit in...
  15. Well, you have many user input which gives a list...

    Well, you have many user input which gives a list like this:

    Timestamp of user input -> Reminder timespan
    -----------------------------------------------------
    9/1/02 10:00:00 -> 5 minutes...
  16. Replies
    3
    Views
    680

    Change the style before the window becomes...

    Change the style before the window becomes created by overriding the virtual PreCreateWindow function:

    BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
    {
    if( !CFrameWnd::PreCreateWindow(cs) )...
  17. Hi, you should be aware that...

    Hi,

    you should be aware that SHGetSpecialFolderPath may not be available on every system - especially on older systems.
    The function has also be superseded by ShGetFolderPath with comes with the...
  18. Replies
    1
    Views
    526

    Have you tried SetForegroundWindow (applies only...

    Have you tried SetForegroundWindow (applies only to top-level windows)?

    Helmut
  19. Replies
    2
    Views
    603

    Hi, since your application object is a global...

    Hi,

    since your application object is a global variable you can make an "extern" declaration.

    But you can also use the AfxGetApp() function.

    Helmut
  20. Hi, there are other ways to get the main...

    Hi,

    there are other ways to get the main window:

    First there is the function AfxGetMainWnd().

    Then there is a nice article in MSDN which describes the "Relationships Among MFC Objects" (you...
  21. Replies
    3
    Views
    680

    Hi, there is a better way than handling the...

    Hi,

    there is a better way than handling the WM_SIZE message -handle WM_GETMINMAXINFO instead:

    void CMainFrame::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI)
    {
    lpMMI->ptMinTrackSize = CPoint(200,...
  22. Replies
    9
    Views
    1,695

    Sorry, I can't believe that your program just...

    Sorry, I can't believe that your program just "dies".
    If you have enclosed every smart pointer operation into a try - catch block you should get an exception.

    Please send your source code or a...
  23. Thread: vb -> C++

    by Helmut Danzl
    Replies
    2
    Views
    738

    What is the type of your pComputer / pGroup...

    What is the type of your pComputer / pGroup variable?

    Helmut
  24. Replies
    35
    Views
    5,170

    Hi fongjeffrey, you can do the same thing with...

    Hi fongjeffrey,

    you can do the same thing with COM and - as I believe - in a much more elegant and efficient way.
    Just write a small ATL COM object and declare the class factory as singleton. And...
  25. Replies
    10
    Views
    1,574

    There is a lot of work done in CString::GetBuffer...

    There is a lot of work done in CString::GetBuffer and CString::ReleaseBuffer.
    So if you don't want to loose any performance then casting is the fastest solution.
    Besides there is no drawback with...
Results 1 to 25 of 48
Page 1 of 2 1 2





Click Here to Expand Forum to Full Width

Featured