|
Sorry earlier i sent the log after i have added some code which weren't help me...
Please check the below log and let me know where i am going wrong..?
16:41:12:106- Scroll Dialog init dialog function called
16:41:12:480- old_x1 = -842150451,old_y1 = -842150451,old_x2 = -842150451,old_y2 = -842150451
16:41:12:494- SetRop2 is called with nOldmode and return value is : 13
16:41:12:495- x1 = 37,y1 = 68,x2 = 37,y2 = 827
16:41:15:480- old_x1 = 37,old_y1 = 68,old_x2 = 37,old_y2 = 827
16:41:15:494- SetRop2 is called with nOldmode and return value is : 13
16:41:15:495- x1 = 153,y1 = 68,x2 = 153,y2 = 827
16:41:15:480- old_x1 = 153,old_y1 = 68,old_x2 = 153,old_y2 = 827
16:41:15:494- SetRop2 is called with nOldmode and return value is : 13
16:41:15:495- x1 = 153,y1 = 68,x2 = 153,y2 = 827
16:41:15:480- old_x1 = 153,old_y1 = 68,old_x2 = 153,old_y2 = 827
16:41:15:494- SetRop2 is called with nOldmode and return value is : 13
16:41:15:495- x1 = 153,y1 = 68,x2 = 153,y2 = 827
16:41:16:480- old_x1 = 153,old_y1 = 68,old_x2 = 153,old_y2 = 827
16:41:16:494- SetRop2 is called with nOldmode and return value is : 13
16:41:16:495- x1 = 155,y1 = 68,x2 = 155,y2 = 827
16:41:16:210- VSroll bar clicked
16:41:16:220- x = 0, y = 0
16:41:16:210- VSroll bar clicked
16:41:16:220- x = 0, y = 3
16:41:16:480- old_x1 = 155,old_y1 = 68,old_x2 = 155,old_y2 = 827
16:41:16:494- SetRop2 is called with nOldmode and return value is : 13
16:41:16:495- x1 = 155,y1 = 65,x2 = 155,y2 = 824
16:41:16:210- VSroll bar clicked
16:41:16:220- x = 0, y = 11
16:41:16:210- VSroll bar clicked
16:41:16:220- x = 0, y = 12
16:41:16:480- old_x1 = 155,old_y1 = 65,old_x2 = 155,old_y2 = 824
16:41:16:494- SetRop2 is called with nOldmode and return value is : 13
16:41:16:495- x1 = 155,y1 = 56,x2 = 155,y2 = 815
16:41:16:210- VSroll bar clicked
16:41:16:220- x = 0, y = 31
16:41:16:210- VSroll bar clicked
16:41:16:220- x = 0, y = 39
16:41:16:480- old_x1 = 155,old_y1 = 56,old_x2 = 155,old_y2 = 815
16:41:16:494- SetRop2 is called with nOldmode and return value is : 13
16:41:16:495- x1 = 155,y1 = 29,x2 = 155,y2 = 788
16:41:16:210- VSroll bar clicked
16:41:16:220- x = 0, y = 70
16:41:16:210- VSroll bar clicked
16:41:16:220- x = 0, y = 78
16:41:16:480- old_x1 = 155,old_y1 = 29,old_x2 = 155,old_y2 = 788
16:41:16:494- SetRop2 is called with nOldmode and return value is : 13
16:41:16:495- x1 = 155,y1 = -10,x2 = 155,y2 = 749
16:41:16:210- VSroll bar clicked
16:41:16:220- x = 0, y = 121
16:41:16:480- old_x1 = 155,old_y1 = -10,old_x2 = 155,old_y2 = 749
16:41:16:494- SetRop2 is called with nOldmode and return value is : 13
16:41:16:495- x1 = 155,y1 = -53,x2 = 155,y2 = 706
16:41:16:210- VSroll bar clicked
16:41:16:220- x = 0, y = 159
16:41:16:480- old_x1 = 155,old_y1 = -53,old_x2 = 155,old_y2 = 706
16:41:16:494- SetRop2 is called with nOldmode and return value is : 13
16:41:16:495- x1 = 155,y1 = -91,x2 = 155,y2 = 668
16:41:16:210- VSroll bar clicked
16:41:16:220- x = 0, y = 182
16:41:16:210- VSroll bar clicked
16:41:16:220- x = 0, y = 193
16:41:16:480- old_x1 = 155,old_y1 = -91,old_x2 = 155,old_y2 = 668
16:41:16:494- SetRop2 is called with nOldmode and return value is : 13
16:41:16:495- x1 = 155,y1 = -125,x2 = 155,y2 = 634
16:41:16:210- VSroll bar clicked
16:41:16:220- x = 0, y = 215
16:41:16:210- VSroll bar clicked
16:41:16:220- x = 0, y = 218
16:41:16:480- old_x1 = 155,old_y1 = -125,old_x2 = 155,old_y2 = 634
16:41:16:494- SetRop2 is called with nOldmode and return value is : 13
16:41:16:495- x1 = 155,y1 = -150,x2 = 155,y2 = 609
16:41:16:210- VSroll bar clicked
16:41:16:220- x = 0, y = 235
16:41:16:210- VSroll bar clicked
16:41:16:220- x = 0, y = 237
16:41:16:480- old_x1 = 155,old_y1 = -150,old_x2 = 155,old_y2 = 609
16:41:16:494- SetRop2 is called with nOldmode and return value is : 13
16:41:16:495- x1 = 155,y1 = -169,x2 = 155,y2 = 590
16:41:16:210- VSroll bar clicked
16:41:16:220- x = 0, y = 248
16:41:16:480- old_x1 = 155,old_y1 = -169,old_x2 = 155,old_y2 = 590
16:41:16:494- SetRop2 is called with nOldmode and return value is : 13
16:41:16:495- x1 = 155,y1 = -180,x2 = 155,y2 = 579
16:41:16:210- VSroll bar clicked
16:41:16:220- x = 0, y = 254
16:41:16:210- VSroll bar clicked
16:41:16:220- x = 0, y = 255
16:41:16:480- old_x1 = 155,old_y1 = -180,old_x2 = 155,old_y2 = 579
16:41:16:494- SetRop2 is called with nOldmode and return value is : 13
16:41:16:495- x1 = 155,y1 = -187,x2 = 155,y2 = 572
16:41:16:210- VSroll bar clicked
16:41:16:220- x = 0, y = 260
16:41:17:480- old_x1 = 155,old_y1 = -187,old_x2 = 155,old_y2 = 572
16:41:17:494- SetRop2 is called with nOldmode and return value is : 13
16:41:17:495- x1 = 155,y1 = -192,x2 = 155,y2 = 567
16:41:17:210- VSroll bar clicked
16:41:17:220- x = 0, y = 265
16:41:17:480- old_x1 = 155,old_y1 = -192,old_x2 = 155,old_y2 = 567
16:41:17:494- SetRop2 is called with nOldmode and return value is : 13
16:41:17:495- x1 = 155,y1 = -197,x2 = 155,y2 = 562
16:41:17:210- VSroll bar clicked
16:41:17:220- x = 0, y = 269
16:41:17:210- VSroll bar clicked
16:41:17:220- x = 0, y = 271
16:41:17:480- old_x1 = 155,old_y1 = -197,old_x2 = 155,old_y2 = 562
16:41:17:494- SetRop2 is called with nOldmode and return value is : 13
16:41:17:495- x1 = 155,y1 = -203,x2 = 155,y2 = 556
16:41:17:480- old_x1 = 155,old_y1 = -203,old_x2 = 155,old_y2 = 556
16:41:17:494- SetRop2 is called with nOldmode and return value is : 13
16:41:17:495- x1 = 157,y1 = -203,x2 = 157,y2 = 556
16:41:17:210- VSroll bar clicked
16:41:17:220- x = 0, y = 271
16:41:17:480- old_x1 = 157,old_y1 = -203,old_x2 = 157,old_y2 = 556
16:41:17:494- SetRop2 is called with nOldmode and return value is : 13
16:41:17:495- x1 = 158,y1 = -203,x2 = 158,y2 = 556
16:41:17:210- VSroll bar clicked
16:41:17:220- x = 0, y = 271
16:41:18:480- old_x1 = 158,old_y1 = -203,old_x2 = 158,old_y2 = 556
16:41:18:494- SetRop2 is called with nOldmode and return value is : 13
16:41:18:495- x1 = 159,y1 = -203,x2 = 159,y2 = 556
16:41:18:210- VSroll bar clicked
16:41:18:220- x = 0, y = 269
16:41:18:480- old_x1 = 159,old_y1 = -203,old_x2 = 159,old_y2 = 556
16:41:18:494- SetRop2 is called with nOldmode and return value is : 13
16:41:18:495- x1 = 159,y1 = -201,x2 = 159,y2 = 558
16:41:18:210- VSroll bar clicked
16:41:18:220- x = 0, y = 260
16:41:18:210- VSroll bar clicked
16:41:18:220- x = 0, y = 255
16:41:18:480- old_x1 = 159,old_y1 = -201,old_x2 = 159,old_y2 = 558
16:41:18:494- SetRop2 is called with nOldmode and return value is : 13
16:41:18:495- x1 = 159,y1 = -187,x2 = 159,y2 = 572
16:41:18:210- VSroll bar clicked
16:41:18:220- x = 0, y = 234
16:41:18:210- VSroll bar clicked
16:41:18:220- x = 0, y = 221
16:41:18:480- old_x1 = 159,old_y1 = -187,old_x2 = 159,old_y2 = 572
16:41:18:494- SetRop2 is called with nOldmode and return value is : 13
16:41:18:495- x1 = 159,y1 = -153,x2 = 159,y2 = 606
16:41:18:210- VSroll bar clicked
16:41:18:220- x = 0, y = 181
16:41:18:210- VSroll bar clicked
16:41:18:220- x = 0, y = 165
16:41:18:480- old_x1 = 159,old_y1 = -153,old_x2 = 159,old_y2 = 606
16:41:18:494- SetRop2 is called with nOldmode and return value is : 13
16:41:18:495- x1 = 159,y1 = -97,x2 = 159,y2 = 662
16:41:18:210- VSroll bar clicked
16:41:18:220- x = 0, y = 92
16:41:18:480- old_x1 = 159,old_y1 = -97,old_x2 = 159,old_y2 = 662
16:41:18:494- SetRop2 is called with nOldmode and return value is : 13
16:41:18:495- x1 = 159,y1 = -24,x2 = 159,y2 = 735
16:41:18:210- VSroll bar clicked
16:41:18:220- x = 0, y = 25
16:41:18:480- old_x1 = 159,old_y1 = -24,old_x2 = 159,old_y2 = 735
16:41:18:494- SetRop2 is called with nOldmode and return value is : 13
16:41:18:495- x1 = 159,y1 = 43,x2 = 159,y2 = 802
16:41:18:210- VSroll bar clicked
16:41:18:220- x = 0, y = 0
16:41:18:480- old_x1 = 159,old_y1 = 43,old_x2 = 159,old_y2 = 802
16:41:18:494- SetRop2 is called with nOldmode and return value is : 13
16:41:18:495- x1 = 159,y1 = 68,x2 = 159,y2 = 827
16:41:18:210- VSroll bar clicked
16:41:18:220- x = 0, y = 0
16:41:18:480- old_x1 = 159,old_y1 = 68,old_x2 = 159,old_y2 = 827
16:41:18:494- SetRop2 is called with nOldmode and return value is : 13
16:41:18:495- x1 = 160,y1 = 68,x2 = 160,y2 = 827
16:41:19:480- old_x1 = 160,old_y1 = 68,old_x2 = 160,old_y2 = 827
16:41:19:494- SetRop2 is called with nOldmode and return value is : 13
16:41:19:495- x1 = 161,y1 = 68,x2 = 161,y2 = 827
16:41:19:480- old_x1 = 161,old_y1 = 68,old_x2 = 161,old_y2 = 827
16:41:19:494- SetRop2 is called with nOldmode and return value is : 13
16:41:19:495- x1 = 162,y1 = 68,x2 = 162,y2 = 827
|
|
|
|
|
The only thing I can think of is that the scroll-bar offset is changing between the time that you assign a value to old_x and the time you use it, so it doesn't refer to the same position on screen at both points in time.
Aside from that, I'm sorry - I really can't help.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Thanks Stuart,
Thank you so much for your help on images and check boxes....
Thanks
Venkatesh
|
|
|
|
|
Hi all,
I am working on vs2005 (vc++8).
I have created one dll in vs2005(vc++8), in that we have one function which returns "std::string" .
when i load this dll in another vs2005(vc++8) application and call the function which returns "std::string",
we get following error:
Windows has triggered a breakpoint in vstestdll.exe.
This may be due to a corruption of the heap, and indicates a bug in vstestdll.exe or any of the DLLs it has loaded.
The output window may have more diagnostic information
For more detail code is as follows:
[code]
dll function :
std::string getDH1(int clo)
{
return std::string("abcdefghijklmnopqr");
}
.exe code:
#define TEST2_API __declspec(dllimport);
TEST2_API std::string getDH1(int clo);
int _tmain(int argc, _TCHAR* argv[])
{
string sam =getDH1(1);
return 0;
}
[/code]
|
|
|
|
|
Does your code use a static library version of the C runtime? If so, then this sort of error is quite likely, as the EXE and DLL have different C heaps, so when the std::string is destructed, the EXE is trying to free memory in the DLL's heap, which is bad.
Look in Project Properties, C/C++->Code Generation, Runtime Library option.
|
|
|
|
|
I hope I can express the question with my poor english.
I wanna write a dialog based program, and let user to set the time and at the given time, execute other programs(the user gives the exe file path).
Can give some code hint or source code like this?
Or a program in sourceforge having such function issue.
|
|
|
|
|
Why don't you use Windows 's Scheduled Tasks (see, for instance [^])?
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]
|
|
|
|
|
I need implement this function in my program.
|
|
|
|
|
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 )
|
|
|
|
|