|
hi all
can you tell me where error
Compiling...
SkinSlider.cpp
C:\DevStudio\MyProjects\QooSkin\SkinSys\SkinSlider.cpp(98) : fatal error C1010: unexpected end of file while looking for precompiled header directive
BitmapBtn.cpp
C:\DevStudio\MyProjects\QooSkin\SkinSys\BitmapBtn.cpp(235) : fatal error C1010: unexpected end of file while looking for precompiled header directive
BitmapProgress.cpp
C:\DevStudio\MyProjects\QooSkin\SkinSys\BitmapProgress.cpp(145) : fatal error C1010: unexpected end of file while looking for precompiled header directive
BitmapSlider.cpp
C:\DevStudio\MyProjects\QooSkin\SkinSys\BitmapSlider.cpp(167) : fatal error C1010: unexpected end of file while looking for precompiled header directive
Inifile.Cpp
C:\DevStudio\MyProjects\QooSkin\SkinSys\Inifile.Cpp(91) : fatal error C1010: unexpected end of file while looking for precompiled header directive
SkinButton.cpp
C:\DevStudio\MyProjects\QooSkin\SkinSys\SkinButton.cpp(76) : fatal error C1010: unexpected end of file while looking for precompiled header directive
SkinDialog.cpp
C:\DevStudio\MyProjects\QooSkin\SkinSys\SkinDialog.cpp(1025) : fatal error C1010: unexpected end of file while looking for precompiled header directive
SkinLabel.cpp
C:\DevStudio\MyProjects\QooSkin\SkinSys\SkinLabel.cpp(63) : fatal error C1010: unexpected end of file while looking for precompiled header directive
SkinProgress.cpp
C:\DevStudio\MyProjects\QooSkin\SkinSys\SkinProgress.cpp(80) : fatal error C1010: unexpected end of file while looking for precompiled header directive
AnimatedLabel.cpp
C:\DevStudio\MyProjects\QooSkin\SkinSys\AnimatedLabel.cpp(143) : fatal error C1010: unexpected end of file while looking for precompiled header directive
Generating Code...
Error executing cl.exe.
QooSkin.exe - 10 error(s), 0 warning(s)
|
|
|
|
|
Hi jackqoo ...
the problem you have while compiling is due to project settings of compilation. GO to
Project->Settings
and at the tab where u have "C/C++" , at the project settings you will have something like this :
/nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Fp"Debug/TCVA Integration.pch" /Yu"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
problem is at the STDAFX statement ´cos here you are saying that compiler must take it as a precompiled header so you must change this statement to something like this :
/nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Fp"Debug/TCVA Integration.pch" /YX"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
and you will get rid of these errors
|
|
|
|
|
It's more hundred times..... i made a fault in understanding this...
Especially, the member variable m_slider & m_Sliders...... -_-
I have to buy a microscope to understanding this code perfectly!
@.@
Yeah, Check it out~! ^^
|
|
|
|
|
Congratulation! I agree with everyone, it acts of one of the best codes than I will like to more often find. Still Congratulation!
However I found a small error in your code.
I tested this code on a Win2000 Server and I discovered a loss of memory.
Particularly when you employ the GetDC method, in this patform you have to release the memory. I corrected this error by employing the "ReleaseDC " method at each time that I find the "GetDC()".
For example, replace :
void CSkinLabel::CopyFrom(CRect r, CBitmap &m_B)
{
CDC* dc = GetDC();
CopyBitmap(dc, m_Back, m_B, r);
}
by this code :
void CSkinLabel::CopyFrom(CRect r, CBitmap &m_B)
{
CDC* dc = GetDC();
CopyBitmap(dc, m_Back, m_B, r);
// Modify by PP <ppyahoo@yahoo.fr>
ReleaseDC( dc );
}
Rgds,
Patrice Petit
|
|
|
|
|
Use CClientDC instead; it releases the DC when it goes out of scope.
As per your example:
void CSkinLabel::CopyFrom(CRect r, CBitmap &m_B)
{
ClientDC dc;
CopyBitmap(&dc, m_Back, m_B, r);
}
- Stan
Old programmers never die, they just stop responding to interrupts.
|
|
|
|
|
Can you tell me how to create a dialog like Windows Media .Thanks you
|
|
|
|
|
I just came back to this after a few months and got it to compile. I've made a few tiny improvements.
The controls flicker when a window goes over the dialog to I added
void CSkinDialog::PreSubclassWindow()
{
ModifyStyle( NULL , WS_CLIPCHILDREN ); // This is to REMOVE FLICKER
ModifyStyleEx( WS_EX_APPWINDOW, WS_EX_TOOLWINDOW ); // This is to remove the taskbar, but irrelevant for this message
CDialog::PreSubclassWindow();
}
in SkinDialog.cpp
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Then I removed the for-loops in SkinDialog.cpp OnPaint().
void CSkinDialog::OnPaint()
{
CPaintDC dc(this); // device context for painting
// TODO: Add your message handler code here
RECT r;
GetClientRect(&r);
DrawBitmap(GetDC(), (HBITMAP) m_Normal, r, TRUE);
}
because it is no longer need and it just added flicker anyway, but if it wasn't there (before these changes) the controls wouldn't have been redrawn.
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Then I modified CBitmapProgress::OnPaint() and added Keith Rule's CMemDC because the trackbars would flicker when you moved them alot.
Add memdc.h to your project. You can download it form here
http://www.codeproject.com/gdi/flickerfree.asp
#include "memdc.h" in BitmapProgress.h
Then change CBitmapProgress::OnPaint() to this.
void CBitmapProgress::OnPaint()
{
CPaintDC dc(this); // device context for painting
CRect r;
GetClientRect(&r);
CMemDC pDC(&dc,&r);
// TODO: Add your message handler code here
CDC memdc;
memdc.CreateCompatibleDC(NULL);
memdc.SelectObject(m_Normal);
pDC.BitBlt(0, 0, r.Width(), r.Height(), &memdc, 0, 0, SRCCOPY);
memdc.SelectObject(m_Down);
if(m_Horizantal)
{
int h = (r.Height() * m_Pos) / 100;
pDC.BitBlt(0, 0, r.Width(), h, &memdc, 0, 0, SRCCOPY);
}
else
{
int w = (r.Width() * m_Pos) / 100;
pDC.BitBlt(0, 0, w, r.Height(), &memdc, 0, 0, SRCCOPY);
}
// Do not call CBitmapBtn::OnPaint() for painting messages
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
and lastly make sure every GetDC is then released by using ReleaseDC as well as every CreateCompatibleDC is deleted by a DeleteDC.
I don't remember where I found them, but I found a few. In a graphics intensive program like this, it all adds up.
|
|
|
|
|
Sibilant.
very good!!!! Thank you for your comment.
|
|
|
|
|
I am a beginner of VC++.
It is easy to insert bitmap in SDI or MDI applications by writing code in their OnDraw function.
I don't know what code to insert for loading bitmaps and moreover where to place the code.As there are so many files.
Please guide me if you can.
Farhan Ashraf (Lahore)
|
|
|
|
|
When i use these sources and headers , i get rectengular window , there is white colour on the places outside the normal jpeg skin(main background )to make the skin rectangle , if i use the sample skin provided in this project then also it is the same , can anyone tell me where i am wrong . Since when i compile and run this project it works all right .
|
|
|
|
|
I think it's a problem with color definition for mask or perhaps the color palet you are using to draw it.
|
|
|
|
|
You must set dialog without border.
Enjoy
Paradoxx
|
|
|
|
|
I've roughly read through the code but I do not quite understand how the data exchange is done without DDX. In addition, how come all the components, say Buttons, were created with the same ID which is '0'?
Thanks in advance.
|
|
|
|
|
Hi!
Congratulations for that great article. I wonder if there are nay other Skin API on the market ?
Thanks
Jean-Marc Molina
Email: jmmolina@ifrance.com
Web: http://goa.ifrance.com
|
|
|
|
|
I can't get my own dialog based program to compile with just the sample skin. Could someone email me one that they got to compile?
|
|
|
|
|
Hi guys,
I am keen to find some basic web-based (.asp?) code that allows you to set up multiple channels and then playleist in them?
Thanks so much!
E.
|
|
|
|
|
Thanks alot to Cuneyt Elibol. His Skinsys package is a very nice base for skinable software.
I based Japy MP3 Player on Skinsys. Japy is a GPL player. All source code can be downloaded at http://kellyan.multimania.com
This player is skinable with Skinsys and I add many features (Automatic Gain Control, cover viewer, winamp plugin interface, audio effects, etc...). It play all audio format (wma, mp3, aac, vqf, mpegplus, ogg vorbis, mp3PRO, etc...).
I need help to continue. So, download the source code, compile it with VC6 and help me to improve this player.
One problem remains with SkinSys : if I move a window, this window is not displayed during moving. If you have any idea to solve this, please send me a mail.
Thanks.
Georges
|
|
|
|
|
Hi
Here are some changes to files SkinDialog.cpp and SkinDialog.h that will cause
the whole dialog to move when you drag it with a mouse.
File SkinDialog.h:
add following member variables to class CSkinDialog:
CPoint cDragStart;
BOOL bLeftClicked;
Add following message handlers to CSkinDialog:
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnNcPaint();
File SkinDialog.cpp
Initialize new variables in the CSkinDialog constructors:
bLeftClicked = FALSE;
cDragStart = CPoint(0,0);
Add new messages to the message map (BEGIN_MESSAGE_MAP):
ON_WM_LBUTTONUP()
ON_WM_NCPAINT()
Here the body of the new message handlers:
void CSkinDialog::OnNcPaint()
{
CWindowDC dc(this);
CRect rect;
GetWindowRect(&rect);
ScreenToClient(&rect);
DrawBitmap(&dc, (HBITMAP) m_Normal, rect, TRUE);
}
void CSkinDialog::OnLButtonUp(UINT nFlags, CPoint point)
{
bLeftClicked = FALSE;
ReleaseCapture();
CDialog::OnLButtonUp(nFlags, point);
}
Insert following lines at the beginning of OnLButtonDown:
bLeftClicked = TRUE;
cDragStart = point;
SetCapture();
Finally insert the following lines at the beginning of OnMouseMove:
if (bLeftClicked)
{
CPoint cPtTemp = point;
cPtTemp -= cDragStart;
CRect cRect;
GetWindowRect(&cRect);
cRect += cPtTemp;
MoveWindow(cRect);
}
I hope it works. This is definitely not perfect as when you move the
dialog fast it leaves traces behind it. The traces eventually disappear
but they aren't nice. Also if the dialog is very irregular and you
drag it over a bare desktop you will actually see the shadow of the
rectangular form underlying the dialog.
I will be happy if you can make that thing work better.
Filip
|
|
|
|
|
but I could not open the website
http://server33.hypermart.net/celibol/skinsys.zip
|
|
|
|
|
Really, when you add a CListCtrl, it can not work properly.
I tried all they suggested, and failed.
Any examples? Thank you very much!
daixm@263.net
|
|
|
|
|
Good Code.
I have a Global Question::
Where i can find a Toturial Which explains how the Region Algorithm works?
yoav adler
|
|
|
|
|
|
In the example project the skin dialog can be dragged.
However, when I created my own project, the dialog can't be moved.
anyone knows what is the problem ?
Thanks a lot,
Amit
|
|
|
|
|
Hope this answer doesn't arrive to late...
anyway
problem is related to message handler when you click mouse button. mmmmmm... Better explain my self :
sample code has the folowing code to handle at SkinDialog Class drag events
void CSkinDialog::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
PostMessage(WM_NCLBUTTONDOWN, HTCAPTION, MAKELPARAM(point.x,point.y));
CDialog::OnLButtonDown(nFlags, point);
}
this is what makes the window sticky
|
|
|
|
|
Be sure that in your application's dialog class, that you change all references to 'CDialog' to 'CSkinDialog'.
For example, your message map should start like this:
BEGIN_MESSAGE_MAP(CMySkinDlg, CSkinDialog)
rather than
BEGIN_MESSAGE_MAP(CMySkinDlg, CDialog)
|
|
|
|
|