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

Search:

Type: Posts; User: mesajflaviu

Page 1 of 14 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    16
    Views
    159

    Re: Stop a thread

    The point is that function is working well as long I got no ML when I let thread to terminate by itself.
  2. Replies
    16
    Views
    159

    Re: Stop a thread

    some_function_that_takes_long_time is a function inside a C library ... I have the source code, but inside is a long string of C functions that read some specific files on HDD device. In his reading...
  3. Replies
    16
    Views
    159

    Re: Stop a thread

    No, has no option to be cancelled ... I guess that putting a WaitForSingleObject after his call will solve ML issue ... is a step forward ...
  4. Replies
    16
    Views
    159

    Re: Stop a thread

    That function read specific file on HDD drive. Its name: GetFileAvailability(...)
  5. Replies
    16
    Views
    159

    Re: Stop a thread

    The fact is that some_function_that_takes_long_time function is a simple call into a C library which is not mine ... I don't know what option do I have ...
  6. Replies
    16
    Views
    159

    Re: Stop a thread

    "worker threads have periodically wait for this event" this one I don't know how to implement it ... because that code from the thread is in fact a simple call:


    UINT CMyDoc::ReadThread(LPVOID...
  7. Replies
    16
    Views
    159

    Re: Stop a thread

    "Thread when is forced to stop" I mean I close the whole app when thread is alive.
  8. Replies
    16
    Views
    159

    Stop a thread

    Please explain me why the following thread when is forced to stop is not cleaning the heap:
    // here is starting thread


    BOOL CMyDoc::ReadHDD(CStringA sVolume)
    {
    THREADSTRUCT* pTS = new...
  9. Re: Coloring the highlighted row in CListControl

    For achieving this I guess you would have to handle NM_CUSTOMDRAW message notification: https://docs.microsoft.com/en-us/windows/win32/controls/nm-customdraw
    You can find on internet how to do it.
  10. Re: Changing color of CProgressBarCtrl in MFC C++

    Made a MFC test project (SDI or MDI) with VS wizard and you'll see what I am talking about (take a look inside stdafx.h as I said in previous post).
  11. Re: Changing color of CProgressBarCtrl in MFC C++

    Perhaps must be activated the application theme ... your app is UNICODE ? Take a look inside stdafx.h and see if this code is active:


    #if defined _M_IX86
    #pragma...
  12. Replies
    8
    Views
    681

    Re: Read bytes from CFile buffer

    Due to mode to test the file image result, I thought that the code was wrong, but seem to be ok.
  13. Replies
    8
    Views
    681

    Re: Read bytes from CFile buffer

    Temp.tmp is the same with sFileName (I have checked byte with byte), but sFileName is not the same with the previous one because the second one is resulting of "get_invert_endianness" operation.
  14. Replies
    8
    Views
    681

    Re: Read bytes from CFile buffer

    INT_PTR CMyDoc::ConvertCStringToByteArray(const CString& sValue, CByteArray& arrData)
    {
    BYTE* pByteArray = (PBYTE)(LPCTSTR)sValue;
    arrData.SetSize(sValue.GetLength());...
  15. Replies
    8
    Views
    681

    Re: Read bytes from CFile buffer

    I see.

    Ok. The task is to open the file, which is image, and this image has serialized 3 strings at the beginning, and the rest of the file is the image itself (bytes only with image graphic). I...
  16. Replies
    8
    Views
    681

    Re: Read bytes from CFile buffer

    the sfileName is an image. And the resulted image is darker. ... Hmmm. I guess I should give the entire code, should I ?
  17. Replies
    8
    Views
    681

    Read bytes from CFile buffer

    How to read correctly the CFile buffer from a certain location ?

    Here is the code (simplified):


    BOOL CMyDoc::SaveFileModified(CImg<float>& img, const CString sFileName)
    {
    CString sDrive,...
  18. Re: Convert custom bitmap to CBitmap/CImage bits format

    @VictorN: you helped me a lot in the past and I thank you. Even if you have enough time to answer me or not, from respect to you I'll try to explain as much as I could of what is about this variable:...
  19. Re: Convert custom bitmap to CBitmap/CImage bits format

    I am open to give any information that I got about this member variable, but this is only from source code, is the only information source. I come back little bit later.
  20. Re: Convert custom bitmap to CBitmap/CImage bits format

    On the third level, I tried to put the same CImage data:


    for (int c = 0; c < Channel; ++c)
    {
    int x = static_cast<int>(image.GetPixel(w, h));
    imageBuff[((Height - 1 - h) * Width + w) *...
  21. Re: Convert custom bitmap to CBitmap/CImage bits format

    The difference between CImage and CCustomBitmap is that CImage store bytes on bi-dimensional array (width and height), and CCustomBitmap store bits on three-dimensional array (width, height and...
  22. Re: Convert custom bitmap to CBitmap/CImage bits format

    The only way to know what is this member is to look into code source. And channel member is used like this:


    std::vector<float> data;
    data = width * height * channel;

    and when this object is...
  23. Re: Convert custom bitmap to CBitmap/CImage bits format

    No, it is not developed by me ... is a part of a project.

    The only members of this CustomObject class is


    private:
    std::vector<float> data;
    int width;
    int height;
    int channels;
  24. Re: Convert custom bitmap to CBitmap/CImage bits format

    CustomObject is a custom bitmap class, and is defined as below:


    CustomObject()
    : width(0),
    height(0),
    channels(0) {}

    CustomObject(int width, int height, int channels)
    :...
  25. Re: Convert custom bitmap to CBitmap/CImage bits format

    I still have a little question, very valuable question: how to convert COLORREF into channel ? The custom bitmap object need width, height and channel:


    CustomObject(int width, int height, int...
Results 1 to 25 of 329
Page 1 of 14 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)