|
Does anyone here have an example of a User Interface library for AD Schema modifications?
I am working on some additional attributes for a user and need to place a new tab in the properties window (like Exchange does) so the admin has a way to set the properties.
|
|
|
|
|
I am trying to get to get a tree conrol to place the text that it selects at the very top of its corresponding view. I have tried the following code (as is, and with adding/subtracting a value to it) and the result is always that the highlighted text is 1 line above the visible line. Without the LineScroll code, then the selection (highlight) may/may not appear within the visible view, depending upon the direction of the next line.
sSecondPart = sItemData.Right(sItemData.GetLength()-sFirstPart.GetLength());
CMainFrame* pMDIFrame = (CMainFrame*)AfxGetMainWnd();
ASSERT(pMDIFrame);
CChildFrame* pMDIChild = (CChildFrame*)pMDIFrame->MDIGetActive();
ASSERT(pMDIChild);
CEJOrganizerView* pView = (CEJOrganizerView*) pMDIChild->m_wndSplitter.GetPane(0,1);
CRichEditCtrl& rCtrl = pView->GetRichEditCtrl();
int iStart = rCtrl.LineIndex(atoi(sSecondPart));
int iEnd = rCtrl.LineIndex(atoi(sSecondPart)+1);
int iFirstVisible = rCtrl.GetFirstVisibleLine();
// This doesn't work as intended,
rCtrl.LineScroll(rCtrl.LineIndex(atoi(sSecondPart)) - iFirstVisible,0);
rCtrl.SetSel(iStart,iEnd);
if I use: rCtrl.LineScroll(-iFirstVisible,0) then the selected text is always in view, but it is always toward the bottom of the view.
Thanks
Wade Holt
|
|
|
|
|
Ok, so how do I get from:
double x = .0625;
CString s;
s.Format("???",x);
so that s looks like: 6.25000000000000000E-02
Nitron
_________________________________________--
message sent on 100% recycled electrons.
|
|
|
|
|
s.Format("%.16E",x) - i think...
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
|
Try this:
double fp = .0625;<br />
CString s;<br />
s.Format( "%e", fp );
// Fazlul
Get RadVC today! Play RAD in VC++
http://www.capitolsoft.com
|
|
|
|
|
Nitron wrote:
so that s looks like: 6.25000000000000000E-02
This should do it:
s.Format(_T("%.15e\n"), x);
Nick Parker
The goal of Computer Science is to build something that will last at least until we've finished building it. - Unknown
|
|
|
|
|
Nitron
_________________________________________--
message sent on 100% recycled electrons.
|
|
|
|
|
CProgressBarCZipView *pView = (CProgressBarCZipView *) pChild->GetActiveView();
long hPbHandle = (long)pView->GetSafeHwnd();
CButton *pBar = (CButton*)GetDlgItem(IDC_BUTTON3);
long hPbHandle = (long)pBar->GetSafeHwnd();
Thanks,
ns
|
|
|
|
|
Yes, except that you mistakenly (typo) overwrote hPbHandle .
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
What is the best way to set up a timer for a process that will take an hour or two?
_____________________
"So in the interests of survival, they trained themselves to be agreeing machines instead of thinking machines. All their minds had to do was to discover what other people were thinking, and then they thought that, too."
Breakfast of Champions, Kurt Vonnegut
|
|
|
|
|
By 'process' you mean Windows process which has some timeout period in your case? Or some general activity?
You have number of options - classic Window timers, waitable timers, WaitForXXX APIs.
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
The user sets the timeout period.
_____________________
"So in the interests of survival, they trained themselves to be agreeing machines instead of thinking machines. All their minds had to do was to discover what other people were thinking, and then they thought that, too."
Breakfast of Champions, Kurt Vonnegut
|
|
|
|
|
The timeout of what? Do you create other process by spawning some executable, or are you performing some activity in your own app?
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
Tomasz Sowinski wrote:
The timeout of what?
When the videotape ends. A friend wants me to write him an app to stop his video capture program after a period of time so he can run the program overnight without filling his harddrive and crashing.
I know how to use SetTimer() for short delays, but I want to know if there is a better solution for long delays (like an hour or more).
_____________________
"So in the interests of survival, they trained themselves to be agreeing machines instead of thinking machines. All their minds had to do was to discover what other people were thinking, and then they thought that, too."
Breakfast of Champions, Kurt Vonnegut
|
|
|
|
|
I'd use WaitForSingleObject with timeout in this case.
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
Thanks.
_____________________
"So in the interests of survival, they trained themselves to be agreeing machines instead of thinking machines. All their minds had to do was to discover what other people were thinking, and then they thought that, too."
Breakfast of Champions, Kurt Vonnegut
|
|
|
|
|
How can I disable WinKey and another system shortcuts ?
Thanx.
LB
|
|
|
|
|
rewrite the gina.dll
Papa
Murex Co.
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
To disable WinKey i found but didnt tried it!
http://is-it-true.org/nt/registry/rtips92.shtml
Papa
Murex Co.
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
change registry ? BTW: I havent following item in register
Hive: HKEY_CURRENT_USER
Key:Software\Microsoft\Windows\CurrentVersion\Policies\System
Name: DisableLockWorkstation
Type: REG_DWORD
Value: 1 disable
I found this but its not for Win2K and later :/
SystemParametersInfo(SPI_SCREENSAVERRUNNING, true, NULL, 0);
Thakx
Wiizi
|
|
|
|
|
if u do like the page says ull be creating this key
Papa
Murex Co.
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
|
Heres the VC client calling the function in a DlL:
CButton * pBar = (CButton*)GetDlgItem(IDC_BUTTONRECV);
long hPbHandle = (long)pBar->GetSafeHwnd();
_CRemoteCall p;
p.CreateDispatch("DllwithForm.Class1");
p.CheckingPB(hPbHandle);
p.ReleaseDispatch();
In the dll, the message is being sent as:
SendMessage(PbarHandle, WM_COMMAND, 0, 0)
This is supposed to trigger of my (test) button handler. But it doesnt....What might be the problem here?
Thanks,
ns
|
|
|
|
|
The wParam (argument which goes right after WM_COMMAND) in the SendMessage call should contain identifier of your button (probably IDC_BUTTONRECV).
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|