12
Return list

1

Posts

0

Resources
21
Quote from the reply of cwmars on the 19th floor: 91program, can you give an example like bitmap1.bmp? In evc, it is in the Bitmap file, but where is it in the simulator when the program is run? If it is in the Windows folder, what is the format of the path? I don’t have a book on evc, and there are many types of paths mentioned on the Internet. Can you give a standard answer?
The path in your EVC program should be the path of the image in your simulator. For example, if the image is called bitmap1.bmp, and the path of the image in your simulator is \\Disk\bitmap1.bmp, then the path in your EVC program should be "\\Disk\bitmap1.bmp", and you must ensure that bitmap1.bmp exists in Disk. If you don’t copy the image to the simulator, how can you call out the image? Also, I remember that EVC needs the IImage method to load images instead of the CImage class.
This post is from Embedded System

2

Posts

0

Resources
22
It is possible that the SHLoadDIBitmap() function itself does not load the image into the simulator
This post is from Embedded System

2

Posts

0

Resources
23
void CCText2View::OnDraw(CDC* pDC) { CCText2Doc* pDoc = GetDocument(); ASSERT_VALID(pDoc); static CBitmap bitmap; HBITMAP hbmp =SHLoadDIBitmap(_T("\\CText2\\res\\bitmap1.bmp")) ; bitmap.Attach(SHLoadDIBitmap(_T("\\CText2\\res\\bitmap1.bmp"))); CDC dcCompatible; dcCompatible.CreateCompatibleDC(pDC); dcCompatible.SelectObject(&bitmap); CRect rect; GetClientRect(&rect); pDC->BitBlt(0,0,rect.Width(),rect.Height(),&dcCompatible,0,0,SRCCOPY); } I changed the program and no longer used the one that created the cursor. I just displayed the picture directly, but what I got was blank. It should not be a problem with the SHLoadDIBitmap function, because others use it this way. I only have evc and other related software. No, does the inability to upload images to the simulator have anything to do with the software configuration?
This post is from Embedded System

1

Posts

0

Resources
24
You can send me the project and I will try it on a real device for you baiminshengbai@126.com
This post is from Embedded System

1

Posts

0

Resources
25
hBitmap=SHLoadDIBitmap((unsigned short *)"res\bitmap1.bmp") hBitmap=SHLoadDIBitmap((unsigned short *)"res\bitmap1.bmp") hBitmap=SHLoadDIBitmap((unsigned short *)"res\bitmap1.bmp") hBitmap=SHLoadDIBitmap((unsigned short *)"res\bitmap1.bmp") hBitmap=SHLoadDIBitmap((unsigned short *)"res\bitmap1.bmp") hBitmap=SHLoadDIBitmap((unsigned short *)"res\bitmap1.bmp") What is the type of the parameter of the SHLoadDIBitmap function? Look at this
This post is from Embedded System

1

Posts

0

Resources
26
The path data type is not correct. How can I force conversion? I should use L""
This post is from Embedded System

1

Posts

0

Resources
27
bitmap.Attach(SHLoadDIBitmap(L"\\CText2\\res\\bitmap1.bmp")); Is this the case above? This still doesn't work.
This post is from Embedded System

2

Posts

0

Resources
28
bitmap.Attach(SHLoadDIBitmap((unsigned short *)"\res\bitmap1.bmp")); This doesn't work either.
This post is from Embedded System

1

Posts

0

Resources
29
Quote from cwmars on the 27th floor: bitmap.Attach(SHLoadDIBitmap((unsigned short *)"\res\bitmap1.bmp")); This doesn't work either.
This definitely doesn't work!!!
This post is from Embedded System

1

Posts

0

Resources
30
Then what do you think?
This post is from Embedded System

2

Posts

0

Resources
31
On page 181 of vc Technology Insider, it says "The resource compiler reads the DIB from disk and stores it in the project's RES file. The connector copies the DIB into the program's EXE file." So I think my file path name should be fine, maybe it was not passed into the simulator.
This post is from Embedded System

1

Posts

0

Resources
32
Haha. I'm dizzy. LZ You want to load BMP from exe resources, right? Just use LoadBitmap.
This post is from Embedded System

18

Posts

0

Resources
33
Hehe, the OP has confused Res and simulator. Upload the photo to the directory of your simulator. EVC comes with a copy tool to exchange data between the simulator and PC.
This post is from Embedded System

12
Return list
Guess Your Favourite
Find a datasheet?

EEWorld Datasheet Technical Support

Related articles more>>

    EEWorld
    subscription
    account

    EEWorld
    service
    account

    Automotive
    development
    circle

    Robot
    development
    community

    Copyright © 2005-2025 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
    快速回复 返回顶部 Return list