|
No.I just want to grab richedit control content.CEdit control content can be taken using GetWindowText function.This function "when used for richedit ctrl" is returning caption of richedit control not the content.
|
|
|
|
|
AFAIK Edit Control has NO caption.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Read the documentation for CRichEditCtrl
|
|
|
|
|
In addition to GetWindowText() , you can also send the control a EM_STREAMOUT message, or if you are using MFC, call the StreamOut() method.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hy everyone,
I need to get somehow informations about some files stored on my PC (name, size, last modified, etc.).
I am using Visual C++ 2005 and I can't use CFile class because I only must do a console application. I can't use MFC because it's about an XPCOM component that must be made with console application only. Is there any way doing this?
Thanks very much !
|
|
|
|
|
See GetFileInformationByHandle and GetFileAttributesEx .
|
|
|
|
|
HAve a look at File Management Functions [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
cuesdean florin wrote: I can't use CFile class because I only must do a console application.
MFC works fine with both GUI and console applications.
If you are still unable to use it, check out GetFileSize() and GetFileAttributes() .
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi
I have debug manytime the northwinder sample of sql server compact edition 3.1 . and always got
error hr = -2147221164 {Class not registered }
at the time of creating instant of OLE DB provider
I have installes (SQLServerCE31-EN , SSCE31SDK-ENU, SSCEDeviceRuntime-ENU, SSCERuntime-ENU)in my system
this is my code sample
hr = CoCreateInstance( CLSID_SQLSERVERCE_3_0,
0,
CLSCTX_INPROC_SERVER,
IID_IDBInitialize,
(void**)&pIDBInitialize);
thnx
|
|
|
|
|
Hello All,
I got the error "Overlapped i/o operations in progress".Please let me know that what is the mistake??
I hardcode the second param of InternetOpenUrl to understand you what is the url type i am using.
void GetSuggestionList(LPCTSTR szURL)
{
DWORD dwError=0;
LPVOID lpMsgBuf;
TCHAR szBuf[80];
if (hInternetSession == NULL)
{
hInternetSession = InternetOpen(L"Microsoft Internet Explorer",
INTERNET_OPEN_TYPE_PRECONFIG,
NULL,
NULL,
INTERNET_FLAG_ASYNC);
if (hInternetSession != NULL)
{
InternetSetStatusCallback(hInternetSession,
(INTERNET_STATUS_CALLBACK)InternetCallbackFunction);
hURL = InternetOpenUrl(hInternetSession,
L"http://wioclite.webdunia.com",
NULL,
0,
INTERNET_FLAG_RELOAD |
INTERNET_FLAG_PRAGMA_NOCACHE |
INTERNET_FLAG_NO_CACHE_WRITE,
(unsigned long)(&request_context));
if(!hURL)
{
dwError = GetLastError();
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
dwError,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR) &lpMsgBuf,
0, NULL );
wsprintf(szBuf, L"%s failed with error %d: %s", szURL, dwError, lpMsgBuf);
MessageBox(NULL, szBuf, L"Error", MB_OK);
}
}
}
}
Thanks in Advance
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
Hi,
but i have to do this.
I have a dialog resource and some controls (like edit,combo and button using drag and drop)
on dialog and i have to show this list view on dialog. actually after running program
whatever controls is displaying on dialog is also displaying on emulator. i have tried to
choose list view/datagrid or any control from com componet .after choosing it is displaying
in tool bar. but not able to drop on dialog.
so can i create list view using createwindow(.....)that will show on emulator with some
other controls
i am using
DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG1), NULL, (DLGPROC)WndProc1); for showing
dialog on emulator by passing IDD_DIALOG1 as a dialog reasource and i want that this list
view/grid show on dialog.
I am using windowmobile 6 sdk. developing on desktop using vc++. windows applicayion
plz help.
thanx
|
|
|
|
|
|
Mmmm, is the word extern what you are looking for?
Globals.cpp
int globalInt = 0;
CString globalStr = "";
CMyDoc* myDoc = NULL;
other1.cpp
extern int globalInt;
globalInt = 3;
other2.cpp
extern int globalInt;
if (globalInt == 3)
AfxMessageBox ("GloballyModified");
else
AfxMessageBox ("not working");
Of course, other1.cpp should be executed before than other2.cpp
ADD:
I would use the Global.h to declare constants, all the includes that are going to be needed in all other modules, and things like that, but for variables I prefer it like above
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
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
thanks for the reply. I found my mistake. In one of my header files, I had included the #include "Globals.h" by mistake. So when that header file was used in my .cpp files I inadvertantly included Globals.h twice which gave me the redefinition errors. Thanks again for the reply
|
|
|
|
|
How to make variables to be global inside the whole application. he had declared the variables in a "Global.h" as public but he had problems to acces them from other places although the include Globals.h was made.
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
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Why did you delete your message?
|
|
|
|
|
F*CK, are you stupid to delete your questions once you get the answers ?
this is a forum man, not a chat. that means that other newbies - yeah, like you - can search the forum if someone else already asked the same question.
but if you delete, how can one find back what the question was ?
moreover it's not that first time you do this, and I've already notified you about this.
so, please, never do that again !
modified on Friday, May 16, 2008 8:17 AM
|
|
|
|
|
Well, now you really need the rant icon, don't you?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
I really don't understand why people are doing this. Am I missing something?
|
|
|
|
|
Michael Schubert wrote: Am I missing something?
morons brother... you can't fight against.
|
|
|
|
|
It seems that you got your answer and then delete your question,right!?
|
|
|
|
|
Hamid. wrote: It seems that you got your answer and then delete your question,right!?
Right :-#)
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi Alok how are you you back to the codeproject but it seems you are front of time how did you accde to these replies?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
I want to read Japanese string from string table. Means string is stored in Japanese language in MFC.
Can any body help me out. I try with ::LoadString(hModule, IDS_STRING1002 , szTemp, sizeof(szTemp))
but it is giving ??????? ?????? .
|
|
|
|
|