|
Hello all,
please, does anybody know how to setup the RichTextControl (2.0) that it will appear only as the text on dialog box and not as edit field (e.g. that cursor changes and user can select it)?
I tried to set it as read only, but it doesn't help.
Thank to you all!
Katerina
|
|
|
|
|
i am not sure..just try
YourCtrlVariable.EnableWindow(FALSE);
I want to change Myself..Can u help me?
|
|
|
|
|
Hi,
it is not realy nice solution because i have to use different font (normal is grayed then), but still better than nothink,
maybe somebody knows better solution?
Anyway thanks!
how can i help you to change your self?
|
|
|
|
|
GirlsCanProgram wrote:
I tried to set it as read only, but it doesn't help.
Strange. This should work.
VERIFY (myRichEditCtrl.SetReadOnly (TRUE));
ASSERT (myRichEditCtrl.GetStyle() & ES_READONLY);
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi dear,
yes, sure setting it to read only works,
but then when you will move over control the cursor changes and and you can also select the text.
So it doesn't look like normal text.
Katerina
|
|
|
|
|
Hi Katerina, what you are doing is right according to me. But, there is one more thing that you need to add. Override the PreTranslateMessage and enter the code given below:
BOOL CMyDialog::PreTranslateMessage(MSG *pMsg)
{
if (pMsg->message == WM_MOUSEMOVE && pMsg->wParam == MK_LBUTTON)
return (TRUE);
return (CMyDialog::PreTranslateMessage(pMsg));
}
Don't remove the read-only setting.
Hope this proves useful.
Gurmeet S. Kochar If you believe in God, it's because of the Devil
My CodeProject Articles: HTML Reader C++ Class Library, Numeric Edit Control
|
|
|
|
|
Hello,
I am experiencing a very strange "phenomenon":
When I compile a Visual C++ program in VS 2002
(no GUI, just console output) into
an exe on XP Home it runs smoothly. However,
when I give this to someone with an XP Pro
machine, it does not run but stops with an
exception error message box.
We have tested this on 3 different XPPro boxes now
and everywhere the same result.
When I compile the program with the same VS 2002
installed on a XPPro machine into an exe,
it runs BOTH on XPPro and XPHome.
I am really puzzled and have no clue why this happens.
Seems that in terms of OS at compilation time the exe's
are downward compatible but not upward.
Could anybody please help me and tell me what is going on?
Thank you so much in advance,
Tony
|
|
|
|
|
Tony Westminster wrote:
Could anybody please help me and tell me what is going on?
A lot depends on what the exception error is. Is this an MFC app or a pure Win32 app. Do you use the CommonControls dlls.
Michael
But you know when the truth is told,
That you can get what you want or you can just get old,
Your're going to kick off before you even get halfway through.
When will you realise... Vienna waits for you? - "The Stranger," Billy Joel
|
|
|
|
|
Thank you very much for your quick answer. I am not quite sure how
someone can tell if it is an MFC app or pure Win32 app? I assume
you see it if it contains MFC*.dll?
I used depends 2.1 to see which DLL's my App uses. I have attached below a list of all used DLLs. Note that Column1 and Column2 contain
the same list of dll's, I have just sorted Column2 by name to facilitate analysis.
Thank you so much for any help on this.
If I cannot find an answer on why this happens, do you think it is safe to say:
"Compiled exes will
always work on XP Home when compiled on XP Pro but not necessarily the
other way around."
If I knew this was true, I could always only compile the progs on XP Pro and be on the safe side.
Thanks again,
Tony
MPR.DLL ACTIVEDS.DLL
ADVAPI32.DLL ADSLDPC.DLL
COMCTL32.DLL ADVAPI32.DLL
COMDLG32.DLL ADVPACK.DLL
GDI32.DLL APPHELP.DLL
IPHLPAPI.DLL ATL.DLL
KERNEL32.DLL AUTHZ.DLL
MSCOREE.DLL BROWSEUI.DLL
MSVCP60.DLL CABINET.DLL
MSVCRT.DLL CDFVIEW.DLL
NTDLL.DLL CERTCLI.DLL
OLE32.DLL CFGMGR32.DLL
OLEACC.DLL CLUSAPI.DLL
OLEAUT32.DLL COMCTL32.DLL
RPCRT4.DLL COMDLG32.DLL
SHELL32.DLL CREDUI.DLL
SHLWAPI.DLL CRYPT32.DLL
USER32.DLL CRYPTUI.DLL
WINSPOOL.DRV CSCDLL.DLL
WS2_32.DLL DBGHELP.DLL
WS2HELP.DLL DEVMGR.DLL
ACTIVEDS.DLL DHCPCSVC.DLL
ADSLDPC.DLL DNSAPI.DLL
ADVPACK.DLL DUSER.DLL
APPHELP.DLL EFSADU.DLL
ATL.DLL ESENT.DLL
AUTHZ.DLL GDI32.DLL
BROWSEUI.DLL GDIPLUS.DLL
CABINET.DLL IMAGEHLP.DLL
CDFVIEW.DLL IMM32.DLL
CERTCLI.DLL INETCOMM.DLL
CFGMGR32.DLL IPHLPAPI.DLL
CLUSAPI.DLL KERNEL32.DLL
CREDUI.DLL LINKINFO.DLL
CRYPT32.DLL LZ32.DLL
CRYPTUI.DLL MFC42U.DLL
CSCDLL.DLL MLANG.DLL
DBGHELP.DLL MOBSYNC.DLL
DEVMGR.DLL MPR.DLL
DHCPCSVC.DLL MPRAPI.DLL
DNSAPI.DLL MPRUI.DLL
DUSER.DLL MSASN1.DLL
EFSADU.DLL MSCOREE.DLL
ESENT.DLL MSGINA.DLL
GDIPLUS.DLL MSHTML.DLL
IMAGEHLP.DLL MSI.DLL
IMM32.DLL MSIMG32.DLL
INETCOMM.DLL MSOERT2.DLL
LINKINFO.DLL MSRATING.DLL
LZ32.DLL MSSIGN32.DLL
MFC42U.DLL MSVCP60.DLL
MLANG.DLL MSVCRT.DLL
MOBSYNC.DLL MSWSOCK.DLL
MPRAPI.DLL NETAPI32.DLL
MPRUI.DLL NETCFGX.DLL
MSASN1.DLL NETMAN.DLL
MSGINA.DLL NETPLWIZ.DLL
MSHTML.DLL NETRAP.DLL
MSI.DLL NETSHELL.DLL
MSIMG32.DLL NETUI0.DLL
MSOERT2.DLL NETUI1.DLL
MSRATING.DLL NETUI2.DLL
MSSIGN32.DLL NTDLL.DLL
MSWSOCK.DLL NTDSAPI.DLL
NETAPI32.DLL NTLANMAN.DLL
NETCFGX.DLL ODBC32.DLL
NETMAN.DLL OLE32.DLL
NETPLWIZ.DLL OLEACC.DLL
NETRAP.DLL OLEAUT32.DLL
NETSHELL.DLL OLEDLG.DLL
NETUI0.DLL OLEPRO32.DLL
NETUI1.DLL POWRPROF.DLL
NETUI2.DLL PRINTUI.DLL
NTDSAPI.DLL QUERY.DLL
NTLANMAN.DLL RASAPI32.DLL
ODBC32.DLL RASDLG.DLL
OLEDLG.DLL RASMAN.DLL
OLEPRO32.DLL REGAPI.DLL
POWRPROF.DLL RPCRT4.DLL
PRINTUI.DLL RTUTILS.DLL
QUERY.DLL SAMLIB.DLL
RASAPI32.DLL SCECLI.DLL
RASDLG.DLL SECUR32.DLL
RASMAN.DLL SETUPAPI.DLL
REGAPI.DLL SHDOCVW.DLL
RTUTILS.DLL SHELL32.DLL
SAMLIB.DLL SHLWAPI.DLL
SCECLI.DLL SHSVCS.DLL
SECUR32.DLL TAPI32.DLL
SETUPAPI.DLL URLMON.DLL
SHDOCVW.DLL USER32.DLL
SHSVCS.DLL USERENV.DLL
TAPI32.DLL UTILDLL.DLL
URLMON.DLL UXTHEME.DLL
USERENV.DLL VERSION.DLL
UTILDLL.DLL W32TOPL.DLL
UXTHEME.DLL WININET.DLL
VERSION.DLL WINMM.DLL
W32TOPL.DLL WINSCARD.DLL
WININET.DLL WINSPOOL.DRV
WINMM.DLL WINSTA.DLL
WINSCARD.DLL WINTRUST.DLL
WINSTA.DLL WLDAP32.DLL
WINTRUST.DLL WMI.DLL
WLDAP32.DLL WS2_32.DLL
WMI.DLL WS2 HELP.DLL
WSOCK32.DLL WSOCK32.DLL
WTSAPI32.DLL WTSAPI32.DLL
WZCDLG.DLL WZCDLG.DLL
WZCSAPI.DLL WZCSAPI.DLL
WZCSVC.DLL WZCSVC.DLL
|
|
|
|
|
This is happens to me also too. I is compilate on my office combuter (XP) and is runs fine also on home computer. But is compilate on home computer, is not run OK on office computer. I having the problem with spin controls jumping more than by one. Is also other problem that I fixed by moving some code from PreCreate to Create.
|
|
|
|
|
Tony Westminster wrote:
Seems that in terms of OS at compilation time the exe's
are downward compatible but not upward
Absolutely not. It doesn't matter what OS you compile on. I could run VC 5 on Win 95, build a GUI app, and it would run on XP or 2K3 or whatever.
It would help if you posted the error message.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
"That probably would've sounded more commanding if I wasn't wearing my yummy sushi pajamas."
-- Buffy
|
|
|
|
|
Mike,
thank you very much. I get an error message box that says:
"The application failed to initialize
properly (0xc0000135). Click on OK to terminate the application."
Do you have any idea what could cause this?
Thanks,
Tony
|
|
|
|
|
Hi,
Ithink it's problem about some Upgrades!!
Try this,
Upgrade WinXP (That your prog. didn't work on) with FrameWork1.1 avalable in microsoft site and run your prog again
I think it works good.
Please tell me if this solve your problem.
Yours Mamad,
|
|
|
|
|
Dear Mamad,
thanks so much for your answer.
I will try it out but doubt that it works.
Why? Because I think that Framework 1.1 you are talking
about is the .NET Framework. But I have coded in
pure VC++, not VC++.NET.
So I cannot really see how the framework would influence
my native code (no IL).
I will try it anyway.
Thanks again,
Tony
|
|
|
|
|
Friends, I want to upload a file to webserver using HTTP only. I have even searched a lot for such type of component also.
Can you please help me to accomplish this task.
Even if you know the request formate send by browser to webserver for uploading a file then also it will very helpful for me.
Thanks a lot.
C.R.Naik
|
|
|
|
|
|
Thanks Mr. Praksh
But still I am confused for one concept. Does "Put Script" always there with web server or should have to create in order to upload the file ?
C.R.Naik
|
|
|
|
|
I exactly dont know, i searched the web for this answer as i new something like this exists...
I think PUT is part of HTTP 1/1 protocol spec, so the webserver should ideally support the command.
|
|
|
|
|
Anonymous is me
|
|
|
|
|
Hi,
does anybody know how to check whether particular process (application) on the remote server machine is running or not from aplication running on another PC?
Thanks
Lada
Lada
|
|
|
|
|
A simple method would be to have something similar to ping on the server but requiring your server code to provide the response.
Elaine
The tigress is here
|
|
|
|
|
Hello All,
I want to read through a 8 button (USB port) joystick in my MFC application. Please tell me how to go about doing this. Tell me all the steps that I have to go through. If possible send me code for this also.
Thanks
Nasirul Haque
|
|
|
|
|
Your best bet will be to use DirectInput which is part of the DirectX SDK. The SDK contains examples (including a comprehensive framework) for reading from Joysticks.
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
ok i have a header file and this is the error i get:
error C2664: 'sprintf' : cannot convert parameter 1 from 'char' to 'char *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
and here is my code, im stumped:
#define BAUDRATES_C
#include "stdafx.h"
#include "BaudRates.h"
typedef struct{
char BaudRate[15];
unsigned char Length;
}BaudRateType;
const BaudRateType BaudRateList[16] =
{
{"110", 3},
{"200", 3},
{"300", 3},
{"1200", 4},
{"2400", 4},
{"4800", 4},
{"9600", 4},
{"14400", 5},
{"19200", 5},
{"28800", 5},
{"38400", 5},
{"56000", 5},
{"57600", 5},
{"115200", 6},
{"128000", 6},
{"256000", 6},
};
void PopulateBaudDropdown(CComboBox *box)
{
int i;
for(i=0;i<16;i++)
{
box->AddString((char*)&BaudRateList[i].BaudRate);
}
}
char ReadBaudDropdown(CComboBox *box)
{
int baudindex;
char rate;
baudindex = box->GetCurSel();
sprintf(rate,"%d",BaudRateList[baudindex].BaudRate);
return rate;
}
please help, thank you
---------------------
And Like The Wind Our Hero Vanishes Off Into The Distance...
|
|
|
|
|
Hi,
I've found two mistakes in your code:
in the line:
box->AddString((char*)&BaudRateList[i].BaudRate);
make this change:
box->AddString(BaudRateList[i].BaudRate);
and
in the line:
sprintf(rate,"%d", BaudRateList[baudindex].BaudRate);
make this change:
sprintf(rate,"%s", BaudRateList[baudindex].BaudRate);
Lada
|
|
|
|