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

Search:

Type: Posts; User: Cambalinho

Page 1 of 43 1 2 3 4

Search: Search took 0.04 seconds; generated 37 minute(s) ago.

  1. GDIPLUS::Image::Save(IStream): can save animated gif's?

    i'm trying save the image on IStream:

    friend std::ostream& operator << (std::ostream& lhs, image& rhs)
    {

    //Create an empty IStream:
    IStream* pIStream = nullptr;
    ...
  2. Replies
    9
    Views
    281

    Re: can i convert HBITMAP to istream?

    sorry Igor. i found my error. and yes, was my own error.
    sometimes i faill simple things that i don't see them(even on work). maybe i will learn 'traning' my brain for avoid more that type of...
  3. Re: HBITMAP: can i get the selected HDC?

    thanks Igor. that's why i did a diferent way, my 1st thot was overloading the operator<< and operator>> for HBITMAP. but, like we have seen, the HBITMAP can be selected to a diferent DC. so i came...
  4. Replies
    9
    Views
    281

    Re: can i convert HBITMAP to istream?

    i don't use MFC... sorry.
    but see my istream:

    friend std::istream& operator >> (std::istream& lhs, BitmapDC &hBitmap)
    {
    MessageBox("read it");
    BITMAPFILEHEADER bfh = {0};
    ...
  5. Re: HBITMAP: can i get the selected HDC?

    1 - like we know: we can have 1 HBITMAP selected to 1 HDC(and not more)(maybe i don' get the image);
    2 - i need the HDC for use the GetDIBits() and get the pixel array.
  6. Re: HBITMAP: can i get the selected HDC?

    see my overloading code:

    //write HBITMAP:
    std::ostream& operator << (std::ostream& lhs, HBITMAP& hBitmap)
    {
    //get hbitmap size:
    BITMAP bm;
    GetObject(hBitmap, sizeof(BITMAP), &bm);...
  7. [RESOLVED] HBITMAP: can i get the selected HDC?

    HBITMAP can or can not be selected to a HDC. and the HBITMAP can be selected, only, once, unless we unselect it.
    know these and using HBITMAP on a function parameter, can i get it's HDC?
    (i don't...
  8. Replies
    9
    Views
    281

    Re: can i convert HBITMAP to istream?

    i have found these function:
    http://www.codeguru.com/cpp/g-m/bitmap/article.php/c1697/Writing-a-bitmap-to-a-BMP-file.htm


    // WriteDIB - Writes a DIB to file
    // Returns - TRUE...
  9. Replies
    9
    Views
    281

    can i convert HBITMAP to istream?

    i need overloading the << and >> input/output operators. but for that i need the HBITMAP like a *.bmp file format.
    so how can i convert the HBITMAP to istream or char*?
  10. Re: [RESOLVED] how can i save a structure on a file?

    so what you advice for update these function?
  11. Re: [RESOLVED] how can i save a structure on a file?

    2kaud: I, now, notice 1 thing:
    i'm overloading the operators: std::ostream& operator << and std::istream& operator >>. but i'm using Write() on SaveDataBase(). so what you can tell?
    can i...
  12. Re: [RESOLVED] how can i save a structure on a file?

    finally i'm working correctly with string.
    for today i'm done, but please, see these overloading on my image class:

    friend std::ostream& operator << (std::ostream& lhs, const image& rhs)
    {
    ...
  13. Re: [RESOLVED] how can i save a structure on a file?

    if so. why i can't, correctly, use string on structure?(for save it on file)
  14. Re: [RESOLVED] how can i save a structure on a file?

    so how can i overloading the input\output operators for string?
  15. Re: [RESOLVED] how can i save a structure on a file?

    i'm sorry 2Kaud: but these code don't do the string job?

    std::ostream& operator << (std::ostream& lhs, string& rhs)
    {
    int stringsize=rhs.size();
    lhs<<stringsize;
    ...
  16. Re: how can i save a structure on a file?

    thanks for the keywords.
    now i found it, my error, without notice, was not using the size of structure.

    //save a structure object to a file
    template<typename structure>
    void SaveDataBase(string...
  17. [RESOLVED] how can i save a structure on a file?

    for save a structure on a file i must overloading the << and >> operators.
    so for start i did for string:

    std::ostream& operator << (std::ostream& lhs, string& rhs)
    {
    int...
  18. Replies
    54
    Views
    1,832

    Re: [RESOLVED] how can i detect an error?

    on Multithread and Timer class, i add the:

    #define MAX_THREADS 100
    WaitForMultipleObjects(MAX_THREADS, &hThread, TRUE, INFINITE);
    on destructor. so now i don't need use the Sleep()....
  19. Replies
    54
    Views
    1,832

    Re: [RESOLVED] how can i detect an error?

    i did 1 change on consolewindow close() and Destroy(), the End() calls Dispose() that calls the DestroyWindow().
    even Close() or Destroy(), now, change 2 boolean variables that helps me more. thanks...
  20. Replies
    54
    Views
    1,832

    Re: [RESOLVED] how can i detect an error?

    because, i belive, it's for give time to CPU ending that loop on mtRead. if i don't use it, i will get the errors.
    the End() just do:
    1 - close all windows(inclused console window(derived from...
  21. Replies
    54
    Views
    1,832

    Re: how can i detect an error?

    finally i fix it:
    1 - on form i added a static variables and the index for call the Disposed();
    2 - i update the loop:

    Multithread mtRead{ [&]( LPVOID varname)
    {
    strucread...
  22. Re: [RESOLVED] PostQuitMessage: why the WM_DESTROY isn't called?

    thank you to both. thanks for correct me
  23. Re: PostQuitMessage: why the WM_DESTROY isn't called?

    even the class destructor(any class) seems been ignored.
  24. Re: PostQuitMessage: why the WM_DESTROY isn't called?

    i have 2 windows(forms).
    1 call the End()(on menu click) and the other is the console window. but the WM_DESTROY isn't called, because, i belive, the message loop was closed.
    so what you can tell...
  25. [RESOLVED] PostQuitMessage: why the WM_DESTROY isn't called?

    heres my message loop:

    WPARAM MessageLoop()
    {
    MSG msgEvents;
    while(GetMessage(&msgEvents,NULL,0,0))
    {

    if(!IsDialogMessage(ActivatedForm,&msgEvents))
    {
Results 1 to 25 of 1063
Page 1 of 43 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This a Codeguru.com survey!


HTML5 Development Center