|
InflatableGarfield wrote:
Where is the AfxInitRichEdit function?
Viewrich.cpp
InflatableGarfield wrote:
What do I need to include?
afxwin.h
Image Toolkits | Image Processing | Cleek
|
|
|
|
|
You need to load the richedit control DLL. Calling LoadLibrary(_T("riched20.dll")) before CreateWindowsEx() should do the trick.
--
My name in Katakana is ヨルゲン.
My name in German is Jörgen.
I blog too now[^]
|
|
|
|
|
I don't think AfxXXX() does any good in a pure win32 program...
--
My name in Katakana is ヨルゲン.
My name in German is Jörgen.
I blog too now[^]
|
|
|
|
|
BTW, you should use RICHEDIT_CLASS as argument to CreateWindowEx, and not "RICHEDIT_CLASS" . RICHEDIT_CLASS is a #define, expanding into either "RichEdit20A" or "RichEdit20W" depending on your unicode preference.
--
My name in Katakana is ヨルゲン.
My name in German is Jörgen.
I blog too now[^]
|
|
|
|
|
I think Ive got it - heres my current code:
LoadLibrary("riched20.dll")<br />
main_text_handle = CreateWindowEx(NULL,<br />
RICHEDIT_CLASS,<br />
"",<br />
WS_CHILD | WS_BORDER | WS_VISIBLE | ES_AUTOVSCROLL | ES_LEFT | ES_MULTILINE | ES_NOHIDESEL,<br />
0, 0,<br />
width, height,<br />
main_window_handle,<br />
NULL,<br />
hinstance,<br />
NULL)
Just need to look at some of the messages on MSDN but it works!
Thanks everyone for your help!
|
|
|
|
|
My project (VS 7.1) builds and run OK on my Windows 2K PC, but when I clean the solution and copy it over to a Windows XP PC I get loads of error, (see below) I cant seem to find the cause.
The cod HAS NOT changed!
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1553): error C2059: syntax error : ')'
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1640): error C2059: syntax error : ')'
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1647): error C2059: syntax error : ')'
\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinDef.h(205): error C2143: syntax error : missing ';' before '*'
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1620): error C2143: syntax error : missing ';' before '__stdcall'
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1553): error C2146: syntax error : missing ')' before identifier 'hResData'
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1560): error C2146: syntax error : missing ')' before identifier 'hResData'
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinNT.h(5216): error C2146: syntax error : missing ';' before identifier 'CompletionPort'
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinNT.h(5216): error C2146: syntax error : missing ';' before identifier 'CompletionPort'
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinDef.h(208): error C2146: syntax error : missing ';' before identifier 'GLOBALHANDLE'
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinDef.h(208): error C2146: syntax error : missing ';' before identifier 'GLOBALHANDLE'
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1628): error C2370: 'HGLOBAL' : redefinition; different storage class
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinDef.h(205): error C2378: 'HANDLE' : redefinition; symbol cannot be overloaded with a typedef
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinDef.h(206): error C2378: 'HANDLE' : redefinition; symbol cannot be overloaded with a typedef
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinDef.h(207): error C2378: 'HANDLE' : redefinition; symbol cannot be overloaded with a typedef
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinDef.h(208): error C2378: 'HANDLE' : redefinition; symbol cannot be overloaded with a typedef
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinDef.h(209): error C2378: 'HANDLE' : redefinition; symbol cannot be overloaded with a typedef
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinNT.h(334): error C2378: 'HANDLE' : redefinition; symbol cannot be overloaded with a typedef
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinNT.h(340): error C2378: 'HANDLE' : redefinition; symbol cannot be overloaded with a typedef
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinDef.h(204): error C2378: 'HANDLE' : redefinition; symbol cannot be overloaded with a typedef
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinDef.h(205): error C2378: 'HANDLE' : redefinition; symbol cannot be overloaded with a typedef
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinDef.h(206): error C2378: 'HANDLE' : redefinition; symbol cannot be overloaded with a typedef
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinDef.h(207): error C2378: 'HANDLE' : redefinition; symbol cannot be overloaded with a typedef
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinDef.h(208): error C2378: 'HANDLE' : redefinition; symbol cannot be overloaded with a typedef
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinDef.h(209): error C2378: 'HANDLE' : redefinition; symbol cannot be overloaded with a typedef
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1560): error C2440: 'initializing' : cannot convert from 'int' to 'LPVOID'
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1655): error C2440: 'initializing' : cannot convert from 'int' to 'LPVOID'
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1560): error C2440: 'initializing' : cannot convert from 'int' to 'LPVOID'
\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1671): error C2491: 'GlobalUnlock' : definition of dllimport data not allowed
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1560): error C2491: 'LockResource' : definition of dllimport data not allowed
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1560): error C2491: 'LockResource' : definition of dllimport data not allowed
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(683): error C2501: '_CREATE_PROCESS_DEBUG_INFO::HANDLE' : missing storage-class or type specifiers
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(684): error C2501: '_CREATE_PROCESS_DEBUG_INFO::HANDLE' : missing storage-class or type specifiers
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(685): error C2501: '_CREATE_PROCESS_DEBUG_INFO::HANDLE' : missing storage-class or type specifiers
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(683): error C2501: '_CREATE_PROCESS_DEBUG_INFO::HANDLE' : missing storage-class or type specifiers
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(684): error C2501: '_CREATE_PROCESS_DEBUG_INFO::HANDLE' : missing storage-class or type specifiers
C2501: '_PROCESS_INFORMATION::hThread' : missing storage-class or type specifiers
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinNT.h(8211): error C2501: '_RTL_CRITICAL_SECTION::HANDLE' : missing storage-class or type specifiers
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinNT.h(8212): error C2501: '_RTL_CRITICAL_SECTION::HANDLE' : missing storage-class or type specifiers
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinNT.h(8211): error C2501: '_RTL_CRITICAL_SECTION::HANDLE' : missing storage-class or type specifiers
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1620): error C2501: 'HGLOBAL' : missing storage-class or type specifiers
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1628): error C2501: 'HGLOBAL' : missing storage-class or type specifiers
\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinDef.h(204): error C2501: 'SPHANDLE' : missing storage-class or type specifiers
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinDef.h(204): error C2501: 'SPHANDLE' : missing storage-class or type specifiers
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1630): error C3861: 'HGLOBAL': identifier not found, even with argument-dependent lookup
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1639): error C3861: 'HGLOBAL': identifier not found, even with argument-dependent lookup
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1646): error C3861: 'HGLOBAL': identifier not found, even with argument-dependent lookup
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1654): error C3861: 'HGLOBAL': identifier not found, even with argument-dependent lookup
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1670): error C3861: 'HGLOBAL': identifier not found, even with argument-dependent lookup
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1630): error C3861: 'HGLOBAL': identifier not found, even with argument-dependent lookup
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1639): error C3861: 'HGLOBAL': identifier not found, even with argument-dependent lookup
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1646): error C3861: 'HGLOBAL': identifier not found, even with argument-dependent lookup
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1654): error C3861: 'HGLOBAL': identifier not found, even with argument-dependent lookup
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1670): error C3861: 'HGLOBAL': identifier not found, even with argument-dependent lookup
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1676): fatal error C1003: error count exceeds 100; stopping compilation
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1676): fatal error C1003: error count exceeds 100; stopping compilation
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1553): warning C4229: anachronism used : modifiers on data are ignored
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1560): warning C4229: anachronism used : modifiers on data are ignored
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1630): warning C4229: anachronism used : modifiers on data are ignored
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1640): warning C4229: anachronism used : modifiers on data are ignored
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1647): warning C4229: anachronism used : modifiers on data are ignored
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1655): warning C4229: anachronism used : modifiers on data are ignored
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1671): warning C4229: anachronism used : modifiers on data are ignored
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1553): warning C4229: anachronism used : modifiers on data are ignored
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1560): warning C4229: anachronism used : modifiers on data are ignored
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1630): warning C4229: anachronism used : modifiers on data are ignored
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1640): warning C4229: anachronism used : modifiers on data are ignored
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1647): warning C4229: anachronism used : modifiers on data are ignored
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1655): warning C4229: anachronism used : modifiers on data are ignored
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1671): warning C4229: anachronism used : modifiers on data are ignored
grahamfff
|
|
|
|
|
Do you have the same build environment including platform SDK on both machines?
Steve Maier, MCSD MCAD
|
|
|
|
|
I installed VS 7.1 on both PCs from the same set of disks.
They were no problems with VS 7.0, but some project (not all) produce these errors with VS 7.1.
grahamfff
|
|
|
|
|
I only have VS2005 installed here, but what does the line in Winbase.h say?
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinBase.h(1553): error C2059: syntax error : ')'
Steve Maier, MCSD MCAD
|
|
|
|
|
Th line in WinBase.h is highlighted below:-
WINBASEAPI
BOOL
WINAPI
FreeResource(
IN HGLOBAL hResData
); <-------------------
grahamfff
|
|
|
|
|
Much to my surprise, I received a 20G iPod (and a yet to arrive auto accessory) for my birthday! Naturally, the first thing I want to do is to write my own cataloging and song transfer tool. I have a fair amount of code to handle cataloging, MP3 tags, playback, etc. but I have no idea how to communicate with the iPod from a Windows app.
Any pointers would be much appreciated. Thanks!
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
|
|
Gudie Gudie,
But i Don't have One
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
Can anyone guide me in the right direction here want a java gui to link to my Visual c++ files, any ideas????
|
|
|
|
|
You should visit a thing called JNI -- Java Native Interface.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.santacruznetworks.com">Santa Cruz Networks</A>
|
|
|
|
|
What do you mean by "link to my Visual c++ files" ? Are you looking for a Java IDE for VC++ development? If so, Eclipse[^] is almost definitely the way to go.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi,
Can I use CDialog in C++.Net?
First of all, I'm totally brand new in c++.net.
I just started using Managed Extension C++.
But I want to change my old C++ project to C++.Net Application.
I dont' really know how to move from Regular C++ to C++.Net.
I was using VS.Net and writing the code.
So I created new C++.Net project. (by going to New Project, Visual C++ Project, and .Net Folder and create an empty project.)
After that, I add new resource, Dialog.
Then I create the class for that dialog, but it didnt' get created.
I was doing the same way as I usually do in Regular C++ with VS.Net.
Insert new Dialog, double click on the dialog, enter the class name, click ok. That's all what I did and why didnt' the class get created?
It is C++.Net doesnt' allow to add resource Dialog but Form?
|
|
|
|
|
no you cant.
The event handler is totally different (the way it is coded).
Managed code is different than native C++ code.
I suggest buying a Visual C++ .Net book. Microsoft Press has one for cheap and im sure your local book store has tons.
It will take you a little bit to get used to the .net framework, but once you do it is very good. Although you will still find yourself going back to native code from time to time.
|
|
|
|
|
C++ in .NET is realy good than C++ 6,
Create your project using class MFC Application wizard. Once you create a Dialog Application, go into your Resouce tab pane and select dialog folder. Right click your
dialog folder and click on Insert Dialog. Then you can see your new dialog form.
After then Right click on your Dialog Window and click on Add Class option.
Then you will come to a form specify your base class as CDialog and give a class name
So thats it.
Any thing you want submit to me
thanks for giving opertunity to help you
from
venura
VENURA GOONATILLAKE, SRI LANKA
|
|
|
|
|
I'm trying to implement it where when I double-click a grid, the grid resizes to fill the entire formview, then double-clicking it again puts it back to its normal size. But I'm having trouble with the GetWindowRect(), MoveWindow(),ClientToScreen() thing. Here's what I have in the OnNotify() of my CFormView class (after making sure it's for the appropriate control):
if (NM_DBLCLK == pDispInfo->hdr.code)
{
CRect formrect;
this->GetWindowRect(&formrect);
ClientToScreen(&formrect);
m_lvw.ScreenToClient(&formrect);
m_lvw.MoveWindow(&formrect);
m_lvw.SetWindowPos(&wndTopMost ,0,0,0,0,SWP_NOSIZE |SWP_NOMOVE);
return TRUE;
}
the grid is moving to the wrong place. Also, it's not covering the other controls as I thought it would do. The other edit boxes and comboboxes on the form are still visible through the grid. Any help is appreciated. Thanks!!!
My articles
www.stillwaterexpress.com
BlackDice
|
|
|
|
|
I got the code working now to resize the grid the way I want, I just can't get it to redraw correctly. I've tried RedrawWindow(),Invalidate(), and InvalidateRect() and all the controls are still showing throught the grid until I move the scrollbars, then it repaints correctly. I figure I could step through the code from the time the scrollbar is moved, but I'm hoping someone can help me out before I try to wade through that.
My articles
www.stillwaterexpress.com
BlackDice
|
|
|
|
|
I made a DIALOG resource for my CFOrmView derived class... I put a CListCtrl in the DIALOG, and made a variable for it, i.e. m_myListControl..
Now when i Tried inserting columns using InsertColumn(), the VC++ ASSERTS...
Upon tracing,debugging, It turns out that m_myListControl doesn't created, its handle=0x000..
I tried to make a DIALOG resource with a CListCtrl this time for a CDialog, just to test and see if it will work on a CDialog... it works on a CDialog, and it turns out, the ClistCtrl object is created this time, there's is a value of the handle of the CListCtrl..
Any thoughts on this?
|
|
|
|
|
Hello.
Who knows which is the minimal changes needed to get Eugen Podsypalnikov's CGridCellDateTime class (http://www.codeproject.com/miscctrl/gridcelldatetime.asp) work normally in dropdown mode.
I've changed this
m_pEditWnd = new CInPlaceDateTime(GetGrid(), rect,
m_dwStyle|DTS_UPDOWN, nID, nRow, nCol,
GetTextClr(), GetBackClr(), GetTime(), nChar);
by this
m_pEditWnd = new CInPlaceDateTime(GetGrid(), rect,
m_dwStyle, nID, nRow, nCol,
GetTextClr(), GetBackClr(), GetTime(), nChar);
It become dropdown, but in doesn't work properly. Which code I need to reform?
Thank you.
|
|
|
|
|
Hello there.
Explain me please how to implement dynamically changable hot keys in MFC application most conveniently.
|
|
|
|
|