|
|
hiya ..
wanna customize my projects makefile by specufying some other CPU type else than x86 .. and use NMAKE for it ..... how can i customize the makefile to achieve this ..
Thanks in advance .....
Farid ....
|
|
|
|
|
- How to change one font to another system-defined font?
- How to restore a font ?
- Can you help?
-Regards,
Maer
|
|
|
|
|
Where do you want to change the font ? System wide ? In a control ?
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
- Thanks pal!
- I simply want to get the general codes for changing font. It is not for specific use.
- Can you help? Can you show me an example?
-Regards,
Maer
|
|
|
|
|
Try this article,
Automatic Font Handling Class in Fonts & GDI >> GDI Objects
Jonathan de Halleux, Belgium.
|
|
|
|
|
- Thanks pal!
- Your reply clarifies my doubts.
- Regards,
Maer
|
|
|
|
|
- From MSDN it is said,
... A call to TlsAlloc() returns a global TLS index. This one TLS index is valid for every thread within the process that allocated it ...
... when TlsAlloc() is called, every thread within the process has its own private ULONG_PTR-sized space reserved for it (in its stack space, but this is implementation-specific) ...
- Suppose in a case, when thread A1 loads Dll B, and Dll B allocates a TLS in thread A1. And there are 2 threads in process P, thread A1 and thread A2. So when Dll B allocates a TLS in thread A1, thread A2 is also allocated a TLS with the same index. So we have 2 TLSs with the same index now.
- Am I right? But I think the TLS in thread A2 is useless place. (Suppose only thread A1 access Dll B)
- Can you help?
- Best regards,
Maer
|
|
|
|
|
Basically, you're right. The TLS slot alloated in A2 is useless if A2 does not use the same data items as A1.
The reason for this is this. Suppose you want to save the creation time for each thread in your process. And for the sake of completeness we can do the saving in a DLL. When the DLL loads it calls TlsAlloc and saves the returned index in a global variable (e.g. g_iTlsIndex). Now, as each thread is created it can save the creation time in the TLS slot with index g_iTlsIndex - the same index but a unique memory location for each thread. Of course, if your threads are totally unrelated and does totally different things they will probably not have the need for common TLS indices. But you got at least 64 TLS slots available, so you can use new one for each thread type.
TLS, DLLs and multithreading programming is described in great detail in Richters "Advanced Windows". I for (i=0; i<A_WHOLE_LOT;i++, printf("really ")); recommend you get a copy if you're doing MT programming. It's worth every dime.
Cheers
Steen.
"To claim that computer games influence children is rediculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
DAMN, I though the code tag would allow me to write greater-than an less-than characters! Anyway, the last paragraph should read:
TLS, DLLs and multithreading programming is described in great detail in Richter's "Advanced Windows". I really really recommend that you get a copy if you're doing MT programming. It's worth every dime.
Cheers
Steen.
"To claim that computer games influence children is rediculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
- Thanks pal!
- I still have a question. If I just use the function "TlsAlloc" and do not use the function "TlsSetValue", I think we just allocate an index and do not allocate a memory space to store value of variable.
- Am I right?
- Regards,
Maer
|
|
|
|
|
Hi,
I have developed an MDI OpenGL App using MFC. It creates a scene and displays it after reading it from a file that stores the colors, etc. of each object in the scene. Now how do I handle change in color depth in runtime, because in my code I use glColor3f(R,G,B) to specify colors while drawing. So will this code work properly in 256 colors also. How will I handle changes to the palette etc.?
Thanks,
Krishnan
|
|
|
|
|
I have refined my previous question in the intrests of specificity.
I need to make an MDI application that supports two kinds of windows:
A: Standard view of a set of data (like an invoice or reciept)
B: Dialogs for adding items to said invoice
As well, I need to put a large bar along the top serving as a sort of summary, as well as commiting, clearing, or canceling the transaction, but I have a way to do this already.
My problem is, I need to know if there is a way to do item B. These must be modeless dialogs within the MDI region. MFC doc/view preferably. think photoshop toolwindows with the main view presenting the finished work. however, photoshop windows can escape the main window.
Another option I have been looking into is docking bars, but the best example I have found is here on code project, but only loads single controls... if these can load whole dialogs it would work.
any help would be most apreciated.
// Rock
|
|
|
|
|
Use FormView for your "Dialogs". They are basically modeless dialogs hooked up to be views.
The "large bar along the top" could be implemented as a dialog bar, I think.
Cheers
Steen.
"To claim that computer games influence children is rediculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
How to disable the "Ctrl + ALT + DEL" in Windows 2000? Eager for you help, any of your advice will be appreciate.
|
|
|
|
|
You can't. The point of C-A-D is that it's secure because nothing can intercept it.
--Mike--
http://home.inreach.com/mdunn/
This posting is provided "as was" with no warranties, guarantees, lotteries, or any of those little bags of peanuts you get on planes. You assume all risk for crossing the street without holding mommy's hand. © 2001 Mike's Classy Software. Member FDIC. If rash develops, discontinue use.
your with and
|
|
|
|
|
Yes, you can intercept Ctrl-Alt-Del on Windows NT & Windows 2000.
2 ways to do that:
. you can code your own gina.dll (this DLL is used to manage logon authentification). You can replace the original DLL with the registry key local_machine\microsoft\windows nt\winlogon\GinaDLL = mygina.dll (your dll must be in the system32 directory). You can find help at :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/security/winlogon_portal_2hb9.asp
or you can use this source:
http://wwwthep.physik.uni-mainz.de/~frink/newgina_pre09/readme.html
The best way is to code a filter dll which loads the original one, and block the ctrl-alt-del event (in WlxLoggedOnSAS function) by returning WLX_SAS_ACTION_NONE. Be carreful because, if Windows doesn't find your dll or if you have a bug inside, your system will be blocked. This method works very well, but you'll have a flash when ctrl-alt-del will occur. It's a detail but we'll find the perfect code...
. your can also code a driver which intercept keyboard event (with msgkeybfilter i think ?). In this case, no flash when you press ctrl-alt-del (i tested a software which uses this method and it completely block the ctrl-alt-del (no flash here !)).
Good luck !
|
|
|
|
|
You can use the driver ctrl2cap from www.sysinternals.com. It switch change capslock key to left control key, but you can easily change the code to block ctrl-alt-del combination.
|
|
|
|
|
I think the only way is to write a GINA Dll. But that is a big task for small functionlity.
Deepak Khajuria
|
|
|
|
|
Dear All,
I have to add Microsoft Text to Speech control to my Win32 application.
Please, help me how to add this control to my application
|
|
|
|
|
|
Recently, i was asked to compiled hundred of source code files which consists of c, cpp, asm and dll file. The file was came along with several make and compile file.
However, I have no idea on how to use visual studio c++ and masm to make use of "make/compile" file in order to produce the executable file.
The below are some of the portion of make file and compile file. Please
let me know how can i use them in order to produce the executable file.
thanks
------
(xxx.mak)
# Microsoft Developer Studio Generated NMAKE File, Format Version 4.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
!IF "$(CFG)" == ""
CFG=Prime95 - Win32 Debug
!MESSAGE No configuration specified. Defaulting to Prime95 - Win32 Debug.
!ENDIF
!IF "$(CFG)" != "Prime95 - Win32 Release" && "$(CFG)" !=\
"Prime95 - Win32 Debug"
!MESSAGE Invalid configuration "$(CFG)" specified.
!MESSAGE You can specify a configuration when running NMAKE on this makefile
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "Prime95.mak" CFG="Prime95 - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "Prime95 - Win32 Release" (based on "Win32 (x86) Application")
!MESSAGE "Prime95 - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE
!ERROR An invalid configuration is specified.
!ENDIF
!IF "$(OS)" == "Windows_NT"
NULL=
!ELSE
NULL=nul
!ENDIF
################################################################################
# Begin Project
# PROP Target_Last_Scanned "Prime95 - Win32 Debug"
CPP=cl.exe
RSC=rc.exe
MTL=mktyplib.exe
!IF "$(CFG)" == "Prime95 - Win32 Release"
# PROP BASE Use_MFC 6
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 5
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
OUTDIR=.\Release
INTDIR=.\Release
ALL : "$(OUTDIR)\Prime95.exe" "$(OUTDIR)\Prime95.hlp"
CLEAN :
-@erase ".\Release\Prime95.exe"
-@erase ".\Release\AffinityDlg.obj"
-@erase ".\Release\Prime95.pch"
-@erase ".\Release\PreferencesDlg.obj"
-@erase ".\Release\Prime95.obj"
-@erase ".\Release\Prime95Doc.obj"
-@erase ".\Release\StdAfx.obj"
-@erase ".\Release\Priority.obj"
-@erase ".\Release\EditDropFiles.obj"
-@erase ".\Release\CpuDlg.obj"
-@erase ".\Release\Prime95View.obj"
-@erase ".\Release\TestDlg.obj"
-@erase ".\Release\MainFrm.obj"
-@erase ".\Release\ContentsDlg.obj"
-@erase ".\Release\Prime95.res"
-@erase ".\Release\Prime95.map"
-@erase ".\Release\Prime95.hlp"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c
# ADD CPP /nologo /MT /W3 /GX /Ot /Oi /Ob1 /Gf /Gy /I ".." /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /Gs /Gs /c
CPP_PROJ=/nologo /MT /W3 /GX /Ot /Oi /Ob1 /Gf /Gy /I ".." /D "WIN32" /D\
"NDEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"$(INTDIR)/Prime95.pch" /Yu"stdafx.h"\
/Fo"$(INTDIR)/" /Gs /Gs /c
CPP_OBJS=.\Release/
CPP_SBRS=
# ADD BASE MTL /nologo /D "NDEBUG" /win32
# ADD MTL /nologo /D "NDEBUG" /win32
MTL_PROJ=/nologo /D "NDEBUG" /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
# ADD RSC /l 0x409 /d "NDEBUG"
RSC_PROJ=/l 0x409 /fo"$(INTDIR)/Prime95.res" /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
BSC32_FLAGS=/nologo /o"$(OUTDIR)/Prime95.bsc"
BSC32_SBRS=
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386
# ADD LINK32 ../prime95/mult.obj ../prime95/mult1.obj ../prime95/mult1aux.obj ../prime95/mult2.obj ../prime95/mult2a.obj ../prime95/mult2aux.obj ../prime95/mult3.obj ../prime95/mult3a.obj ../prime95/mult3aux.obj ../prime95/mult3auq.obj ../prime95/mult4.obj ../prime95/mult4a.obj ../prime95/mult4b.obj ../prime95/mult1p.obj ../prime95/mult2p.obj ../prime95/mult2ap.obj ../prime95/mult3p.obj ../prime95/mult3ap.obj ../prime95/mult4p.obj ../prime95/mult4ap.obj ../prime95/mult4bp.obj ../prime95/mult4aux.obj ../prime95/mult4auq.obj ../prime95/mult3q.obj ../prime95/mult3aq.obj ../prime95/mult4q.obj ../prime95/mult4aq.obj ../prime95/mult4bq.obj ../prime95/ecmhelp.obj ../prime95/xmult1.obj ../prime95/xmult1ax.obj ../prime95/xmult2.obj ../prime95/xmult2a.obj ../prime95/xmult2ax.obj ../prime95/xmult3.obj ../prime95/xmult3a.obj ../prime95/xmult3ax.obj /nologo /subsystem:windows /map /machine:I386
# SUBTRACT LINK32 /debug
LINK32_FLAGS=../prime95/mult.obj ../prime95/mult1.obj ../prime95/mult1aux.obj\
../prime95/mult2.obj ../prime95/mult2a.obj ../prime95/mult2aux.obj\
../prime95/mult3.obj ../prime95/mult3a.obj ../prime95/mult3aux.obj\
../prime95/mult3auq.obj ../prime95/mult4.obj ../prime95/mult4a.obj\
../prime95/mult4b.obj ../prime95/mult1p.obj ../prime95/mult2p.obj\
../prime95/mult2ap.obj ../prime95/mult3p.obj ../prime95/mult3ap.obj\
../prime95/mult4p.obj ../prime95/mult4ap.obj ../prime95/mult4bp.obj\
../prime95/mult4aux.obj ../prime95/mult4auq.obj ../prime95/mult3q.obj\
../prime95/mult3aq.obj ../prime95/mult4q.obj ../prime95/mult4aq.obj\
../prime95/mult4bq.obj ../prime95/ecmhelp.obj ../prime95/xmult1.obj\
../prime95/xmult1ax.obj ../prime95/xmult2.obj ../prime95/xmult2a.obj\
../prime95/xmult2ax.obj ../prime95/xmult3.obj ../prime95/xmult3a.obj\
../prime95/xmult3ax.obj /nologo /subsystem:windows /incremental:no\
/pdb:"$(OUTDIR)/Prime95.pdb" /map:"$(INTDIR)/Prime95.map" /machine:I386\
/out:"$(OUTDIR)/Prime95.exe"
LINK32_OBJS= \
"$(INTDIR)/AffinityDlg.obj" \
"$(INTDIR)/PreferencesDlg.obj" \
"$(INTDIR)/Prime95.obj" \
"$(INTDIR)/Prime95Doc.obj" \
"$(INTDIR)/StdAfx.obj" \
"$(INTDIR)/Priority.obj" \
"$(INTDIR)/EditDropFiles.obj" \
"$(INTDIR)/CpuDlg.obj" \
"$(INTDIR)/Prime95View.obj" \
"$(INTDIR)/TestDlg.obj" \
"$(INTDIR)/MainFrm.obj" \
"$(INTDIR)/ContentsDlg.obj" \
"$(INTDIR)/Prime95.res"
"$(OUTDIR)\Prime95.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ELSEIF "$(CFG)" == "Prime95 - Win32 Debug"
# PROP BASE Use_MFC 6
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 6
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
OUTDIR=.\Debug
INTDIR=.\Debug
ALL : "$(OUTDIR)\Prime95.exe" "$(OUTDIR)\Prime95.hlp"
CLEAN :
-@erase ".\Debug\vc40.pdb"
-@erase ".\Debug\Prime95.pch"
-@erase ".\Debug\vc40.idb"
-@erase ".\Debug\Prime95.exe"
-@erase ".\Debug\Priority.obj"
-@erase ".\Debug\CpuDlg.obj"
-@erase ".\Debug\PreferencesDlg.obj"
-@erase ".\Debug\TestDlg.obj"
-@erase ".\Debug\Prime95.obj"
-@erase ".\Debug\ContentsDlg.obj"
-@erase ".\Debug\MainFrm.obj"
-@erase ".\Debug\EditDropFiles.obj"
-@erase ".\Debug\Prime95Doc.obj"
-@erase ".\Debug\Prime95View.obj"
-@erase ".\Debug\StdAfx.obj"
-@erase ".\Debug\AffinityDlg.obj"
-@erase ".\Debug\Prime95.res"
-@erase ".\Debug\Prime95.ilk"
-@erase ".\Debug\Prime95.pdb"
-@erase ".\Debug\Prime95.hlp"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Ot /Oi /I ".." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "GDEBUG" /Yu"stdafx.h" /c
CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Ot /Oi /I ".." /D "WIN32" /D "_DEBUG" /D\
"_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "GDEBUG" /Fp"$(INTDIR)/Prime95.pch"\
/Yu"stdafx.h" /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
CPP_OBJS=.\Debug/
CPP_SBRS=
# ADD BASE MTL /nologo /D "_DEBUG" /win32
# ADD MTL /nologo /D "_DEBUG" /win32
MTL_PROJ=/nologo /D "_DEBUG" /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
RSC_PROJ=/l 0x409 /fo"$(INTDIR)/Prime95.res" /d "_DEBUG" /d "_AFXDLL"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
BSC32_FLAGS=/nologo /o"$(OUTDIR)/Prime95.bsc"
BSC32_SBRS=
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386
# ADD LINK32 ../prime95/mult.obj ../prime95/mult1.obj ../prime95/mult1aux.obj ../prime95/mult2.obj ../prime95/mult2a.obj ../prime95/mult2aux.obj ../prime95/mult3.obj ../prime95/mult3a.obj ../prime95/mult3aux.obj ../prime95/mult3auq.obj ../prime95/mult4.obj ../prime95/mult4a.obj ../prime95/mult4b.obj ../prime95/mult1p.obj ../prime95/mult2p.obj ../prime95/mult2ap.obj ../prime95/mult3p.obj ../prime95/mult3ap.obj ../prime95/mult4p.obj ../prime95/mult4ap.obj ../prime95/mult4bp.obj ../prime95/mult4aux.obj ../prime95/mult4auq.obj ../prime95/mult3q.obj ../prime95/mult3aq.obj ../prime95/mult4q.obj ../prime95/mult4aq.obj ../prime95/mult4bq.obj ../prime95/ecmhelp.obj ../prime95/xmult1.obj ../prime95/xmult1ax.obj ../prime95/xmult2.obj ../prime95/xmult2a.obj ../prime95/xmult2ax.obj ../prime95/xmult3.obj ../prime95/xmult3a.obj ../prime95/xmult3ax.obj /nologo /subsystem:windows /debug /machine:I386
LINK32_FLAGS=../prime95/mult.obj ../prime95/mult1.obj ../prime95/mult1aux.obj\
../prime95/mult2.obj ../prime95/mult2a.obj ../prime95/mult2aux.obj\
../prime95/mult3.obj ../prime95/mult3a.obj ../prime95/mult3aux.obj\
../prime95/mult3auq.obj ../prime95/mult4.obj ../prime95/mult4a.obj\
../prime95/mult4b.obj ../prime95/mult1p.obj ../prime95/mult2p.obj\
../prime95/mult2ap.obj ../prime95/mult3p.obj ../prime95/mult3ap.obj\
../prime95/mult4p.obj ../prime95/mult4ap.obj ../prime95/mult4bp.obj\
../prime95/mult4aux.obj ../prime95/mult4auq.obj ../prime95/mult3q.obj\
../prime95/mult3aq.obj ../prime95/mult4q.obj ../prime95/mult4aq.obj\
../prime95/mult4bq.obj ../prime95/ecmhelp.obj ../prime95/xmult1.obj\
../prime95/xmult1ax.obj ../prime95/xmult2.obj ../prime95/xmult2a.obj\
../prime95/xmult2ax.obj ../prime95/xmult3.obj ../prime95/xmult3a.obj\
../prime95/xmult3ax.obj /nologo /subsystem:windows /incremental:yes\
/pdb:"$(OUTDIR)/Prime95.pdb" /debug /machine:I386 /out:"$(OUTDIR)/Prime95.exe"
LINK32_OBJS= \
"$(INTDIR)/Priority.obj" \
"$(INTDIR)/CpuDlg.obj" \
"$(INTDIR)/PreferencesDlg.obj" \
"$(INTDIR)/TestDlg.obj" \
"$(INTDIR)/Prime95.obj" \
"$(INTDIR)/ContentsDlg.obj" \
"$(INTDIR)/MainFrm.obj" \
"$(INTDIR)/EditDropFiles.obj" \
"$(INTDIR)/Prime95Doc.obj" \
"$(INTDIR)/Prime95View.obj" \
"$(INTDIR)/StdAfx.obj" \
"$(INTDIR)/AffinityDlg.obj" \
"$(INTDIR)/Prime95.res"
"$(OUTDIR)\Prime95.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ENDIF
.c{$(CPP_OBJS)}.obj:
$(CPP) $(CPP_PROJ) $<
.cpp{$(CPP_OBJS)}.obj:
$(CPP) $(CPP_PROJ) $<
.cxx{$(CPP_OBJS)}.obj:
$(CPP) $(CPP_PROJ) $<
.c{$(CPP_SBRS)}.sbr:
$(CPP) $(CPP_PROJ) $<
.cpp{$(CPP_SBRS)}.sbr:
$(CPP) $(CPP_PROJ) $<
.cxx{$(CPP_SBRS)}.sbr:
$(CPP) $(CPP_PROJ) $<
################################################################################
# Begin Target
# Name "Prime95 - Win32 Release"
# Name "Prime95 - Win32 Debug"
!IF "$(CFG)" == "Prime95 - Win32 Release"
!ELSEIF "$(CFG)" == "Prime95 - Win32 Debug"
!ENDIF
################################################################################
# Begin Source File
SOURCE=.\ReadMe.txt
!IF "$(CFG)" == "Prime95 - Win32 Release"
!ELSEIF "$(CFG)" == "Prime95 - Win32 Debug"
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\Prime95.cpp
!IF "$(CFG)" == "Prime95 - Win32 Release"
DEP_CPP_PRIME=\
".\StdAfx.h"\
".\Prime95.h"\
".\MainFrm.h"\
".\Prime95Doc.h"\
".\Prime95View.h"\
"$(INTDIR)\Prime95.obj" : $(SOURCE) $(DEP_CPP_PRIME) "$(INTDIR)"\
"$(INTDIR)\Prime95.pch"
!ELSEIF "$(CFG)" == "Prime95 - Win32 Debug"
DEP_CPP_PRIME=\
".\StdAfx.h"\
".\Prime95.h"\
".\MainFrm.h"\
".\Prime95Doc.h"\
".\Prime95View.h"\
".\EditDropFiles.h"\
".\..\cpuid.h"\
".\..\speed.h"\
".\..\gwnum.h"\
".\..\prp.h"\
".\..\prp95.h"\
"$(INTDIR)\Prime95.obj" : $(SOURCE) $(DEP_CPP_PRIME) "$(INTDIR)"\
"$(INTDIR)\Prime95.pch"
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\StdAfx.cpp
DEP_CPP_STDAF=\
".\StdAfx.h"\
!IF "$(CFG)" == "Prime95 - Win32 Release"
# ADD CPP /Yc"stdafx.h"
BuildCmds= \
$(CPP) /nologo /MT /W3 /GX /Ot /Oi /Ob1 /Gf /Gy /I ".." /D "WIN32" /D "NDEBUG"\
/D "_WINDOWS" /D "_MBCS" /Fp"$(INTDIR)/Prime95.pch" /Yc"stdafx.h"\
/Fo"$(INTDIR)/" /Gs /Gs /c $(SOURCE) \
"$(INTDIR)\StdAfx.obj" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)"
$(BuildCmds)
"$(INTDIR)\Prime95.pch" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)"
$(BuildCmds)
!ELSEIF "$(CFG)" == "Prime95 - Win32 Debug"
# ADD CPP /Yc"stdafx.h"
BuildCmds= \
$(CPP) /nologo /MDd /W3 /Gm /GX /Zi /Ot /Oi /I ".." /D "WIN32" /D "_DEBUG" /D\
"_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "GDEBUG" /Fp"$(INTDIR)/Prime95.pch"\
/Yc"stdafx.h" /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c $(SOURCE) \
"$(INTDIR)\StdAfx.obj" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)"
$(BuildCmds)
"$(INTDIR)\Prime95.pch" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)"
$(BuildCmds)
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\MainFrm.cpp
!IF "$(CFG)" == "Prime95 - Win32 Release"
DEP_CPP_MAINF=\
".\StdAfx.h"\
".\Prime95.h"\
".\MainFrm.h"\
"$(INTDIR)\MainFrm.obj" : $(SOURCE) $(DEP_CPP_MAINF) "$(INTDIR)"\
"$(INTDIR)\Prime95.pch"
!ELSEIF "$(CFG)" == "Prime95 - Win32 Debug"
DEP_CPP_MAINF=\
".\StdAfx.h"\
".\Prime95.h"\
".\MainFrm.h"\
".\EditDropFiles.h"\
".\..\cpuid.h"\
".\..\speed.h"\
".\..\gwnum.h"\
".\..\prp.h"\
".\..\prp95.h"\
"$(INTDIR)\MainFrm.obj" : $(SOURCE) $(DEP_CPP_MAINF) "$(INTDIR)"\
"$(INTDIR)\Prime95.pch"
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\Prime95Doc.cpp
!IF "$(CFG)" == "Prime95 - Win32 Release"
DEP_CPP_PRIME9=\
".\StdAfx.h"\
".\MainFrm.h"\
".\Prime95.h"\
".\Prime95Doc.h"\
".\AffinityDlg.h"\
".\ContentsDlg.h"\
".\CpuDlg.h"\
".\PreferencesDlg.h"\
".\Priority.h"\
".\TestDlg.h"\
{$(INCLUDE)}"\sys\Timeb.h"\
".\..\cpuid.c"\
".\..\speed.c"\
".\..\giants.h"\
".\..\giants.c"\
".\..\gwnum.c"\
".\..\prp.c"\
".\..\prp95.c"\
"$(INTDIR)\Prime95Doc.obj" : $(SOURCE) $(DEP_CPP_PRIME9) "$(INTDIR)"\
"$(INTDIR)\Prime95.pch"
!ELSEIF "$(CFG)" == "Prime95 - Win32 Debug"
DEP_CPP_PRIME9=\
".\StdAfx.h"\
".\MainFrm.h"\
".\Prime95.h"\
".\Prime95Doc.h"\
".\AffinityDlg.h"\
".\ContentsDlg.h"\
".\CpuDlg.h"\
".\PreferencesDlg.h"\
".\Priority.h"\
".\TestDlg.h"\
{$(INCLUDE)}"\sys\Timeb.h"\
".\..\cpuid.c"\
".\..\speed.c"\
".\..\giants.h"\
".\..\giants.c"\
".\..\gwnum.c"\
".\..\prp.c"\
".\..\prp95.c"\
".\EditDropFiles.h"\
".\..\cpuid.h"\
".\..\speed.h"\
".\..\gwnum.h"\
".\..\prp.h"\
".\..\prp95.h"\
"$(INTDIR)\Prime95Doc.obj" : $(SOURCE) $(DEP_CPP_PRIME9) "$(INTDIR)"\
"$(INTDIR)\Prime95.pch"
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\Prime95View.cpp
!IF "$(CFG)" == "Prime95 - Win32 Release"
DEP_CPP_PRIME95=\
".\StdAfx.h"\
".\Prime95.h"\
".\Prime95Doc.h"\
".\Prime95View.h"\
"$(INTDIR)\Prime95View.obj" : $(SOURCE) $(DEP_CPP_PRIME95) "$(INTDIR)"\
"$(INTDIR)\Prime95.pch"
!ELSEIF "$(CFG)" == "Prime95 - Win32 Debug"
DEP_CPP_PRIME95=\
".\StdAfx.h"\
".\Prime95.h"\
".\Prime95Doc.h"\
".\Prime95View.h"\
".\EditDropFiles.h"\
".\..\cpuid.h"\
".\..\speed.h"\
".\..\gwnum.h"\
".\..\prp.h"\
".\..\prp95.h"\
"$(INTDIR)\Prime95View.obj" : $(SOURCE) $(DEP_CPP_PRIME95) "$(INTDIR)"\
"$(INTDIR)\Prime95.pch"
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\Prime95.rc
DEP_RSC_PRIME95_=\
".\res\Prime95.ico"\
".\res\yellow_i.ico"\
".\res\cursor1.cur"\
".\res\cursor2.cur"\
".\res\Prime95.rc2"\
"$(INTDIR)\Prime95.res" : $(SOURCE) $(DEP_RSC_PRIME95_) "$(INTDIR)"
$(RSC) $(RSC_PROJ) $(SOURCE)
# End Source File
################################################################################
# Begin Source File
SOURCE=.\hlp\Prime95.hpj
!IF "$(CFG)" == "Prime95 - Win32 Release"
# Begin Custom Build - Making help file...
OutDir=.\Release
ProjDir=.
TargetName=Prime95
InputPath=.\hlp\Prime95.hpj
"$(OutDir)\$(TargetName).hlp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
"$(ProjDir)\makehelp.bat"
# End Custom Build
!ELSEIF "$(CFG)" == "Prime95 - Win32 Debug"
# Begin Custom Build - Making help file...
OutDir=.\Debug
ProjDir=.
TargetName=Prime95
InputPath=.\hlp\Prime95.hpj
"$(OutDir)\$(TargetName).hlp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
"$(ProjDir)\makehelp.bat"
# End Custom Build
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\CpuDlg.cpp
!IF "$(CFG)" == "Prime95 - Win32 Release"
DEP_CPP_CPUDL=\
".\StdAfx.h"\
".\Prime95.h"\
".\CpuDlg.h"\
"$(INTDIR)\CpuDlg.obj" : $(SOURCE) $(DEP_CPP_CPUDL) "$(INTDIR)"\
"$(INTDIR)\Prime95.pch"
!ELSEIF "$(CFG)" == "Prime95 - Win32 Debug"
DEP_CPP_CPUDL=\
".\StdAfx.h"\
".\Prime95.h"\
".\CpuDlg.h"\
".\EditDropFiles.h"\
".\..\cpuid.h"\
".\..\speed.h"\
".\..\gwnum.h"\
".\..\prp.h"\
".\..\prp95.h"\
"$(INTDIR)\CpuDlg.obj" : $(SOURCE) $(DEP_CPP_CPUDL) "$(INTDIR)"\
"$(INTDIR)\Prime95.pch"
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\PreferencesDlg.cpp
!IF "$(CFG)" == "Prime95 - Win32 Release"
DEP_CPP_PREFE=\
".\StdAfx.h"\
".\Prime95.h"\
".\PreferencesDlg.h"\
"$(INTDIR)\PreferencesDlg.obj" : $(SOURCE) $(DEP_CPP_PREFE) "$(INTDIR)"\
"$(INTDIR)\Prime95.pch"
!ELSEIF "$(CFG)" == "Prime95 - Win32 Debug"
DEP_CPP_PREFE=\
".\StdAfx.h"\
".\Prime95.h"\
".\PreferencesDlg.h"\
".\EditDropFiles.h"\
".\..\cpuid.h"\
".\..\speed.h"\
".\..\gwnum.h"\
".\..\prp.h"\
".\..\prp95.h"\
"$(INTDIR)\PreferencesDlg.obj" : $(SOURCE) $(DEP_CPP_PREFE) "$(INTDIR)"\
"$(INTDIR)\Prime95.pch"
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\TestDlg.cpp
!IF "$(CFG)" == "Prime95 - Win32 Release"
DEP_CPP_TESTD=\
".\StdAfx.h"\
".\Prime95.h"\
".\TestDlg.h"\
"$(INTDIR)\TestDlg.obj" : $(SOURCE) $(DEP_CPP_TESTD) "$(INTDIR)"\
"$(INTDIR)\Prime95.pch"
!ELSEIF "$(CFG)" == "Prime95 - Win32 Debug"
DEP_CPP_TESTD=\
".\StdAfx.h"\
".\Prime95.h"\
".\TestDlg.h"\
".\EditDropFiles.h"\
".\..\cpuid.h"\
".\..\speed.h"\
".\..\gwnum.h"\
".\..\prp.h"\
".\..\prp95.h"\
"$(INTDIR)\TestDlg.obj" : $(SOURCE) $(DEP_CPP_TESTD) "$(INTDIR)"\
"$(INTDIR)\Prime95.pch"
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\Priority.cpp
!IF "$(CFG)" == "Prime95 - Win32 Release"
DEP_CPP_PRIOR=\
".\StdAfx.h"\
".\Prime95.h"\
".\Priority.h"\
"$(INTDIR)\Priority.obj" : $(SOURCE) $(DEP_CPP_PRIOR) "$(INTDIR)"\
"$(INTDIR)\Prime95.pch"
!ELSEIF "$(CFG)" == "Prime95 - Win32 Debug"
DEP_CPP_PRIOR=\
".\StdAfx.h"\
".\Prime95.h"\
".\Priority.h"\
".\EditDropFiles.h"\
".\..\cpuid.h"\
".\..\speed.h"\
".\..\gwnum.h"\
".\..\prp.h"\
".\..\prp95.h"\
"$(INTDIR)\Priority.obj" : $(SOURCE) $(DEP_CPP_PRIOR) "$(INTDIR)"\
"$(INTDIR)\Prime95.pch"
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\AffinityDlg.cpp
!IF "$(CFG)" == "Prime95 - Win32 Release"
DEP_CPP_AFFIN=\
".\StdAfx.h"\
".\Prime95.h"\
".\AffinityDlg.h"\
"$(INTDIR)\AffinityDlg.obj" : $(SOURCE) $(DEP_CPP_AFFIN) "$(INTDIR)"\
"$(INTDIR)\Prime95.pch"
!ELSEIF "$(CFG)" == "Prime95 - Win32 Debug"
DEP_CPP_AFFIN=\
".\StdAfx.h"\
".\Prime95.h"\
".\AffinityDlg.h"\
".\EditDropFiles.h"\
".\..\cpuid.h"\
".\..\speed.h"\
".\..\gwnum.h"\
".\..\prp.h"\
".\..\prp95.h"\
"$(INTDIR)\AffinityDlg.obj" : $(SOURCE) $(DEP_CPP_AFFIN) "$(INTDIR)"\
"$(INTDIR)\Prime95.pch"
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\EditDropFiles.cpp
!IF "$(CFG)" == "Prime95 - Win32 Release"
DEP_CPP_EDITD=\
".\StdAfx.h"\
".\Prime95.h"\
"$(INTDIR)\EditDropFiles.obj" : $(SOURCE) $(DEP_CPP_EDITD) "$(INTDIR)"\
"$(INTDIR)\Prime95.pch"
!ELSEIF "$(CFG)" == "Prime95 - Win32 Debug"
DEP_CPP_EDITD=\
".\StdAfx.h"\
".\Prime95.h"\
".\EditDropFiles.h"\
".\..\cpuid.h"\
".\..\speed.h"\
".\..\gwnum.h"\
".\..\prp.h"\
".\..\prp95.h"\
"$(INTDIR)\EditDropFiles.obj" : $(SOURCE) $(DEP_CPP_EDITD) "$(INTDIR)"\
"$(INTDIR)\Prime95.pch"
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\ContentsDlg.cpp
!IF "$(CFG)" == "Prime95 - Win32 Release"
DEP_CPP_CONTE=\
".\StdAfx.h"\
".\Prime95.h"\
".\ContentsDlg.h"\
"$(INTDIR)\ContentsDlg.obj" : $(SOURCE) $(DEP_CPP_CONTE) "$(INTDIR)"\
"$(INTDIR)\Prime95.pch"
!ELSEIF "$(CFG)" == "Prime95 - Win32 Debug"
DEP_CPP_CONTE=\
".\StdAfx.h"\
".\Prime95.h"\
".\ContentsDlg.h"\
".\EditDropFiles.h"\
".\..\cpuid.h"\
".\..\speed.h"\
".\..\gwnum.h"\
".\..\prp.h"\
".\..\prp95.h"\
"$(INTDIR)\ContentsDlg.obj" : $(SOURCE) $(DEP_CPP_CONTE) "$(INTDIR)"\
"$(INTDIR)\Prime95.pch"
!ENDIF
# End Source File
# End Target
# End Project
################################################################################
---
(compile)
# Standard options
copt=/Oi /Os /Ob1 /Zi /Id:\msdev\include /I..
# This line allows NMAKE to work as well
all: ntprime.exe
# Update the object files if necessary
main.obj: main.c main.h prime95.h
cl -c -Gs -Ze $(copt) -W3 main.c
service.obj: service.c service.h
cl -c -Gs -Ze $(copt) -W3 service.c
prime.obj: prime.c prime95.h ..\commonc.c ..\commonb.c
cl -c -Gs -Ze $(copt) -W3 prime.c
# Update the executable file
ntprime.exe: main.obj prime.obj service.obj
link @main.lnk
del ntprime.exe
del main.lib
del main.exp
rename main.exe ntprime.exe
|
|
|
|
|
I would like to show the scrollbar in my RichEditControl even is there is no text. I dynamically create the control, using the WS_VSCROLL flag but I still don't see the bar. Anyone?
Thanks
Ralph Krausse
|
|
|
|
|
Hi all,
Like everyone who has done any CListCtrl work, I want to make some changes (sub-item editing and the like). Easy enough to do, done it already with a CListView. To save myself from having to make the same change over and over I thought it would be nice to make a proper CListViewEx style class derived from CCtrlView. I'm sure everyone who's tried this knows the problem, silly GetListCtrl() casts a pointer to itself Anyway, I reckon I have a cunning solution (someone please stop me if this won't work!) I'm going to derive a new CListCtrl (called CListCtrlEx) add the changes to it (I've actually already done this) and it works via subclassing (i.e. create a ListCtrl with the dialog editor and select the subclass to be ListCtrlEx).
Now in order to do the cunning bit with the CCtrlView I need to register this new class with Windows, no problem, stole some code from a tutorial on this site and all works well, the class registers. However, and here's the problem (at last), if I create a custom control with the dialog editor, set the class accordingly and do all the necessary member modifications (i.e. add DDX stuff), the app. compiles fine, but nothing appears on my little test dialog, anyone know why? I've included the code below, it's so simple and I can't see why the ListCtrl won't paint, unless I can get the registered control to draw itself my cunning plan is going to fail
Here's the whole thing (bar the dialog bits):
CListCtrlEx::CListCtrlEx()
{
TRACE("CListCtrlEx() is constructing....\n");
if(RegisterWindowClass()) TRACE("CListCtrlEx() - Class registered.\n");
}
CListCtrlEx::~CListCtrlEx()
{
TRACE("CListCtrlEx() is destructing....\n");
}
bool CListCtrlEx::RegisterWindowClass()
{
WNDCLASS wndcls;
HINSTANCE hInst = AfxGetInstanceHandle();
bool status = false;
if(!(::GetClassInfo(hInst, _T("CListCtrlEx"), &wndcls)))
{
// otherwise we need to register a new class
wndcls.style = CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW;
wndcls.lpfnWndProc = ::DefWindowProc;
wndcls.cbClsExtra = wndcls.cbWndExtra = 0;
wndcls.hInstance = hInst;
wndcls.hIcon = NULL;
wndcls.hCursor = AfxGetApp()->LoadStandardCursor(IDC_ARROW);
wndcls.hbrBackground = (HBRUSH) COLOR_BTNSHADOW;
wndcls.lpszMenuName = NULL;
wndcls.lpszClassName = _T("CListCtrlEx");
if(!AfxRegisterClass(&wndcls))
{
AfxThrowResourceException();
status = false;
}
else status = true;
}
else TRACE("CListCtrlEx()::RegisterWindowClass() - Class already registered.\n");
return(status);
}
BEGIN_MESSAGE_MAP(CListCtrlEx, CListCtrl)
//{{AFX_MSG_MAP(CListCtrlEx)
ON_NOTIFY_REFLECT(NM_CLICK, OnClick)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CListCtrlEx message handlers
void CListCtrlEx::OnClick(NMHDR* pNMHDR, LRESULT* pResult)
{
NMLISTVIEW *lv = (NMLISTVIEW *)pNMHDR;
TRACE("CListCtrlEx::OnClick() - Got a click (at %02d,%02d)\n",lv->ptAction.x,lv->ptAction.y);
*pResult = 0;
}
void CListCtrlEx::PreSubclassWindow()
{
TRACE("CListCtrlEx::PreSubclassWindow() - Running....\n");
CListCtrl::PreSubclassWindow();
}
|
|
|
|
|
If CListCtrlEx is derived from CListCtrl, then you don't need to create a custom control. Just paint a normal listctrl in dialog editor, and associate CListCtrlEx with the dialog control using ClassWizard. It should be smart enough to find out your class - CListCtrlEx should appear in the dropdown list for selecting type. If it's not there, delete .clw file and try again.
If ClassWizard still doesn't work after deleting and recreating .clw file, manually add DDX_Control(pDX, IDC_YOUR_ID, m_yourList) in DoDataExchange.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|