|
Thank-you again Alex,
I pretty much have it working.
In the syntax for CDialog::GotoDlgCtrl it asks for CWnd* pWndCtrl as a function parameter.
I confess that I'm not sure which variable to use.
Best to you, Thanks again,
Robert
|
|
|
|
|
Write GoToDlgCtrl(GetDlgItem(nID)) or use variable of control type (CEdit etc.): GoToDlgCtrl(&m_edit_box).
|
|
|
|
|
Alex ... again... thanks,
Got the Init focus problem resolved
Have a good weekend,
Robert
|
|
|
|
|
Hi Robert!
I have encountered the same problem, specifically when subclassing the control.
See this thread.
SetWindowText() does not work well for me,
so I resorted to using ReplaceSel() instead.
To move the caret to the end, try:
mc_editkey.SetSel(0, -1);
mc_editkey.SetSel(-1, -1);
Now, use ReplaceSel to append text:
ReplaceSel(buf);
In your case, I think it might be enough with ReplaceSel(), since it should move the caret to the end.
There is no need to use UpdateData(), it will work anyway.
Do you return FALSE from OnInitDialog()? You must do that when setting the focus on a control. See CDialog::OnInitDialog in MSDN.
Cheers,
/Fredrik
Do you Sonork? I do! 100.11430 PhatBoy
|
|
|
|
|
Thank-you Fredrik,
I pretty much have it working
I appreciate the the reference too!
Best regards, and thanks again,
Robert
|
|
|
|
|
Hi
How can i get the time From the pc clock?
|
|
|
|
|
CString strTime = COleDateTime::GetCurrentTime().Format("%I:%M:%S %p, %m/%d/%y");
CString strTime = COleDateTime::GetCurrentTime().Format(_T("%I:%M:%S %p, %m/%d/%y"));
The format adjusts how it ends up looking I don't know the specifics but it should be in VC++'s help.
- Matt Newman
- Matt Newman
-Sonork ID: 100.11179:BestSnowman
|
|
|
|
|
Hi everyone. Does anyone know how, or where I can go to find out how to detect the current version of MDAC is installed on a user's computer? I want to make sure the user cannot run a program I wrote without having the minimum required version of MDAC installed first.
|
|
|
|
|
use this code on ::InitInstance to check if MDAC is installed
CLSID clsid;
HRESULT hr = AfxGetClassIDFromString("Datalinks", &clsid);
if(!SUCCEEDED(hr))
{
AfxMessageBox("You need to install MDAC v2.1 orhigher"); return FALSE;
}
the version number is held in the registry, I think
HKEY_CLASSES_ROOT\MDACVer.Version with a subkey CurVer with the value like MDACVer.Version.2.60.
|
|
|
|
|
I just want to know what kind of APIs and stuff I would need to write a winzip like program.
"To wonder is to begin to understand"
|
|
|
|
|
I suggest you get a copy of the zlib library, which is free, very good, massively used and has rather good support at its website.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
|
Thank you very much
"To wonder is to begin to understand"
|
|
|
|
|
Hi all,
I have a table(PERSON) with thease fields:
PID - PNAME - PFAMILY
I have other table, too :
OID - ONAME - OID2 and ...
OID and OID2 cant save information like PID(Master-Detail fields):
OID and OID2(Detail) ---> PID(Master)
For example:
in PERSON field:
1 - Hadi - Rezaie
2 - Ali - Arabi
3 - Karim- Khaleghi
and ...
in second table:
1 - Laleh - 2
3 - Pedram- 1
Thease numbers in second table must be in PERSON table ...
Now in report i wanna show information like it:
Person name & family Name Person Name
Hadi Rezaie Laleh Ali Arabi
Karim Khaleghi Pedram Hadi Rezaie
I have problem in creating this report, how can i do it ?
Do you get my mean ?
If not please tell me, i'll explain more ...
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
I found my reply ...
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Hi,
I want to print a newline when I am pressing the enter key.
How is it possible in the case of WM_CHAR message?
SSN
|
|
|
|
|
Where do you want to print it ? If in an edit control, make sure it is set be be multiline, and it will do it by itself when you hit return.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
dear all.
How to change the default Formcolor in MDI application..
please..
anju
|
|
|
|
|
In OnEraseBackground, get the client rect and fill it with the color you want using FillSolidRect.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
I am missing something when using CDaoRecordset in an AppWizard generated application.
The database is intended to store the peoples name, and email address among other things. The program will display the records one at a time and be able to add records. It will also email the person when the record is added. This all works fine.
A further feature I need is that at various times some of the people may need receive an update email. Adding a filter string and requerying works fine too. The hitch is that indiviuals may be in the database more that once but should only receive one email. SQL does allow for 'DISTINCT myDB.email' to be inserted after the 'SELECT' and will therefore on result in the email address only appearing once.
I can't find how to add this to the requery filter to make it work. Does anyone have an idea.
Happy programming!!
|
|
|
|
|
What does this compiler error try to say to me?
Debug/Suza Utility.exe : fatal error LNK1169: one or more multiply defined symbols found
It can't be that I have declared two variables with same name...
------------------------------
©0d3 ©®4©k3® - That's me!
------------------------------
|
|
|
|
|
Have you looked up the error code in MSDN??
MSDN has enough information to help you solve the problem.
---
It may be that your sole purpose in life is simply to serve as a warning to others.
|
|
|
|
|
It can't be that I have declared two variables with same name...
Sure it can, but more probably it's that you've include two other "symbols", such as functions, in the linking process.
You most certainly got some other information too, like what symbol(s) were defined in more than one lib/obj. Well, use that info to track down the problem, or post more info.
/Mike
|
|
|
|
|
The error message should tell you which symbols have been multiply defined. Looking at this information should give you a clue to the problem area.
Michael
|
|
|
|
|
I am having problems loading the Graph32.ocx file for
the Graph Control on a target machine. If I let the
Dialog resources load it, it works just fine. If I try
to load it with the CGraph.Create() call, it fails. I
tried adding the License string to the call but then
it fails on the Developer side. I stepped through the
code and verified the License between the two
different methods.
Any suggestions...........
Thanks in advance.
|
|
|
|