|
As has been said, BOOL exists for C API programming, where no bool exists. It is a BAD idea to use it if you can avoid it. To get rid of warnings when converting BOOL to bool do this:
bool bResult = (::SomeDodgyAPIFunction()>0);
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Really ? I've not noticed that.
In any case, one should not program poorly because Microsoft tools are broken.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
That's what I thought it would do, I find that perfectly readable ( and it's the same as BOOL, except BOOL can use any non-zero value for true in theory ).
The easiest way I can think of to trace bool is to write a bool handler for IOStreams that prints the word true or false, and then use ostringstream to format a string before tracing it. ( This is also safe, which sprintf ISN'T ).
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
how to enum all loaded modules ?
thanx
|
|
|
|
|
For NT/2K/XP systems only, there exists an SDK library called PSAPI including the function EnumProcessModules that seems to do what you want (check it out here).
For 9x/ME (and optionally all of the other systems except NT), the way to go is using the ToolHelp32 functions (in KERNEL32) CreateToolhelp32Snapshot , Module32First and Module32Next .
All of this is bundled into a single sample executable (for both families of OSs) MODLIST.EXE offered by Microsoft which you can have a look at here. It's written in VB, but I guess you can easily port it to VC++ (you might even post an article with the results here in CodeProject )
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thanx , but i know that , i needed a way to enum all modules that are currently loaded and not by a individual process
thanx again
|
|
|
|
|
If you already knew that, then you're almost there! Iterate thru all active processes with EnumProcesses (if using EnumProcessModules ) or Process32First and Process32Next (if you're leaning toward the second approach).
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
once again , thanx
i will try that..
|
|
|
|
|
|
Hello All,
Working on image lists, my attention was drawn to *.icl file extensions. I was told it is simply a resource DLL with only icons, which means I could also create it by creating a DLL and renaming.
Is there any more I need to know about the *.icl file extension?
Why is it used intead of the *.dll extensions?
Someone called it the Icon library file, is this correct?
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for programming contract anywhere!
|
|
|
|
|
An .ICL is a DLL created by MicroAngelo. It's got icons as well as some other stuff used by MA itself, like text descriptions of the icons.
--Mike--
My really out-of-date homepage
He who laughs last, didn't get the punchline and is just laughing so he won't look silly.
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan.
|
|
|
|
|
Thanks for the prompt response. I got to the MicroAngelo home page but there is no link to the *.icl "structure" (format). Anyway, I could get some information on all that is included in the *.icl. I can easily load the images/icons, however, just in case some of the information there could be of interest.
BTW, do you know of sources I could use to create the simple dll/icl files from my own programs?
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for programming contract anywhere!
|
|
|
|
|
The last I looked, which admittedly was a couple of years ago, ICL files were 16-bit DLLs, so the Win32 APIs won't work with them. (I don't think you can even do a LoadLibrary() on a 16-bit DLL from 32-bit code.)
The tiny description of ICL on Wotsit's Format says:An .ICL file -- ICon Library, as used by icon editors like Microangelo -- is a renamed 16-bit Windows .DLL (an NE format executable) which typically contains nothing but a resource section. The ICL extension seems to be used by convention. I don't know where MacroAngelo stores its additional info in the file.
--Mike--
My really out-of-date homepage
He who laughs last, didn't get the punchline and is just laughing so he won't look silly.
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan.
|
|
|
|
|
Hi,
if you are interested in resource-only DDLs you could read my article
at http://www.codeproject.com/dll/iconsst.asp
Bye!
SoftechSoftware
Davide Calabro'
davide_calabro@yahoo.com
http://www.softechsoftware.it
|
|
|
|
|
Davide Calabro wrote:
if you are interested in resource-only DDLs you could read my article
at http://www.codeproject.com/dll/iconsst.asp
Thanks, no really. I know how to create resource only dll with the VC+. I was hoping for a simple resouce compiler sources (in my response to Mike)
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for programming contract anywhere!
|
|
|
|
|
when i Textout an char each time, there would be a leading space which would be too large when the space is set to tmMAXWIDTH, or it can not align properly when use GetTextExtentPoint32 to get the font size and adjust the space according the font size.
what's the solution of this problem?
thanks
one is the other who absorbs the thoughts of others
|
|
|
|
|
if i have a pointer to a variable, how using the pointer can the variable be changed?
|
|
|
|
|
The * (dereference) operator:
int *vpiPointer;
int viSomeValue = 5;
vpiPointer = &viSomeValue;
*vpiPointer = 3;
ASSERT(viSomeValue == 3);
------------------------
Derek Waters
derek@lj-oz.com
|
|
|
|
|
I am having trouble with the behaviour of popup windows. I have a graphing program the displays 4 graphs. I want to select a graph and have it display in a new dialog, that can be moved around or minmized (much like Matlab plots)
How can I make these dialogs stop covering the main dialog and go to the back?? (they cover up the main program even if not active)
When they are minimised they do not enter the task bar but rather float above it. Is it possible to make them enter the task bar in WinNT??
I am using a new class CPopChart to start a new chart dialog from my original dialog with
class CDialog : OnPopChart() {
CPopChart pchart;
pChart.Create(IDD_POPUP,pWnd);
};
---
|
|
|
|
|
I don't know if you can make them enter the task bar, to do that they need their own WndProc. But to send them to the back use ::SetWindowPos(&wndBackMost, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Thanks but what I want is to send my new dialogs behind the main program/dialog , SetWindowPos() only sends them behind the other new dialogs but not the main one.
---
|
|
|
|
|
are your popup dialogs modeless?
if so is the problem you face this :- when you click on the parent window, your popups still stay on top.
Is that your problem?
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Yep
Do you know a way around this??
---
|
|
|
|
|
Use GetDesktopWindow and set the desktop as the parent window of your modeless dialogs. Now you'll be able to put those popups behind your main app and you'll also be able to minimize them to the task bar
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
The wonders never cease - exactly what I wanted
Thanks a lot
---
|
|
|
|