Click here to Skip to main content
15,896,154 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionmfc LoadBitmap hangs my application... Pin
charlieg15-Apr-20 12:21
charlieg15-Apr-20 12:21 
AnswerRe: mfc LoadBitmap hangs my application... Pin
_Flaviu16-Apr-20 1:37
_Flaviu16-Apr-20 1:37 
GeneralRe: mfc LoadBitmap hangs my application... Pin
charlieg16-Apr-20 4:30
charlieg16-Apr-20 4:30 
GeneralRe: mfc LoadBitmap hangs my application... Pin
_Flaviu16-Apr-20 5:24
_Flaviu16-Apr-20 5:24 
GeneralRe: mfc LoadBitmap hangs my application... Pin
leon de boer16-Apr-20 6:29
leon de boer16-Apr-20 6:29 
GeneralRe: mfc LoadBitmap hangs my application... Pin
_Flaviu16-Apr-20 7:21
_Flaviu16-Apr-20 7:21 
GeneralRe: mfc LoadBitmap hangs my application... Pin
charlieg16-Apr-20 9:47
charlieg16-Apr-20 9:47 
GeneralRe: mfc LoadBitmap hangs my application... Pin
charlieg16-Apr-20 10:27
charlieg16-Apr-20 10:27 
So, tried the CImage -> LoadImage approach - no go. Hangs in that call as well. I'm going to sell my house and buy a sailboat....

elephanting code - okay, I figured out why the call hangs. This application is my application loader code in an embedded target. We have two types of upgrades - one with and one without an operating system. So, one thing I need to do is dismount and remount the device partitions (this is Windows Embedded Compact 7), so I can modify OS files. This typically is not a concern, since by the time we're running, everything is running out of ram. Once complete, the device reboots. No harm.

Now I don't know how LoadBitmap is implemented, but it appears that it reads the resource information from the exe file and not what is in RAM. Egg on my face since I missed the #define change. I still argue that LoadBitmap should return gracefully with an error code. Heh it's mfc, filed under "don't do that."

Appreciate all the suggestions.
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...

"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759

GeneralRe: mfc LoadBitmap hangs my application... Pin
leon de boer16-Apr-20 16:37
leon de boer16-Apr-20 16:37 
GeneralRe: mfc LoadBitmap hangs my application... Pin
charlieg17-Apr-20 9:43
charlieg17-Apr-20 9:43 
QuestionWindows CBT Hooks Pin
Richard Andrew x6414-Apr-20 11:58
professionalRichard Andrew x6414-Apr-20 11:58 
GeneralRe: Windows CBT Hooks Pin
Richard MacCutchan14-Apr-20 21:21
mveRichard MacCutchan14-Apr-20 21:21 
GeneralRe: Windows CBT Hooks Pin
Richard Andrew x6415-Apr-20 4:28
professionalRichard Andrew x6415-Apr-20 4:28 
GeneralRe: Windows CBT Hooks Pin
Richard MacCutchan15-Apr-20 4:57
mveRichard MacCutchan15-Apr-20 4:57 
GeneralRe: Windows CBT Hooks Pin
Richard Andrew x6415-Apr-20 5:49
professionalRichard Andrew x6415-Apr-20 5:49 
GeneralRe: Windows CBT Hooks Pin
Richard MacCutchan15-Apr-20 6:05
mveRichard MacCutchan15-Apr-20 6:05 
GeneralRe: Windows CBT Hooks Pin
Richard Andrew x6415-Apr-20 8:01
professionalRichard Andrew x6415-Apr-20 8:01 
GeneralRe: Windows CBT Hooks Pin
leon de boer16-Apr-20 0:21
leon de boer16-Apr-20 0:21 
GeneralRe: Windows CBT Hooks Pin
Richard Andrew x6416-Apr-20 2:53
professionalRichard Andrew x6416-Apr-20 2:53 
GeneralRe: Windows CBT Hooks Pin
leon de boer16-Apr-20 4:02
leon de boer16-Apr-20 4:02 
GeneralRe: Windows CBT Hooks Pin
Richard Andrew x6416-Apr-20 6:12
professionalRichard Andrew x6416-Apr-20 6:12 
GeneralRe: Windows CBT Hooks Pin
leon de boer16-Apr-20 6:25
leon de boer16-Apr-20 6:25 
QuestionAccessing HDD drive Pin
_Flaviu14-Apr-20 9:32
_Flaviu14-Apr-20 9:32 
GeneralRe: Accessing HDD drive Pin
Richard MacCutchan14-Apr-20 21:14
mveRichard MacCutchan14-Apr-20 21:14 
GeneralRe: Accessing HDD drive Pin
_Flaviu16-Apr-20 7:23
_Flaviu16-Apr-20 7:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.