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

Search:

Type: Posts; User: codecX

Page 1 of 2 1 2

Search: Search took 0.03 seconds.

  1. Replies
    3
    Views
    827

    Re: Basic string operation not working

    Two problems in your code:

    1- use "<" instead of "=" in "for" loop:



    ; i < testString.length() ;


    2- You should convert String to c-string easily by c_str method:
  2. Replies
    4
    Views
    1,128

    Re: Different handle

    your first step after initialization of CImage is using Create or load or similar methods.

    Then use GetDC from that image, if you need this DC for hdcSrc in Bitblt windows API or you wanna save...
  3. Thread: Resize ?

    by codecX
    Replies
    6
    Views
    1,162

    Re: Resize ?

    you can use this method:
    First you get wx and wy sizes, then use SetWindowPos to change the dialog size.
    later you can estimate the needed percentage of width and height for your controls and...
  4. Replies
    7
    Views
    1,381

    Re: CEdit - capture message....

    Each control has special messages/Notification, you should always use those Notifications related to that control, check it in MSDN. WM_KEYDOWN will be posted to windows and you may receive it if you...
  5. Replies
    11
    Views
    1,685

    Re: What's the best way to write GUIs?

    This is my personal opinion:
    1- Qt is excellent if you are not going to give licenses of your source codes, more support, price doesn't bother, ...
    Also Qt is using LGPL for their next release,...
  6. Replies
    14
    Views
    6,495

    Re: transparent static control and display icon

    If you want all of your static controls be transparent you can use the same method that mentioned in post 2 but for win32 API, especially for dialog box:



    case WM_CTLCOLORSTATIC:
    SetBkMode...
  7. Replies
    6
    Views
    3,857

    Re: XP or Vista style progressbar.

    Read below thread, I explained how to do that (you can change * to X86):
    http://www.codeguru.com/forum/showthread.php?t=467722
  8. Thread: Play Music

    by codecX
    Replies
    5
    Views
    1,512

    Re: Play Music

    Add a sound file as a resource, so it will have an ID:
    Right click on resource view and select "add resource", then import... choose "wav" and add it to the project (name its ID --> IDR_WAVE1).

    ...
  9. Replies
    5
    Views
    1,021

    Re: no syntax highlighting?!!

    As TheCPUWizard said use .h

    Also:
    You do not need to copy your header files or .lib files to Include folder of VC++, put it anywhere you want and use VC++ option for that:

    when project is...
  10. Thread: Play Music

    by codecX
    Replies
    5
    Views
    1,512

    Re: Play Music

    #include <Windows.h>
    #pragma comment( lib, "Winmm.lib" ) // for PlaySound

    //...

    PlaySound("C:\\yoursound.wav", NULL , SND_FILENAME | SND_ASYNC);


    If you use SND_ASYNC flag, then PlaySound...
  11. Replies
    9
    Views
    1,184

    Re: easy way to pack structure?

    You can save multiples of 8 bits into a file, so you can make a rule,
    for example it should be multiple of 4 bytes (as you said 40 chars that fit to this rule), and if it is less than that, make...
  12. Replies
    4
    Views
    2,169

    Re: How to maximize the dialog box

    You can get the information of the changes of size by WM_SIZE, WM_SIZING and WM_EXITSIZEMOVE.

    Then by the help of that use MoveWindow or SetWindowPos to change the size of all your child controls....
  13. Replies
    2
    Views
    7,099

    Re: Change Size of Standard Icon

    For default system icons do not use MAKEINTRESOURCE or AfxGetInstanceHandle.
    First parameter must be NULL and directly use IDI_QUESTION.

    try this code:


    LoadImage(NULL, IDI_QUESTION,...
  14. Replies
    7
    Views
    1,299

    Re: DirectX Application Dependencies

    The previous post said compile a "release" build and not "debug" one.

    And also these:

    1- you must install the same version of directX or newest one on the target system.

    2- Depend on your...
  15. Replies
    35
    Views
    4,133

    Re: Off Topic thread...

    vBulletin is a very nice community board, but why don't you add other options like tags for code,links and etc in advance mode when we are Posting?

    anyone knows?
  16. Replies
    6
    Views
    1,380

    Re: Drawing on screen

    I recommend using a modeless dialog:
    - Topmost must be" true"
    - Style must be "Pop up"

    Note: You can hide titlebar or use regions and hide/mask other area of the window except shapes/texts
    And...
  17. Replies
    2
    Views
    3,116

    Re: detect Process name of dll name

    maybe you can use FindWindow with the class name of firefox window:



    firefoxHandle = FindWindow(L"MozillaWindowClass", NULL);
  18. Replies
    12
    Views
    1,830

    Re: Running Slower on a 64 Bit Processor

    That's the point I wanted to mention first...

    Second, There are thousands of functions that are obsolete and they must be replaced by new versions of that(especially faster or more advanced). they...
  19. Thread: MFC Regular DLL

    by codecX
    Replies
    3
    Views
    1,062

    Re: MFC Regular DLL

    If you are not going to use DEF file, then add extern "C" when you are exporting a function:


    extern "C" DRVIFCFNC CString Concatinate()
    {
    return "";
    }
  20. Thread: Restricting exe

    by codecX
    Replies
    8
    Views
    1,271

    Re: Restricting exe

    I use below method by using of my application's ClassName, call it in the beginning of WinMain:


    HWND hwndS2 = GetRunningW (); // running an instance ?

    if (hwndS2 != 0)
    ...
  21. Replies
    3
    Views
    823

    Re: HOW : using Res ID in res-only Dll?

    before using bitmaps or icons, first you must load them and then add them to an image list if you want:


    m_hDll = AfxLoadLibrary("myDll.dll");

    hCursor = ::LoadCursor(m_hDll, ...
  22. Replies
    6
    Views
    2,227

    Re: Turbo C equivalent function for ellipse

    In other words, apparently you are creating a rectangle but it draws an ellipse inside of that.
  23. Re: Application manifest file does not work on windows xp 64-bit os

    try embedding manifest file into your executable file and then compile it for x64.
    It should work for you.

    from MSDN:

    1- Link to ComCtl32.lib and call InitCommonControls.

    2- Add a file...
  24. Replies
    16
    Views
    2,300

    Re: Help Needed Using DLL

    use Depends.exe from "Microsoft Visual Studio 8\Common7\Tools\Bin" and check you dll to see if the name of your exported function is the same...
  25. Replies
    8
    Views
    1,273

    Re: Bringing WIN32 to Interface

    first learn MFC or win32 API and then start...

    when you are ready, this article is for you:
    http://www.codeguru.com/cpp/g-m/directx/directshow/article.php/c4355/

    Step 4 shows how to attack...
Results 1 to 25 of 31
Page 1 of 2 1 2





Click Here to Expand Forum to Full Width

Featured