|
Hi,
I have a splitter window project with 2 colums.
My left pane base class is "CFormView" and right pane is "CScrollView".
How to share a common Vertical scroll bar for both panes ?
Thanks in advance.
Aby Jacob
|
|
|
|
|
I dont know how to share it, but you can always sincronize both of them when one is moved.
In the OnScroll () or by OnScrollBy () you can make something like:
int nVertPos = pDoc->m_csbMyScrollBar1->GetScrollPos (SB_VERT);
pDoc->m_csbMyScrollBar2->SetScrollPos (SB_VERT, nVertPos, bRedraw);
pDoc->UpdateAllWindos (NULL);
I'm supposing a CScrollBar* for every one of them in the document, to have easier access to both with independance of which view is the active.
Or something like this.
Hope it helps
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
One method is that when you receive the VScroll messages for one view, send them to the other also, provided the range and thumb size are same for both.
- NS -
|
|
|
|
|
Hello all;
I'm currently working on encryption algorithm for small embedded systems.....I had selected a combination of RSA and Blowfish.....where RSA is used for the session key encryption...
Could any body suggest a method of transferring the public keys to the recipients with authentication without using the CA certification or PKI....as its dealing with embedded systems and having a third party to monitor the public key transfer is a major area of concern..
Any help in this regard will be greatly appreciated..
Thanking you'll in advance..
sc_emb
sc_emb
|
|
|
|
|
Don't cross post!
Peter
"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."
|
|
|
|
|
I am trying to create a scheduler using ITaskScheduler but I am struck up while running the job. I am able to create the job but it is throwing an error while saving the job at
hr = pIPersistFile->Save(NULL,TRUE);
The Error that is getting logged is
The attempt to retrieve account information for the specified task failed; therefore, the task did not run. Either an error occurred, or no account information existed for the task.
The specific error is:
0x8004130f: No account information could be found in the Task Scheduler security database for the task indicated.
I am using XP , do anyone has any idea why it is failing while saving?
|
|
|
|
|
Did you call IScheduledWorkItem::SetAccountInformation() ?
|
|
|
|
|
Yes , i pass both the parameters username and password but the still same error exists.
I went through the microsoft site , it seems this was a bug in earlier XP versions but that fix was made.
I am using XP version 2002 service pack 2, is this the version in which fix is made or not?
Thanx for reply!!
|
|
|
|
|
Can you create the job manually, and have it run?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Yes, if i go to that job and specify the password in the properties, the job runs fine , its just that through setAccountInformation I am not able to run that job?
It is picking my default Windows login and not the userID I specify in setAccountInformation.
What could be the reason?
|
|
|
|
|
How are you using the SetAccountInformation() method?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
This is the flow :
hr = pITask->SetApplicationName(pwszApplicationName);
TCHAR pszName[500] = "User";
TCHAR pszPwd[500] = "Password";
hr = pITask->SetAccountInformation((LPCWSTR)pszName, (LPCWSTR)pszPwd);
hr = pITask->CreateTrigger(&piNewTrigger,&pITaskTrigger);
hr = pITaskTrigger->SetTrigger (&pTrigger);
hr = pIPersistFile->Save(NULL,TRUE); // Here Error is getting Logged in SchedLgU
|
|
|
|
|
What is the value of hr ?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hr = -2147216619
This is the value it gives while saving thru IPersistFile->Save
|
|
|
|
|
I think that value resolves to SCHED_E_SERVICE_NOT_RUNNING .
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
fatal error C1076: compiler limit : internal heap limit reached; use /Zm to specify a higher limit
in #include "stdafx.h"
?????
|
|
|
|
|
it also occurs in the line #include "assert.h"
|
|
|
|
|
anybody know how to clear this error??
|
|
|
|
|
Off MSDN:This Site[^]
Visual C++ Concepts: Building a C/C++ Program
Fatal Error C1076
compiler limit : internal heap limit reached; use /Zm to specify a higher limit
Probable cause
Too many symbols
Possible solutions
Use the /Zm option to set the compiler memory limit.
Eliminate unnecessary include files.
Eliminate unnecessary global variables, for example, by allocating memory dynamically instead of declaring a large array.
Eliminate unused declarations.
Split large functions into smaller functions.
Split large classes into smaller classes.
Split the current file into smaller files.
If C1076 occurs immediately after the build starts, the value specified for /Zm is probably too high for your program. Reduce the /Zm value.
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Hi friends,
i want to delete the data of file, by using the file operations
Ex:(like through file operations we can create file, we can write in file, Append the File,But How to Delete the Content of File)
varun
|
|
|
|
|
|
Open the file and call ZeroMemory()
Or open the file using CreateFile passing the CREATE_ALWAYS flag.
Waldermort
|
|
|
|
|
WalderMort wrote: call ZeroMemory()
Did you really mean that? ZeroMemory is related to memory content, right?
- NS -
|
|
|
|
|
varun01 wrote: How to Delete the Content of File)
Use CreateFile() with CREATE_NEW or CREATE_ALWAYS . There's also DeleteFile() .
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
...or CreateFile() with the TRUNCATE_EXISTING flag if you want to keep the file but
empty its contents.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|