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

Search:

Type: Posts; User: Pryrates

Page 1 of 13 1 2 3 4

Search: Search took 0.13 seconds.

  1. Replies
    5
    Views
    671

    Re: ThreadHandle from ThreadID?

    I'm using the function ::GetWindowThreadProcessId to get the thread id and the process id.

    I want to suspend the main thread before I do something with the process.
  2. Replies
    5
    Views
    671

    Re: ThreadHandle from ThreadID?

    I don't create the thread itself.
  3. Replies
    5
    Views
    671

    ThreadHandle from ThreadID?

    Hello,

    I know the function OpenThread to get a thread handle from a thread id.
    But the function doesn't exist on Windows NT, Win 95 and Win98.

    What can I do, to get the thread handle on this...
  4. Replies
    6
    Views
    5,447

    Avoid or detect API hooking

    Hello,

    I found many articles about API hooking.

    The problem is, that the API hook maps a unknwon (and malicious?) DLL in the address room of the program. Now the DLL can change the IAT (import...
  5. Replies
    7
    Views
    1,631

    Hi, can you specify how the user selects the...

    Hi,

    can you specify how the user selects the folder? What type of handle do you have?

    If you use SHBrowseForFolder it returns a LPITEMIDLIST object.
    The function SHGetPathFromIDList converts...
  6. Replies
    7
    Views
    1,631

    Hi, if you have a relative path you can create...

    Hi,

    if you have a relative path you can create the absolute or full path with the function:
    char *_fullpath( char *absPath, const char *relPath, size_t maxLength );

    Bye, Pryrates.
  7. Replies
    13
    Views
    985

    Hello Paul, the code close all windows, if the...

    Hello Paul,

    the code close all windows, if the CLASSNAME is Notepad, not the WINDOW name. The window name is the caption of the window.

    If vcstarter want to close only notepad windows, he must...
  8. Replies
    13
    Views
    985

    Hi, use this code, if you want to close all...

    Hi,

    use this code, if you want to close all the notepad windows:


    HWND hwnd = NULL;

    do
    {
    hwnd = ::FindWindow("Notepad", NULL);
  9. Replies
    3
    Views
    688

    Hi, you can use a class that locks p in the...

    Hi,

    you can use a class that locks p in the constructor and unlocks in the destructor:


    // change "CClass" to the class of "p" in your code
    class CAutoLock
    {
    protected:
    CClass* m_p;
  10. Replies
    8
    Views
    1,137

    Hi, why do you not initialize the static...

    Hi,

    why do you not initialize the static CString directly?


    CString ThisIsTheClass::cs("something");

    Bye, Pryrates.
  11. Replies
    14
    Views
    1,773

    Hi Myth, your code works also, because the...

    Hi Myth,

    your code works also, because the WM_KEYDOWN message will be processed by the parent window. *g*

    But if the window text of the calculator isn't "Calculator" (my german calculator has...
  12. Replies
    14
    Views
    1,773

    Hi, I have found a solution, that works: ...

    Hi,

    I have found a solution, that works:


    CWnd* pWnd=FindWindow("SciCalc",NULL);
    if(!pWnd)
    {
    AfxMessageBox("Calculator is not running!");
    return;
  13. Replies
    14
    Views
    1,773

    Hi, with the following code, you can place...

    Hi,

    with the following code, you can place text to the control, but the calculator doesn't know, it has been changed:


    CWnd* pWnd=FindWindow("SciCalc",NULL);
    if(!pWnd)
    {...
  14. Replies
    14
    Views
    1,773

    Hi, if you have started Spy++ type ALT+F3....

    Hi,

    if you have started Spy++ type ALT+F3. Click at the hair cross and move it to the calculator window on your screen, select the output window. You will see, it is a static control.

    Bye,...
  15. Replies
    2
    Views
    463

    Hi, I have attached a little project that...

    Hi,

    I have attached a little project that shows what you want.
    If you have questions, please write me.

    Bye, Pryrates.
  16. Replies
    5
    Views
    814

    Hi, you can use the function GetData() to...

    Hi,

    you can use the function GetData() to retrieve the array.


    CArray<PointF,PointF> m_points;
    graphics.DrawLines(m_pPen,m_points.GetData(),m_points.GetCount());

    Bye, Pryrates.
  17. Replies
    6
    Views
    736

    Hi, you must allocate memory for the string: ...

    Hi,

    you must allocate memory for the string:


    int len;
    ar >> len; // Length of the character string

    char*pTemp=new char[len+1];
    if(pTemp)
  18. Replies
    2
    Views
    1,314

    Hi, I have created an empty dialog with a...

    Hi,

    I have created an empty dialog with a static control and set the alignment of the static control to "centered".
    Than I have insert the text "A\r\ncentered\r\ntext" and built the exe file....
  19. Replies
    14
    Views
    1,773

    Hi, I have started the calculator on my system...

    Hi,

    I have started the calculator on my system and Spy++ shows, it is a static control with the ID 0x00000193. The static control will not process the WM_PASTE message.
    You should try to send a...
  20. Replies
    9
    Views
    1,065

    Hi, you must not create the brush by every...

    Hi,

    you must not create the brush by every call of OnCtlColor. Create the brush once in the OnCreate function and delete it in the OnDestroy function.

    Bye, Pryrates.
  21. Replies
    10
    Views
    1,234

    Hi, I have found a solution. You can copy the...

    Hi,

    I have found a solution. You can copy the following code to the OnCreate function of your dialog:


    HWND hwnd=GetSafeHwnd();
    long style=::GetWindowLong(hwnd,GWL_STYLE);
    DWORD...
  22. Replies
    10
    Views
    1,234

    Hi, I have no quick solution, but I will try...

    Hi,

    I have no quick solution, but I will try to find it.

    Bye, Pryrates.
  23. Replies
    2
    Views
    733

    Hi, you can unselect an item of the list...

    Hi,

    you can unselect an item of the list control with:


    extern CListCtrl* pList;
    extern int nItem;
    pList->SetItemState(nItem,0,LVNI_SELECTED);

    "pList" is your list control, "nItem" is the...
  24. Replies
    4
    Views
    679

    Hi, I don't know, where the problem is (can...

    Hi,

    I don't know, where the problem is (can you post the complete code as ZIP file?), but you can allocate the entire memory with:


    void LoadHistoDB::AllocComptStartEndMin(long RowSize,long...
  25. Replies
    10
    Views
    1,234

    Hi, use this code in your OnInitDialog handler...

    Hi,

    use this code in your OnInitDialog handler function:


    HWND hwnd=GetSafeHwnd();
    long style=::GetWindowLong(hwnd,GWL_STYLE);
    DWORD exstyle=::GetWindowLong(hwnd,GWL_EXSTYLE);
    ...
Results 1 to 25 of 322
Page 1 of 13 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)