|
konac wrote:
Is this easy to implement using C++ ?
Since you are experienced in programing this should be fairly easy for you, except the part where you would want this program to run as a service. Do you have any experience in that?
konac wrote:
The software should be able to run in all Windows versions.
That depends on what you're trying to build and what kind of functions you will be calling. In general most programs will run in all Windows versions but you should always check the functions that you are using. They always tell you the platforms where they can run. Also from my experience in using ADO 2.7, I found out that I can't install MDAC 2.7 in windows 95.
konac wrote:
Every time windows starts up, the program should check if the number of days initially configured has not already passed.
You could check out this article [^].
konac wrote:
If the time has expired, the program should ask for a password..
This is not difficult either. You have to encrypt your password and store it in a safe location. Make sure it's a one way encryption and don't provide any decrytion methods in your source code. When the user enters the password, encrypt it, and then compare it against the encrypted stored password. You should be able to find many encryption libraries in the web.
konac wrote:
Windows access should be blocked
I really have no advice on this topic because I am so against blocking the user from logging in just because your program decides to do so. Let Windows handle that. No offense.
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
Thank you for your reply !
I have no experience with programs that run as services, relatively few information is available on the net regarding this topic ... Does anyone has more information? Or maybe someone knows a good source on the web ?
Thank you !
|
|
|
|
|
Is a WH_CALLWNDPROC global hook not supposed to catch WM_KEYUP/WM_KEYDOWN messages for some reason? I have an edit control hooked, but I can't get these messages. I do get some normal ones (focus, destry, a few edit control ones), so I know it is hooked right :/ Spy++ shows the WM_KEYUP/WM_KEYDOWN messsages fine.
|
|
|
|
|
I have a kind of *unusual* problem:
m_EditBox, and m_strText, where m_strText.GetLength = 10 (for example). Is is possible to set the text in the box so that the first 5 characters display black, while the last 5 display red? I tried this whenever I send ON_EN_CHANGE for the box:
void CTwoColorEdit::OnEditChange()<br />
{<br />
CString text;<br />
m_ctlFirst.GetWindowText( text ); <br />
if ( text.GetLength() > 5 )<br />
m_EditBox.SetTextColor(RED);<br />
else<br />
m_EditBox.SetTextColor(BLACK);<br />
}
The problem of course is that SetTextColor changes the color of the entire string, not just the last entered character...Is there some way of setting the color of the last updated character while leaving the text already in the box as is?
Reistance is futile...
( When < 1 OHM )
|
|
|
|
|
CRichEditCtrl is the solution.
Maximilien Lincourt
For success one must aquire one's self
|
|
|
|
|
Darn it! Beaten to it
My world tour
What I do now..
"I spent a lot of my money on booze, birds and fast cars. The rest I just squandered"
George Best.
"I suppose if it was a choice between bon jovi and the interior of a car, the car would win, even it didnt have a radio and I had to sit in silence" James Simpson on Light Metal.
|
|
|
|
|
but you gave a better answer!
Maximilien Lincourt
For success one must aquire one's self
|
|
|
|
|
Instead of a CEdit, use a CRichEditCtrl. Use SetSel to select the characters you want to change and then SetSelectionCharFormat( CHARFORMAT& cf ) to change the formatting of the text you want. By setting the crTextColor attribute of the CHARFORMAT structure, you can change the colour to whatever you want. Check out CRichEditCtrl in MSDN.
hope this helps
Adam.
My world tour
What I do now..
"I spent a lot of my money on booze, birds and fast cars. The rest I just squandered"
George Best.
"I suppose if it was a choice between bon jovi and the interior of a car, the car would win, even it didnt have a radio and I had to sit in silence" James Simpson on Light Metal.
|
|
|
|
|
Thank you much Next time I will dig on msdn a little longer before posting
~Sorcia
|
|
|
|
|
if i have administrative privilages of a machine(have user name and password)
Please give me some idea so that i can write a program to login that machine using username and password.
gautam
|
|
|
|
|
I would like to know how to change the height of a statusbar. Basically I want to make an owner-drawn status bar that is a little bit taller than the default MFC one.
Cheers,
Clint
|
|
|
|
|
I am using an SDI application with a splitter window and I want to change the view in one of the panes depending on what menu item is selected (e.g. go from a TreeView to a ListView). It seems to work but when redrawing the whole thing looks like a dog's breakfast. When I resize the splitter it seems to then redraw okay. Any suggestions? Am I not getting the size correct? I also tried Invalidate() for the frame window but it didn't seems to be sucessful either.
...<br />
m_Split2.GetColumnInfo(1,cx,ctemp);<br />
m_Split2.GetRowInfo(0,cy,ctemp);<br />
m_Split2.DeleteView(0,1);<br />
m_Split2.CreateView(0,1,RUNTIME_CLASS(CMyListView),CSize(cx,cy),NULL);<br />
GetActiveDocument()->UpdateAllViews(NULL);<br />
...
Many thanks
Adam.
My world tour
What I do now..
"I spent a lot of my money on booze, birds and fast cars. The rest I just squandered"
George Best.
"I suppose if it was a choice between bon jovi and the interior of a car, the car would win, even it didnt have a radio and I had to sit in silence" James Simpson on Light Metal.
|
|
|
|
|
http://www.codeproject.com/docview/switchingviews.asp[^] should help
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Ryan,
You de man! Thanks
Adam.
My world tour
What I do now..
"I spent a lot of my money on booze, birds and fast cars. The rest I just squandered"
George Best.
"I suppose if it was a choice between bon jovi and the interior of a car, the car would win, even it didnt have a radio and I had to sit in silence" James Simpson on Light Metal.
|
|
|
|
|
When I go to reopen my workspace project, I only get "CAboutDlg". The other View,Doc and Frame classes are not there, how do I reopen them as well? When I compile, I get the following message:
Compiling...
Exodus.cpp
StdAfx.cpp
Linking...
Exodus.obj : error LNK2001: unresolved external symbol "public: static struct CRuntimeClass const CExodusDoc::classCExodusDoc" (?classCExodusDoc@CExodusDoc@@2UCRuntimeClass@@B)
Exodus.obj : error LNK2001: unresolved external symbol "public: static struct CRuntimeClass const CMainFrame::classCMainFrame" (?classCMainFrame@CMainFrame@@2UCRuntimeClass@@B)
Exodus.obj : error LNK2001: unresolved external symbol "public: static struct CRuntimeClass const CExodusView::classCExodusView" (?classCExodusView@CExodusView@@2UCRuntimeClass@@B)
Debug/Exodus.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.
Exodus.exe - 4 error(s), 0 warning(s)
Thanks
I am using VC++ 6.0.
|
|
|
|
|
My first thought was that you simply needed to delete the project's CLW and NCB files and let Visual Studio rebuild them. However, the linker errors suggest that the files were somehow removed from the project. Have you tried adding them manually?
|
|
|
|
|
Thanks Dave, you were right...I needed to add the files manually. It appears that hardly any of my files opened. What I don't understand is why VC++ doesn't open all the necessary files with the workspace (.dsw) file. It's kind of misleading.
Question: how do I open ALL my project files at once every time I reopen my project. I'm sure you don't have to manually open 2 dozen files every time you want to reopen your program, or do you?
Thanks much, Dave
I'm using VC++ 6.0
|
|
|
|
|
DaveE9th wrote:
I don't understand is why VC++ doesn't open all the necessary files with the workspace (.dsw) file. It's kind of misleading.
Normally it does. But that's not to say that it doesn't occassionally get confused. For a large project I am working on, I have to remove those temporary files at least once per week, sometimes less.
|
|
|
|
|
I'm having problems getting my spin button to work in my application. I've initialized the common controls before trying to use it, and I've set the base, range, initial position and buddy control (an edit box) for the spinner. When I run my application, I don,t see the current position of my spinner in the edit box, and a call to SendDlgItemMessage() to get the current position invariably returns the same number - the one with which the spinner was initialized. What am I doing wrong?
Cheers, nickelplate.
|
|
|
|
|
Sounds like you didn't set the "set buddy int" style, to make the spinner change the contents of the edit box.
--Mike--
"So where does that leave us? Well, it leaves us right back where we started, only more confused than before." -- Matt Gullett
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
|
|
|
|
|
That solved the problem. My game is now complete. Thanks a lot.
Cheers, nickelplate.
|
|
|
|
|
Hi!
I'm having problems with an edit control not responding to ctrl+c, ctrl+v and ctrl+x keystroke combinations when it's residing inside a DialogBar.
The edit control doesn't receive a WM_CHAR message for any of the three keystroke combinations as it does in a regular dialog box, and I assume that's the problem.
Anyone know why?
|
|
|
|
|
The problem is probably that you've got an accelerator table that's stealing the messages. You may need to disable the accelerator table when the edit control has focus (handle EN_SETFOCUS and EN_KILLFOCUS).
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Hi,
I am facing similar problem. pl help me out
I have CComboBox placed on CDialogBar. Here I dont't get the crtl+c, ctrl+v and ctrl+x messages on the ComboBox. But I can rightmouse click on combobox and can copy/paste.
Thanks
Sandeep Naik
|
|
|
|
|
Hi All
im printing some stuff out in landscape mode, i have the below
in my OnBeginPrint function to set the orientation of the paper
LPDEVMODE pDevMode;
pDevMode = pInfo->m_pPD->GetDevMode();
pDevMode->dmOrientation = DMORIENT_LANDSCAPE;
pDC->ResetDC(pDevMode);
first time round, it prints in landscape, but the actual text doesnt stretch across
the whole page like it should, the actual text is in the size of portrait mode on a landscape peice of paper
however if i print again, its all fine
and clues any1 ?
thanks
simon
|
|
|
|