Three problems:
Conditions: Using SDK-style programming (i.e., NOT "DDT"), PB/DLL 6.0
1. I have a progress bar control running as a child control of a regular window - that is, it is not in a dialog.
I have it working fine, but wanted to change the color of the bar itself. I found the PBM_SETBARCOLOR and PBM_SETBKCOLOR messages, but I cannot find how to specify the color value in lparam.
When I don't send PBM_SETBARCOLOR, I get the regular blue bar; but whatever I seem to try for lparam for color, I get a black bar.
(I have two bars: I'd like one yellow and one either green or red.)
2. I have a dialog box I invoke from the program using the DialogBox API function and a dialog template specified in a resource file. I wanted to know if it's possible to add one of the "standard" icons you might find in a messagebox - like "ICONEXCLAMATION" or "ICONSTOP" to the surface (not in the caption area) of that dialog.
I could not figure out how to specify a "standard" icon in the resource file, using something like IDI_EXCLAMATION or IDI_ASTERISK; it seems to put it in the resource file I need to have a physical "*.ico" file to define in a ..
.. statement.(I also couldn't figure out how to do it as an icon "control" on the dialog without a physical *.ico file).
3. My application uses a regular window with 13 controls drawn on it. There is no drawing on the "main" window at all. The WM_PAINT processing is simply BeginPaint, EndPaint. I cannot find in any of my books or in my MSDN if I am responsible for re-drawing the controls on this window in response to WM_PAINT (or WM_SIZE). So far, no matter what I do, the controls always appear in the correct place, even after I move other windows over this one, minimize the window, anything. Is this the expected behavior? Or have I just been real real lucky?
Thanks,
------------------
Michael Mattias
Racine WI USA
[email protected]
Conditions: Using SDK-style programming (i.e., NOT "DDT"), PB/DLL 6.0
1. I have a progress bar control running as a child control of a regular window - that is, it is not in a dialog.
I have it working fine, but wanted to change the color of the bar itself. I found the PBM_SETBARCOLOR and PBM_SETBKCOLOR messages, but I cannot find how to specify the color value in lparam.
When I don't send PBM_SETBARCOLOR, I get the regular blue bar; but whatever I seem to try for lparam for color, I get a black bar.
(I have two bars: I'd like one yellow and one either green or red.)
2. I have a dialog box I invoke from the program using the DialogBox API function and a dialog template specified in a resource file. I wanted to know if it's possible to add one of the "standard" icons you might find in a messagebox - like "ICONEXCLAMATION" or "ICONSTOP" to the surface (not in the caption area) of that dialog.
I could not figure out how to specify a "standard" icon in the resource file, using something like IDI_EXCLAMATION or IDI_ASTERISK; it seems to put it in the resource file I need to have a physical "*.ico" file to define in a ..
Code:
FOO ICON filename.ico
3. My application uses a regular window with 13 controls drawn on it. There is no drawing on the "main" window at all. The WM_PAINT processing is simply BeginPaint, EndPaint. I cannot find in any of my books or in my MSDN if I am responsible for re-drawing the controls on this window in response to WM_PAINT (or WM_SIZE). So far, no matter what I do, the controls always appear in the correct place, even after I move other windows over this one, minimize the window, anything. Is this the expected behavior? Or have I just been real real lucky?
Thanks,
------------------
Michael Mattias
Racine WI USA
[email protected]
Comment