 |
|
 |
Impressive effort. While I do find the code to be somewhat haphazard and not as clean as I would like, I can't argue that the result looks fantastic.
|
|
|
|
 |
|
 |
I tried compiling this using the .dev file in Dev-C++ and I throws a ton of errors. Is there something special in the setup I'm missing or does it just not work with gcc/MingW compilers. I do have a version of Visual C++ 6.0 Professional and it compiles correctly so I'm wondering if it is a compiler issue?
|
|
|
|
 |
|
 |
gcc not accept the macro messages wrapper
|
|
|
|
 |
|
 |
Could you possibly provide us with compiled binaries so we can reference the project from C# and VB.NET applications?
Quite a number of .NET programmers do not have C++ installed on their computers.
Thank you.
|
|
|
|
 |
|
 |
the simple example doesn't work, the window is displayed but freeze why ?
int PASCAL WinMain(HINSTANCE hinstace, HINSTANCE PrehInstance, LPSTR cmdLine, int show)
{
CApp cpMain;
if (theApp==0)
return 0;
theApp->LoadMain(hinstace, PrehInstance, cmdLine, show);
CFrame *pt;
pt = new CFrame();
cpMain.m_WinMain = (CFrame *)pt;
pt->Create(_T("MotsusMainWindow"),"test",WS_TILEDWINDOW,CRect(100,100,200,200),NULL,0);
pt->ShowWindow();
pt->UpdateWindow();
cpMain.Run();
return 0;
}
|
|
|
|
 |
|
 |
Thanks for your feedback... Please replace the CFrame::OnPaint with
int CFrame::OnPaint(HDC hDC)
{
return Default();
}
In this 1Q i'll fix this and other bugs
Francisco
|
|
|
|
 |
|
 |
Hi,
On February I'll raise a new release.
Regards,
Francisco
|
|
|
|
 |
|
 |
Good to hear you out again, I am looking forward to you.
|
|
|
|
 |
|
 |
Toolbars don't show up unless you define
_WIN32_IE=0x400,_WIN32_WINNT= 0x0500
meaning your app will need win 2k or higher and IE 4.0 or higher.
At least in my Windows XP.
-- modified at 11:24 Friday 16th November, 2007
|
|
|
|
 |
|
 |
It never ceases to amaze me how someone so well trained and with so much experience in C++ makes the most unbelievable mistakes. First of all my base criteria when I analyze an Code Project article is download SOMEWHERE ON THE DISK the sources and hit "Compile". If it compiles, then the article is interesting. Otherwise...
What I am talking about? PORTABILITY of YOUR the source code. You can do this with 3 things:
1) Use relative paths when including headers from an custom library.More precisely the project MUST be organized like this:
..
FolderA -demo exe project folder
FolderB -library project folder.
project.sln /dsw
in the demo exe project an include file should be than included like this
#include "..\\FolderB\\header.h"
And NOT #include <header.h>
because this relies on your local IDE settings and those are obviously not portable.
This is also true for an #import directive(the library is an com object).
2) Use the thing called "Dependency" to indicate linkage AND DO NOT PLACE the resulting lib in the linker config of the demo exe project. More precisely, project "demo exe" MUST be set as being dependent on project "library". This will cause the IDE to check if the library is compiled and then link the resulting library to the respective project (marked as dependent).
If your library is an Dll, you should additionally set the output folder of your projects like
..\\bin\\Debug or
..\\bin\\Release
for both your exe and your lib. This way, when you hit "Run" the App will find the dll and run correctly WITH THE MOST RECENT VERSION of your dll.
3)When linking an Windows SDK lib, use
#pragma comment(lib,"library.lib")
statement in the header of the class that uses that library. This causes the respective class to be extremely portable, and will always compile & link correctly,
EVEN if it is simply copied as files to another project.
I hope you will consider this useful and correct your sources accordingly.
|
|
|
|
 |
|
 |
if demo leaves alone for about 5 minutes,it'll dead,
can you check its why?
|
|
|
|
 |
|
 |
Thanks, I am using Visual Studio Express, can not use MFC.
by the way,why not make it cross platform? many people are familiar with Win32 styles.
|
|
|
|
 |
|
 |
inline BOOL operator!=(POINT point)
{return (point.x!= x && point.y!=y);}
shouldn't it be
inline BOOL operator!=(POINT point)
{return (point.x!= x || point.y!=y);}
|
|
|
|
 |
|
 |
Hi Boy, excellent job!!!!!
|
|
|
|
 |
|
 |
Well done on the article..
.. but there are already a number of fairly mature cross platform open-source gui libraries out there.
Why not google the following and see if they're up your alley..
- wxWidgets (Quite similar in feel to MFC)
- VCF (visual component framework, nice)
- Ultimate++
Regards
Steve
|
|
|
|
 |
|
 |
Dear Sir,
You right!!!!, however at the moment this is a Windows library. Maybe with some restriction it runs over wine.
Best,
Francisco
Colombia a Paradise.
|
|
|
|
 |
|
 |
Hi Francisco.
First of all thanks a lot for your effort on this.
I've noticed rather surprising thing in SWC code. In CWnd::WndProc function, in case of WM_NCCREATE message and if it is a MDI window -- CREATESTRUCT->lpCreateParams (got as lParam) is pointing to a CWin memory overwritten by a MDICREATESTRUCT.
And you seems to know about it, and actually use this! I mean in your code you treat same address first as CWin* and later as MDICREATESTRUCT*. It works now but will break if size/internals of CWind changes.
Does such hackery really needed? I mean in terms maintenance this might be cause of big troubles, as to find such things (not by a chance as in my case) is really hard.
-- serg.
|
|
|
|
 |
|
 |
Dear Sir,
Thanks for your comment, I'll review it.;)
Best,
Francisco
Colombia a Paradise.
|
|
|
|
 |
|
 |
I haven't looked at his code, so I don't know if he's doing things this way, but there is a trick used by ATL/WTL to make it so that one of the params (the HWND I think) passed into the libs WndProc can be expressly cast to a valid class instance that wraps the wndproc. It's done on purpose to avoid some kind of lookup list that maps an HWND to a class instance. This has the effect of making it easier to deal with AND make it thread safe. There's is (or was) a very cool article on the internet that dealt with how this worked and how to use it your own projects. This might be what he is doing.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
VCF Blog
|
|
|
|
 |
|
 |
seems it was msvc specific.
|
|
|
|
 |
|
 |
Hi,
Unfortunately some macro instruction don't compile, let me review again.
Best,
Francisco.
Colombia a Paradise
|
|
|
|
 |
|
 |
We must change '#include ' into '#include "Swc.h"' in 'stdafx.h'.
compile error:
--------------------Configuration: Swc - Win32 Release--------------------
Compiling...
StdAfx.cpp
Compiling...
CMenuSpawn.cpp
C:\Swc\CMenuSpawn.cpp(302) : error C2065: 'ODS_HOTLIGHT' : undeclared identifier
Error executing cl.exe.
Swc.lib - 1 error(s), 0 warning(s)
|
|
|
|
 |
|
 |
Dear Sir,
Thanks, another option is to include the SWC directory in VC include configuration.
Best,
Francisco
Colombia a Paradise
|
|
|
|
 |
|
 |
The first time it runs it shows an error because it is verifying a variable in the register. Run it again to solve this. Nice job here .
|
|
|
|
 |