|
Hi all:
I have a program using a listctrl to display information from database which can sort the data by left click the headcontrol and then an image represent the sort state will be displayed. Everything works fine except running in Windows XP style. When I drag the column head with sort state image on it, the drag image become a whole black thing with nothing on it instead of the normal drag image with some transparency. This happens only for columns which have the sort state image on.
I use the following steps to set the sort image on the headcontrol:
<br />
CBitmap *pTempBmp = NULL;<br />
if( bAsc )<br />
pTempBmp = &m_bmpArrowUp;
else<br />
pTempBmp = &m_bmpArrowDown;
<br />
HD_ITEM Item; <br />
Item.mask = HDI_FORMAT;<br />
GetItem( nCol, &Item );<br />
Item.mask = HDI_BITMAP | HDI_FORMAT; <br />
Item.fmt |= HDF_BITMAP;<br />
Item.hbm = (HBITMAP)pTempBmp->GetSafeHandle();<br />
SetItem( nCol, &Item );<br />
So can anybody help me to solve this tiny problem?
Lisoft
|
|
|
|
|
i'm trying to remove an application from taskbar
<br />
#define mFunc(x) int __stdcall x(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause)<br />
mFunc(Remove)<br />
{<br />
Attach(mWnd);<br />
RemoveTaskbarButton();<br />
hOwner = CreateWindow("STATIC","",WS_OVERLAPPEDWINDOW,0,0,0,0,0,0,0,0);<br />
<br />
ShowWindow(mWnd,SW_HIDE);<br />
<br />
SetParent(mWnd,hOwner);<br />
ShowWindow(mWnd,SW_SHOW);<br />
<br />
return 0;<br />
}<br />
and this don't work either
<br />
<br />
mFunc(IsTaskbarAutoHideOn)<br />
{<br />
APPBARDATA ABData;<br />
ABData.cbSize = sizeof(ABData);<br />
SHAppBarMessage(ABM_GETSTATE, &ABData);<br />
wsprintf(data,"%d");<br />
return 3;<br />
}<br />
any idea's why? or what i'm missing. still kind of new.. so can u guys show me what i'm missing?
"Don't fight with idiots, first they pull you down to their level, then they smash you with their experience"
|
|
|
|
|
I would have guessed that the property would be a VARIANT, ( or _variant_t, which is a wrapper ), not a number or string.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Ok i'm using this code to return a date, but the problem is I need the date of the day before this. How could I subtract a day from the date? And what if it's the first of the month, the day before that would be the previous month? Any suggestions?
char GTime[80];
time_t now;
now = time(NULL);
strftime(GTime,sizeof GTime,"%m %d %y\n",localtime(&now));
cout<
|
|
|
|
|
|
How about:
time_t now = time(NULL);
time_t yesterday = now - 86400;
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
COleDateTime odtNow = COleDateTime::GetCurrentTime();
COleDateTimeSpan dtSpan(1,0,0,0);
odtNow -= dtSpan;
Use MFC - it helps.
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
hi
i m new to the field of activex and i want to know that are activeX (internet activex) made in the vc or vb are capable of self registering. or had to something extra to
register them. particularly the (internet activex) controll. if not that what functions will be used to register them.
i had made the (internet activex) that play the movie on the page i want to know that when user will visit my page then ocx will be selfdownloaded
and selfrejisted to that client pc. or what will happen.
ddd
|
|
|
|
|
When you compile an activex code in VC or VB environment, it self-registers them. For manually registering an ActiveX, you can use regsvr32 command on the command prompt.
When a user opens a web page which has an activeX, it self-registers it if user allows to get it installed on his machine.
Here[^]is a simpel tutorial on ActiveX controls in VC.
Einstein: "Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."
My Articles
|
|
|
|
|
hi
i had tried the issue of self rejisteration on my pc. i had installed the
iis and placed the web page containing the activex control. when i tried to run that web page the myactive x controll was not self rejistered. i had made ocx in one computer and check that thing on another machine to know whether self rejisteration occur or not but it dit not occured tell me what was wrong.
ddd
|
|
|
|
|
Did it ask you with a dialog to install the control or not? If it did, you should click yes to let it install itself.
Otherwise, there might be a problem with your internet explorer's security settings. Check the security level for Local Intranet and if it is high, lower it.
Einstein: "Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."
My Articles
|
|
|
|
|
no it did not show any dialog. it open the web page with empty i had also tried to lower the sccurity setting but it did not work too.
Be FaithFull To Your Work.
|
|
|
|
|
but no it did not show any dialog. i had also tried to lower the internet setting and run that but it did not work2.
when i debug through vc its environamnet register it and work fine. through the web page it does not work.
Be FaithFull To Your Work.
|
|
|
|
|
hi,
is there any way to display text in taskbar status area just like the way MS displays the clock?
i had a look at Shell_NotifyIcon and NOTIFYICONDATA. i don't see a way to do this.
thanks
venkat
|
|
|
|
|
venkatesh Madhipatla wrote:
is there any way to display text in taskbar status area just like the way MS displays the clock?
Yes, but the first question to ask is "Do you really need to?" Too many icons in the notification area is not a good thing. See here for more.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
i agree. but, i'm just curious as to how MS does that. using Shell_NotifyIcon, you can only pass a hIcon. Unless we put the text itself in the icon and change the image on the fly if we need to change the text later depending on some status.
|
|
|
|
|
See here.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
thanks. but i was trying to find out how to put a text instead of icon in the status area(just like clock). The clock seems to be plain text and the text dynamically changes.
venkat
|
|
|
|
|
venkatesh Madhipatla wrote:
thanks. but i was trying to find out how to put a text instead of icon in the status area(just like clock). The clock seems to be plain text and the text dynamically changes.
But unlike the icons, the clock is probably being drawn by the taskbar itself without any external application asking for it.
I don't know what you are trying to do, but adding your own toolbar to the taskbar might be a solution. Here's some info on that:
Using Application Desktop Toolbars[^]
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
i'm not sure about clock. when you double click on the clock, the date/time properties dialog is launched. so , i guess the clock is actually tied to date/time application.
thanks
|
|
|
|
|
Do you mean there is some "date/time" application that is running, is drawing the date and time in the taskbar, intercepts the double click on it and decides to show the date and time properties dialog? I don't think so. What application would that be?
I think the taskbar gets the date and time from the system, shows it in a predefined area, and implements the "Adjust Date/Time" context menu and double click by invoking the corresponding dialog (the same you can invoke from Control Panel). All done by the taskbar itself. In fact, if you look at the taskbar properties, you'll see a "Show the clock" property in the "Notification area" group.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
yes. A taskbar has something called "Status area". so, you can write an application which adds an icon to the status area by calling "Shell_NotifyIcon" API call and your application also get calls back from icons in status area using call back messages.That's how yahoo messenger/msn messenger etc add their icon to the "status area" and change the icon depending on status. Windows also does the same. only thing is windows does it differently. They have clock as text and dynamically update it. In fact, there are sharewares which does the same. But those sharewares to work, you need to remove clock from the task bar and they replace their own clock in that place. Anyway, i just was curious how windows does it.
thanks for participating in this thread.
venkat
|
|
|
|
|
I've been searching for a way to implement a control like a progressbar into the taskbar (not just the icon). The only way I found to implement a control into the taskbar is to get the clock hwnd and cover it with your application. That's actually not the best way to do this.
Congratulation to IBM with their Thinkpad Battery Gauge wich is placed on the left side of the icon tray. They did a great work with it but i actually don't know how to do this like they do.
|
|
|
|
|
I'm trying to make a path to a batch file and then processing the batch file. Does anyone know how I should do this?
|
|
|
|
|
Camron wrote:
Does anyone know how I should do this?
Which part: the making of the path, or the processing of the file? For the former, use CreateDirectory() . For the latter, see here.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|