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

Search:

Type: Posts; User: srelu

Page 1 of 25 1 2 3 4

Search: Search took 0.07 seconds.

  1. Replies
    1
    Views
    1,781

    Re: Moving paint object with keyboard input

    I'll explain what you need to do if the user presses the "right arrow" key. For the other keys you'll need a similar approach.

    1. You need a variable to store the current value of the position of...
  2. Replies
    15
    Views
    3,433

    Re: Strings in VC++ 6

    The condition

    findData.dwFileAttributes == FILE_ATTRIBUTE_DIRECTORYis not good since dwFileAttributes holds more than just one flag. Mask the other flags with logical "and" to get only the flag...
  3. Replies
    8
    Views
    2,954

    Re: Why is winapi so messy?

    Fully agree. It would be great if during the installation of Windows we would be able to pick one of the three options:
    -I'm a novice
    -I'm an average user
    -I'm an IT specialist

    Thanks God (and...
  4. Replies
    11
    Views
    4,672

    Re: Get Monitor Resolution

    The MSDN site is somehow confusing, take an excerpt from the MSDN that came with VS6:


    This function targets PHYSICAL DEVICES.
    You should try it first.
  5. Replies
    11
    Views
    4,672

    Re: Get Monitor Resolution

    GetDeviceCaps
  6. Re: 0xC015000F: The activation context being deactivated is not the most recently act

    I encountered several times that error. It is caused by a bug in your application. You made some sort of mistake in one of the source files, more precisely in ANOTHER FILE THAN THE FILE WHERE THE...
  7. Re: Break down word into 4 bytes using shift and mask

    Your code looks ok if you add masking.

    A WORD has only two bytes, you cannot break it into four. You need a DWORD to have four bytes.

    BTW, take a look at the following macros:
    LOWORD,...
  8. Re: Problem when invoking a modeless dialog from a property page

    Most likely you store the dialog's window handle (or the CDialog object if you use MFC) in a variable that is a local variable to the property page. When the property page is closed, all its local...
  9. Replies
    5
    Views
    1,562

    Re: visible region of control

    Loop through all the points of your control and call WindowFromPoint for each. You'll get the handles of all the windows that overlap your control. Subsequently substract all the regions of those...
  10. Replies
    30
    Views
    3,932

    Re: Working with a database

    Form what you wrote, I assumed that the declaration of your function is:

    std::string MyFunction();
    It seems I was wrong. Please specify the right declaration.
  11. Replies
    30
    Views
    3,932

    Re: Working with a database

    For the first ideea, the answer is no. That's because the name of a function is not a string. From the programmer's perspective it looks like a text but from the compiler's perspective it's just the...
  12. Replies
    30
    Views
    3,932

    Re: Working with a database

    In order to use databases you need a database engine or a full database server. There are some for free.
    Engines: MS Access Jet engine, MSDE.
    Full servers: MS SQL 2005 Express Edition, MySql.
    ...
  13. Re: Create grayscale bitmap from byte array of pixel intensity

    No. If you request a 256 color bitmap, well, you'll receive a 256 color bitmap.

    For 1 plane and 8 bits/pixel bitmap the color table is mandatory.

    In order to have full control over the...
  14. Thread: DoModal failed

    by srelu
    Replies
    11
    Views
    3,406

    Re: DoModal failed

    It might be an error regarding the controls in your dialog box. Have you tried to add the DS_NOFAILCREATE style to your dialog box ? It will create the dialog box even if errors occur.
  15. Re: Getting pixels from Windows DIB with no BITMAPFILEHEADER?

    Obviously, there is no BITMAPFILEHEADER structure because you didn't load the bitmap from a *.bmp file, you loaded it as a resource from your *.exe file.

    Only a *BITMAP FILE* has that header,...
  16. Re: How can restrict to shortcuts not displayed in CFileDialog?

    What you need is to skip junction points. Look for help on
    FILE_ATTRIBUTE_REPARSE_POINT flag.

    http://msdn.microsoft.com/en-us/library/bb968829(VS.85).aspx
  17. Replies
    3
    Views
    193,105

    Re: Syncronization with the hardware

    I'm not expert in DirectX either, otherwise I wouldn't need any sychronization, DirectX does it natively.

    Knowng DirectX is great and I'll learn it when I'll have more time, but for simpler...
  18. Replies
    3
    Views
    193,105

    Syncronization with the hardware

    Can I synchronize a thread with the monitor refresh ? Probably I could, because DirectX can, just I don't know how.

    More specifically, how can I predict the time a monitor refresh will occur ?
    ...
  19. Replies
    7
    Views
    1,814

    Re: Draw Something To Screen

    I repeat: "It will fill the *W.H.O.L.E. S.C.R.E.E.N.* with colorful circles".

    Instead of asking, why don't you try it ?
  20. Replies
    7
    Views
    1,814

    Re: Draw Something To Screen

    Here's a sample that uses a thread.

    Put the following function in any Win32 application:

    DWORD WINAPI MyThread(LPVOID lpParameter)
    {
    HDC hdc;
    SIZE s;
    s.cx =...
  21. Thread: Repaint failure

    by srelu
    Replies
    25
    Views
    3,991

    Re: Repaint failure

    I wonder too. Your 15 years of experience makes me feel humble, I only have 13. Of course, of Windows GDI experience. Otherwise my first contact with a computer to program it was 31 years ago.

    I...
  22. Replies
    3
    Views
    5,170

    Re: COnvert BMP to Ico

    The icon Create functions allow you to get a HICON handle, not to create ICO files.
  23. Replies
    7
    Views
    1,814

    Re: Draw Something To Screen

    Call GetDCEx with hwnd = NULL. You'll get a HDC for the entire screen. You'll be able to draw anywhere on the screen regardless what windows are there.
  24. Re: [MFC] SDI based on ViewForm - How to create different forms according to the user

    http://msdn.microsoft.com/en-US/library/s199bks0(v=VS.80).aspx



    Yes. You must add first the dialog resource, then add the class.

    I don't know what Visual Studio do you use.
    In the case...
  25. Thread: Repaint failure

    by srelu
    Replies
    25
    Views
    3,991

    Re: Repaint failure

    1. You forget to deselect the hBitmap from the dc at the end. That will create problems for sure.

    2. The fact that WM_PAINT is sent doesn't mean necessarily that it will repaint the whole window....
Results 1 to 25 of 619
Page 1 of 25 1 2 3 4





Click Here to Expand Forum to Full Width

Featured