Hi all of you. How can I convert COleVariant to COLORREF ?
I have used CMFCPropertyGridColorProperty to store a colorref into CMFCProperrtyGrid, but I need to retrieve correctly the colorref value, because CMFCPropertyGridColorProperty have been filled with COleVariant ...
The confusion exists because char** can be a couple of things in C you can't distinguish them without looking at the initialization code
1.) A pointer to a char* (always true)
2.) An array of char* (if initialized as such)
3.) A multidimensional char array (if initialized as such)
Number 3 in particular usually causes mass confusion with students learning C.
The typedef doesn't stop you assuming the wrong thing but it does give you language cues to what it is and is easier to read.
But this is not what I am looking for. I want to initialize, using fopen(), the ptrLogFile just once (may be in globals.h?) and then re-use it in file1.c and file2.c as long as I want. Finally close it in file3.c when the program is shutting down. How do I do this? Thanks
Don't do it that way. Create a function or library module that does all the work and then just call the actual logging functions anywhere in your code. Call the initialiser, to open the file, at the beginning of your main module, and the closing operation just before your main program terminates.
basically my problem is how to get rid of flickering when i use customdraw.
I know about double bufering, bckgnderase and any other solutions, but all of them do not work in my case, because my customdraw is called for each item (when resizing window(mfc behavior)) and for some of them when multiselection happens. CustomDraw is called from OnNotify(need that because i am extending normal tree with columns like in listView - so it look smth like Grid with expandable rows).
Cause of all that behavior that i need, got no idea how to apply double buffering into this, cause there's none notification when to bitblt offscreen bitmap into screen.