Search:

Type: Posts; User: damyan

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    1,742

    hi knutso, you need to pass a pointer to...

    hi knutso,

    you need to pass a pointer to pointer to LD struct in order to return that to where are you calling it.
    so instead of:
    > int fetchData(HEAD *HD, LINE *LD){

    use


    int...
  2. Replies
    5
    Views
    1,141

    Hi itld, Since the range that you wish to...

    Hi itld,
    Since the range that you wish to exclude is continious its prety easy. here is a little maths about the task
    R[65..122] -> |R| = 122-65 = 57
    but X%Y gives a number between [0..y-1] so...
  3. Thread: Full?

    by damyan
    Replies
    2
    Views
    1,620

    Hi Shakespeare, it is possible to emulate...

    Hi Shakespeare,

    it is possible to emulate Alt+Enter via the 'keybd_event' function
    but instead of VK_MENU and VK_ENTER use the second parameter of the function to specify the proper scan codes ....
  4. Yes. The templates are the solution. Here is one...

    Yes. The templates are the solution.
    Here is one possible implementation of the above example using a template member function:


    template <class T>
    void enumobj(T* pInstance_of_T, void...
  5. Hi ninebit, in order to invoke a member...

    Hi ninebit,

    in order to invoke a member function of an instance of a class you will need a pointer to that member function and a pointer (or a reference) to the right instance. If you are a bit...
  6. Thread: C++ Full Screen

    by damyan
    Replies
    25
    Views
    26,967

    late reply

    Hi

    'al+enter' can be simulated with keybd_event API


    keybd_event(VK_MENU,0x38,0,0);
    keybd_event(VK_RETURN,0x1c,0,0);
    keybd_event(VK_RETURN,0x1c,KEYEVENTF_KEYUP,0);
    ...
  7. Thread: Image blending

    by damyan
    Replies
    6
    Views
    1,735

    Hi if the two source bitmaps have the same...

    Hi

    if the two source bitmaps have the same structure (bitcount, plains, colordepth,etc.) and size, you can simply treat them as byte arrays, just adding and dividing each pair of bytes to form the...
  8. Replies
    3
    Views
    2,153

    Hi declare these functions with extern "C" in...

    Hi

    declare these functions with extern "C" in your cpp code
    or use extern "C++" in the C code, if the compiler support that.

    damyan
  9. Replies
    9
    Views
    2,673

    Hi instead of 'sprintf' just use 'vsprintf' ...

    Hi

    instead of 'sprintf' just use 'vsprintf'

    damyan
  10. Thread: link list

    by damyan
    Replies
    4
    Views
    2,539

    Hi Yes it is a BIG problem! if you...

    Hi



    Yes it is a BIG problem!
    if you interchange them then the value of the old 'firstPtr' will be lost forever with all the elemnts in the list too along it. Also the newPtr item will point to...
  11. Replies
    5
    Views
    1,749

    Hi Your implementation do not allow extrnal...

    Hi

    Your implementation do not allow extrnal access to 'first' and 'last' pointers in the List class so in order to write external, non-friend function that reverse a list you should use only the...
  12. Thread: template

    by damyan
    Replies
    4
    Views
    1,226

    Hi since you've not passed the list L as...

    Hi

    since you've not passed the list L as reference to your printList function


    void printList(List<T> L) // here

    a copy of the list is created temporary and passes so all the elements from...
  13. Replies
    4
    Views
    4,670

    Hi if the power factor is not an integer you...

    Hi
    if the power factor is not an integer you may use exponents and logarithms to do powers

    1. a = y^x
    2. log(a) = log(y^x)
    3. log(a) = x*log(y)
    4. exp(log(a)) = exp(x*log(y))

    or finaly:
  14. Replies
    3
    Views
    3,104

    hey >>> if (Location = -1)

    hey

    >>> if (Location = -1)
    <<< if (Location == -1)

    and

    >>> while ((Location = -1)&&(Start <= End))
    <<< while ((Location == -1)&&(Start <= End))
  15. Replies
    4
    Views
    845

    Hi this is a good thread about the srand(), so...

    Hi
    this is a good thread about the srand(), so check it

    http://www.cprogramming.com/cboard/showthread.php?s=&threadid=4621#post32861
  16. Thread: MS bug #2

    by damyan
    Replies
    2
    Views
    926

    ok. just the result was unexpected and that's...

    ok.
    just the result was unexpected and that's all.
  17. Replies
    3
    Views
    4,171

    Home made Minesweeper using SDL

    hi
    this is my implementation of the classical Minesweeper game that can be found on every Windows OS.

    I like to give it as 'game developing tutorial' purposes if someone like to use it.

    I made...
  18. Replies
    9
    Views
    1,399

    Ok The Windows API to register a new window...

    Ok
    The Windows API to register a new window class is:


    ATOM RegisterClass(
    CONST WNDCLASS *lpWndClass // class data
    );


    browse the WNDCLASS structure and you will find its member:
  19. Thread: MS bug #2

    by damyan
    Replies
    2
    Views
    926

    MS bug #2

    #include <iostream.h>
    int main(char*, char*[])
    {
    int c=0; cout<<c<<c++;
    return 0;
    }


    you can expect from that code any other result but it displays "10" :-)))
  20. Thread: Getting WndProc

    by damyan
    Replies
    3
    Views
    2,028

    //here is the code to swap it with one from the...

    //here is the code to swap it with one from the other window:
    ...

    WNDPROC theOtherWndProc = (WNDPROC)GetWindowLong(hwndOther, GWL_WNDPROC);
    WNDPROC yourOldWndProc =...
  21. Replies
    4
    Views
    2,959

    Hi this should work: CArray

    Hi

    this should work:


    CArray<CPoint, CPoint> arr;
    arr.Add(CPoint(10,10));
    arr.Add(CPoint(20,20));
    arr.Add(CPoint(20,10));
    CRgn region;
  22. Thread: MS bug

    by damyan
    Replies
    1
    Views
    963

    MS bug

    Hi

    compile the progam as Console app under any Windows OS


    #include <stdio.h>
    int main(void){
    printf("CrashMe\t\t\b\b\b\b\b\b");
    printf("CrashMe\t\t\b\b\b\b\b\b");
    return 0;
  23. Thread: Transparency

    by damyan
    Replies
    7
    Views
    1,203

    ok this can help you #ifndef WS_EX_LAYERED ...

    ok this can help you


    #ifndef WS_EX_LAYERED
    #define WS_EX_LAYERED 0x00080000
    #define LWA_COLORKEY 0x00000001
    #define LWA_ALPHA 0x00000002
    #endif // ndef...
  24. Replies
    2
    Views
    1,371

    The problem is that when you invoke the...

    The problem is that when you invoke the
    main_DestroyWindow the handle to the window is not valid
    (the system releases the handle right after the PostQuitMessage(0)) and any API call usiing that...
  25. Hi If it is a console window from Windows use: ...

    Hi
    If it is a console window from Windows use:


    DWORD h1 = GetCurrentProcessId();
    HANDLE h2 = OpenProcess(PROCESS_ALL_ACCESS, 0, h1);

    -----
    the code abowe is to retrive your process...
Results 1 to 25 of 72
Page 1 of 3 1 2 3