|
Well, you application may create enties for the windows scheduler, se, for instance [^].
It is IMHO the cleanest way.
[added]
Try also to use CodeProject 's article search engine [^], it's free...
[/added]
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
modified on Thursday, February 5, 2009 8:54 AM
|
|
|
|
|
Task scheduler[^]? That's the API behind Windows Scheduled Tasks. You're much better off using facilities built into the OS than coding an equivalent yourself.
|
|
|
|
|
|
Dear all,
I used tree control in my dialog,i need to update values in a tree control at run time,while updating values during run time tree got collapsed and it is very bad to collpse while seeing a value,i need to update values at runtime without collapsing the tree control,please help me out.
Thanks in advance,
Regards,
angel
|
|
|
|
|
How do you update the values in the tree?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Hello,
This is the code iam using to display the tree.
HTREEITEM hItemRootVAL ;
HTREEITEM hItemParentVAL ;
HTREEITEM hItemSubVAL ;
HTREEITEM hItemTableVAL;
CString str;
hItemRootVAL = m_treePSISIInfo.InsertItem("PROGRAM",2,4, TVI_ROOT);
hItemParentVAL = m_treePSISIInfo.GetNextItem(hItemRootVAL, TVGN_CARET);
if(hItemParentVAL == NULL)
{
hItemParentVAL= m_treePSISIInfo.InsertItem("ONE",1,1,hItemRootVAL);
hItemSubVAL = m_treePSISIInfo.GetNextItem(hItemParentVAL, TVGN_CARET);
if(hItemSubVAL == NULL)
{
hItemSubVAL = m_treePSISIInfo.InsertItem("Table",0,0,hItemParentVAL);
hItemTableVAL = m_treePSISIInfo.GetNextItem(hItemSubVAL, TVGN_CARET);
if(hItemTableVAL == NULL)
{
str.Format("Table value 1 = 0x%02d",value1);
hItemTableVAL = m_treePSISIInfo.InsertItem(str,3,3,hItemSubVAL);
str.Format("Table value 2 = %d",value2);
hItemTableVAL = m_treePSISIInfo.InsertItem(str,3,3,hItemSubVAL);
str.Format("Table value 3 = 0x%04x",value3);
hItemTableVAL = m_treePSISIInfo.InsertItem(str,3,3,hItemSubVAL);
str.Format("Table value 4 = %d",value4);
hItemTableVAL = m_treePSISIInfo.InsertItem(str,3,3,hItemSubVAL);
str.Format("Table value 5 = %d",value5);
hItemTableVAL = m_treePSISIInfo.InsertItem(str,3,3,hItemSubVAL);
str.Format("Table value 6 = %d",value6);
hItemTableVAL = m_treePSISIInfo.InsertItem(str,3,3,hItemSubVAL);
str.Format("Table value 7 = %d",value7);
hItemTableVAL = m_treePSISIInfo.InsertItem(str,3,3,hItemSubVAL);
}
}
Actually in this code value1,value2........up to value7.frequently these values change at runtime. when ever these values got changed i need to update those values with out collpsing the tree.please help me how to do.
Regards ,
Angel.
|
|
|
|
|
And you delete all the items in the tree and insert them again every time there is a change? If so, rather than rebuilding the whole tree all the time, use CTreeCtrl::SetItemText[^] to change the text in the tree, this should leave the expanded-collapsed states untouched.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
What about making a note of which node is open, do the update, and then open that node back up afterwards?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi, i have a SDI app without toolbar and I need to add images to some of my menu items.
How can I do it?
Thanks.
|
|
|
|
|
there are thousands of example articles out there.
did you search any by chance ?
|
|
|
|
|
Yes, but they all include some user drawn class.
I was wondering could it be done for standard menus? Sorry for my poor language.
|
|
|
|
|
nope, the standard menu don't support this.
but using owner drawn menus wouldn't be too hard if using an all made class...
|
|
|
|
|
|
Thanks.
I used 'BCMenu' because I already have it included in my project.
|
|
|
|
|
Hello All,
I hav written a dialog based application. By pressing a button I want to open a .WMV video. I have used ShellExecute() function. Then How to set it to Full Screen through program?
Thanks & Regards
Sairam
|
|
|
|
|
sairam madem wrote: I have used ShellExecute() function.
What are you passing as the last argument?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
IF you dont need to Media player you cna use of MCI functions and they are easy to use like this for example.
CString str=_T("play f:\\93.mpg");
mciSendString(str,0,0,0);
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Is there a WIN32 function that will tell me whether any modifier key is pressed?
The context is a mouse hook function that is only interested if one or more modifier keys (shift, ctrl, alt) is pressed. If no key is pressed it just passes the event to the next hook.
I know that GetKeyState() returns the state of a specified virtual key, and that GetKeyboardState() returns an array of states. But a function that just tells me if ANY modifier key is pressed would add less latency in cases (most of the time) when a key is not pressed.
Thanks for listening
|
|
|
|
|
What's wrong with GetAsyncKeyState() ?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Thanks for the reply.
Like GetKeyState(), I think GetAsyncKeyState() just tells me about a single key. I would prefer a single function call that tells me whether any modifier has been pressed, thus saving several system calls in the hook context.
|
|
|
|
|
nybody can tell me how to set ANTIALIASED_QUALITY for LOGFONT i did but it s nt working for me sometime./ plz look in ANTIALIASES_QUALITY message before this
|
|
|
|
|
this is not a chat, it is a forum...
if you can't wait more than 1/2 hour for an answer, just don't ask
|
|
|
|
|
Hi all,
My situation is that I have to intercept a click on the print button on an IE print preview window. The project dictates that the Page Setup dialog should be opened first when Print is clicked.
My question is what is the best way to do this?
I have subclassed the window but the toolbar buttons are not separate windows so all I'm getting is a WM_LBUTTONDOWN message to the main window with the location of the click. I can of course stop this message getting through but knowing for sure when the right button has been hit is where I'm having a problem with this technique.
Is there a way of querying the window to find the rect and position of the print button? I'm unhappy about measuring it myself and hard coding in the value in case some system change invalidates the value I've come up with
Thanks for any ideas and help
Cheers
Tom
Philosophy: The art of never getting beyond the concept of life.
Religion: Morality taking credit for the work of luck.
|
|
|
|
|
CFont dateFont, eventFont;
LOGFONT logFont;
GetLogFontStruct(logFont, 16, 0, pDC);
dateFont.CreateFontIndirect(&logFont);
GetLogFontStruct(logFont, 10, 0, pDC);
eventFont.CreateFontIndirect(&logFont);
void CCalendar::GetLogFontStruct(LOGFONT & logFont,int height,int width,
CDC * pDC, CString strFontName)
{
logFont.lfHeight = -MulDiv(height + 1, pDC->GetDeviceCaps(LOGPIXELSY), 72);
logFont.lfWidth = -MulDiv(width, pDC->GetDeviceCaps(LOGPIXELSX), 72);
logFont.lfEscapement = 0;
logFont.lfOrientation = 0;
logFont.lfWeight = FW_NORMAL;
logFont.lfItalic = 0;
logFont.lfUnderline = 0;
logFont.lfStrikeOut = 0;
logFont.lfCharSet = DEFAULT_CHARSET;
logFont.lfOutPrecision = OUT_DEVICE_PRECIS;
logFont.lfClipPrecision = CLIP_DEFAULT_PRECIS;
logFont.lfQuality = ANTIALIASED_QUALITY; //CLEARTYPE_QUALITY; //PROOF_QUALITY;
logFont.lfPitchAndFamily = 0; //DEFAULT_PITCH | FF_SWISS;
_tcscpy_s(logFont.lfFaceName, strFontName);
}
i do restore font after drawing
after this while drawing in case of dateFont it comes ANTIALIASES_QUALITY
but in case of eventFont it does not come...
plz help.
|
|
|
|
|
I have to diaplay one png image in dialog box(like bmp in picture control).
any can help me...
my image has some transparent things... if change it into bmp format than it won't be transparent
so what i have to for diaplaying png image in dialog
|
|
|
|