bmp to text

Тема в разделе "WASM.ENGLISH", создана пользователем dcskm4200, 20 июн 2005.

  1. dcskm4200

    dcskm4200 New Member

    Публикаций:
    0
    Регистрация:
    12 окт 2004
    Сообщения:
    173
    Адрес:
    China
    hey,All



    This is a moving bmp. Could you help me to change a text from a bmp?



    regards



    [​IMG] 522560717__mt_5.rar
     
  2. _staier

    _staier New Member

    Публикаций:
    0
    Регистрация:
    3 окт 2003
    Сообщения:
    738
    Адрес:
    Ukraine
    what text ?

    there is no text there there is a butterfly
     
  3. dcskm4200

    dcskm4200 New Member

    Публикаций:
    0
    Регистрация:
    12 окт 2004
    Сообщения:
    173
    Адрес:
    China
    hey,staier



    Thanks you for response.



    means:

    let a text to moving as a butterfly.



    regards
     
  4. Guest

    Guest Guest

    Публикаций:
    0
    dcskm4200

    If you realize what does this code do, you find that replacing the butterfly with a text is very easy.

    Just replace BitBlt call in WM_PAINT handling by TextOut.
     
  5. Arvensis

    Arvensis New Member

    Публикаций:
    0
    Регистрация:
    18 сен 2004
    Сообщения:
    72
    Адрес:
    Russia
    Sorry. I've missed that I was not logged in. I was sure that anonymous posting is forbidden.
     
  6. alpet

    alpet Александр

    Публикаций:
    0
    Регистрация:
    21 сен 2004
    Сообщения:
    1.221
    Адрес:
    Russia
    print (TextOut) some text into buffer, wich you use for batterfly, instead LoadBitmap:
    Код (Text):
    1.  
    2. // C example
    3. HDC memdc = CreateCompatibleDC (dc);
    4. HBITMAP hbmp = CreateCompatibleBitmap (dc, 200, 20);
    5. SelectObject (memdc, hbmp);
    6. TextOut (memdc, 1, 1, "Some text");
    7.  
     
  7. dcskm4200

    dcskm4200 New Member

    Публикаций:
    0
    Регистрация:
    12 окт 2004
    Сообщения:
    173
    Адрес:
    China
    hello, All who are interested the topic.



    Thanks you for response.



    I'v already used any method which I knew(include TextOut and PolyTextOut).

    if i have the ability to finished it. I must do.



    there is the source code.

    help me to modify it, and post it here.



    regards.
     
  8. dcskm4200

    dcskm4200 New Member

    Публикаций:
    0
    Регистрация:
    12 окт 2004
    Сообщения:
    173
    Адрес:
    China
  9. shoo

    shoo New Member

    Публикаций:
    0
    Регистрация:
    17 июл 2003
    Сообщения:
    1.537
    Адрес:
    Ukraine
    dcskm4200

    hi! why do you insist on typing letters instead of flying ready small bmps from resources? otherwise, as i understand, you should create bitmaps in memory, type letter on them, then copy to main window. or you even can generate a set of such bmps at run-time. and you should have algorythm of proper restoring subwindow when you remove char image to move it: in that script layers were used.



    i've not working with grafic yet. so, you can look at masm32 example: masm32\oop\CSprite\smilies.exe



    regards!
     
  10. yureckor

    yureckor New Member

    Публикаций:
    0
    Регистрация:
    25 фев 2004
    Сообщения:
    494
    Адрес:
    Russia
  11. dcskm4200

    dcskm4200 New Member

    Публикаций:
    0
    Регистрация:
    12 окт 2004
    Сообщения:
    173
    Адрес:
    China
    Hey,Shoo



    Thanks you for help.



    I want to figure out the problem which the chars are glittering in clock. Because i found the bmp is not glittering when it is moving.

    as long as I change the bmp to text. I will finish the clock. until now, i tried many times,I'v always failed.



    regards
     
  12. Guest

    Guest Guest

    Публикаций:
    0
    Hello,yureckor



    Thanks you very much.

    it is ok



    best regards.
     
  13. dcskm4200

    dcskm4200 New Member

    Публикаций:
    0
    Регистрация:
    12 окт 2004
    Сообщения:
    173
    Адрес:
    China
    Hello,yureckor



    I modified your code for controling the font. But the background of the string changed his sizes when the string is moving from bottom to top.



    regards



    [​IMG] 1935709302__7.rar
     
  14. yureckor

    yureckor New Member

    Публикаций:
    0
    Регистрация:
    25 фев 2004
    Сообщения:
    494
    Адрес:
    Russia
  15. dcskm4200

    dcskm4200 New Member

    Публикаций:
    0
    Регистрация:
    12 окт 2004
    Сообщения:
    173
    Адрес:
    China
    Hello,yureckor



    Thanks you very much.

    it is ok.



    best regards.