|
is there any notification for system datechange ???
|
|
|
|
|
To find out your answer, I ran notepad, and parked it in a corner of the screen. I then ran Spy++
(from VC Tools menu) and monitored all messages to the notepad's top level window. When I changed
the date / time, windows broadcasts a WM_TIMECHANGE message...
To quote:
Windows 2000/XP: An application should not broadcast this message, because the system will broadcast this message when the application changes the system time.
Iain.
|
|
|
|
|
will this message be generaten whenever day changes normally. ie at midnight...
|
|
|
|
|
Anonymous wrote:
will this message be generaten whenever day changes normally. ie at midnight...
Uh, no. But you could always set a timer with a slow interval (e.g. every five minutes), and monitor
the date. If it changes between WM_TIMER messages, do your thing, else return.
OR
Use CreateWaitableTimer / SetWaitableTimer / WaitForMultipleEvents in a separate thread.
OR
I'm sure XP has a way of asking it to run your program at set times, but I can't remember it.
OR
A long list of other alternatives.
Iain.
|
|
|
|
|
...hi...
for a longer time I am looking unavailingly for a method to read out a directory with all files with an explicit extension.
can anybody help?!
thx.... tito
|
|
|
|
|
You can use the MFC class CFileFind , or the Win32 functions it wraps: ::FindFirstFile , ::FindNextFile
and ::FindClose .
Good luck!
Iain.
|
|
|
|
|
I'm trying to create a rounded box button (sorry bout my lack of knowledge bout MFC) and I followed this tutorial in creating a ownerdrawn button.
The results looks great but there's only one flaw, even my button is now not a box, on each corner of the button there's always a white/gray space to fill the area of a box.
I think is because the button area is always a box and it looks bad if I place my button on top of image/color. How can I eliminate the those spaces in the corner of my button.
Thkx
|
|
|
|
|
|
Hi
I am currently trying to display an image stored in memory to the screen. I store the image data (i.e. the pixel intensity values, obtained after some computation) in an array in the memory. Could someone tell me how I can display it?
I understand I can loop the SetPixel method of CPaintDC, but I noticed that it is quite slow, and the image appears not all at once. Can I use BitBlt to accomplish this?
|
|
|
|
|
You can construct dib and then use to paint the image on the screen.
|
|
|
|
|
If you look at the functions CBitmap::CreateBitmap , or ::CreateBitmap , you'll notice that the last
value can take a pointer to initial values. Just select this into a DC, and BitBlt / StretchBlt .
OR, if you will be changing the values, you'll need to look up StretchDIBits . This is a harder
function to use, but more flexible.
You should find examples on their use in MSDN.
Good luck,
Iain.
|
|
|
|
|
hello all,
as i required to add a toolbar to IE from my application, i had downloaded kbbar.exe from microsoft site as said in the documentation (CP) . But i didnt understand how to use this dll and from where i can add my own toolbar.
Plz help me, i will be greatfull to u.
ComputerNewton
|
|
|
|
|
The codeproject IE bar comes with source code as I remember. From my about box,
Programming: Michael Dunn.
IE Toolbar Wizard: Erik Thomson.
Searching for the articles by these two stellar chaps should help a lot.
Iain.
ps. The CP Bar is a worthwhile download in itself.
|
|
|
|
|
may i have the link to it plz
ComputerNewton
|
|
|
|
|
Don't be so !
Just under is a search box. Type "Michael Dunn" into it. Select "Authors", and press GO.
You'll get a long list. On the second page is his "Search Bar" article. On further inspection,
he doesn't include source code. But in the acknowledgements is a pointer to Erik Thompson's
"DeskBand ATL Object Wizard" article.
Go there, read, download, learn, enjoy!
Iain.
|
|
|
|
|
Thank u very much. i had found it. but only the dll and .exe but not how to do it.
ComputerNewton
|
|
|
|
|
If you use Erik Thompson's article, and download his wizard, he gives instructions on how to use use /
install it.
You can then make a new ATL project and add a IDeskBar object. All this is in his article. I've done
so and I now have my name in big letters in an band next to my explorer menu. What you put into the
band is up to you.
Iain.
|
|
|
|
|
Thanks a lot for ur help.
well i shall try it now.
ComputerNewton
|
|
|
|
|
Friends,
I want to associate some value with every row added in CListCtrl. For this purpose i am using SetItemData() and GetItemData() .
But the problem is that i want to associate data not only per column basis, but i also want to associate data in each column of a row and later retrieve it.
How can i do so ?
|
|
|
|
|
Rather than storing your data directly in the list control's "itemdata", define your data elsewhere in your code, perhaps as classes or structures, and then store pointers to that data. This allows you to store much more complex information for each row of your list control. It's then upto you how you want to arrange and manipulate that data in relation to the current selection in the list. In this case, the SetItemData/GetItemData functions simply insert/retrieve the pointers to your "data" storage.
HTH
|
|
|
|
|
Store data for columns to some array and use SetItemData to store pointer to this array for each row in the list
rrrado
|
|
|
|
|
SetItemData() will set the item data for the entire "row." If you want a data item for each subitem too, use SetItem() .
int nItem = InsertItem(...);
SetItemData(nItem, ...);
SetItem(nItem, 0, LVIF_PARAM, "", 0, 0, 0, lParam);
SetItem(nItem, 1, LVIF_PARAM, "", 0, 0, 0, lParam);
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I'm using MSHTML for browsing and parsing HTML in my application.
How can I get image data of some element after it is downloaded (or file name of this image downloaded in temporary internet files) ?
Thank you !
rrrado
|
|
|
|
|
I have a CTreeCtrl, I need to change the color of the node that was previously selected. How do I do this.
Also I can get the previous node to be bold, but then how do I reset the same when I click on some other node.?
|
|
|
|
|
Look into the MSDN documentation for the NM_CUSTOMDRAW message. That allows you to manipulate the visual appearance of the tree control without having to resort to full-blown owner-drawn implementations. Michael Dunn has done some nice articles on the subject elsewhere at CG - I suggest you search for them.
HTH
|
|
|
|