CEdit 컨트롤의 색상을 변경하기 위해서는 WM_CTLCOLOR을 이용한다.
일단 전역변수로 CBrush 와 COLORREF 변수를 선언해준다.
그리고 나서 클래스 위저드에서 다이얼로그 자체의 WM_CTLCOLOR을 생성해준다.
이 녀석은 그리기 전에 메시지를 가로채서 색상을 설정해주는 역활을 한다고 한다.
OnInitDialog() 에서 m_redcolor=RGB(255,0,0); // red m_bluecolor=RGB(0,0,255); // blue
m_textcolor=RGB(255,255,255); // white text m_redbrush.CreateSolidBrush(m_redcolor); // red background m_bluebrush.CreateSolidBrush(m_bluecolor); // blue background
이런식으로 브러시와 색상을 미리 설정해준다.
그 다음에, OnCtlColor에서 GetDlgCtrlID()에 의해 분기를 쳐주면서
원하는 컨트롤의 ID에 연결해주면 원하는 색상으로 그려진다.
위의 내용을 사용하면되며,
SetBKColor()은 배경색상(기본값은 흰색)
SetTextColor()은 글씨색상(기본값은 검은색)
을 변경해주게 된다.
브러시를 리턴함으로, 이 브러시를 이용하여 실제로 변경한 색상으로 그려주게 된다.
아래는 OnCtlColor의 기본 템플릿이다.
클래스위저드가 생성하면 // TODO 사이의 내용이 없으므로 불편하다.
HBRUSH CBarcodeDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
switch(nCtlColor)
{
case CTLCOLOR_EDIT:
case CTLCOLOR_MSGBOX:
switch (pWnd->GetDlgCtrlID())
{
default:
break;
}
break;
case CTLCOLOR_STATIC:
switch (pWnd->GetDlgCtrlID())
{
default:
break;
}
break;
default:
break;
}
// TODO: Return a different brush if the default is not desired
return hbr;
}
Microsoft Windows, Microsoft Visual C++ 6 Developer Studio:
We include makefiles that should work as project files in DevStudio 6.0 or
later.
There is a library makefile that builds the IJG library as a static
Win32 library,
and application makefiles that build the sample applications
as Win32 console applications.
(Even if you only want the library, we
recommend building the applications so that you can run the self-test.)
To use:
1. Copy
jconfig.vc to jconfig.h
makeadsw.vc6 to apps.dsw
makecdep.vc6 to cjpeg.dep
makecdsp.vc6 to cjpeg.dsp
makecmak.vc6 to cjpeg.mak
makeddep.vc6 to djpeg.dep
makeddsp.vc6 to djpeg.dsp
makedmak.vc6 to djpeg.mak
makejdep.vc6 to jpeg.dep
makejdsp.vc6 to jpeg.dsp
makejdsw.vc6 to jpeg.dsw
makejmak.vc6 to jpeg.mak
makerdep.vc6 to rdjpgcom.dep
makerdsp.vc6 to rdjpgcom.dsp
makermak.vc6 to rdjpgcom.mak
maketdep.vc6 to jpegtran.dep
maketdsp.vc6 to jpegtran.dsp
maketmak.vc6 to jpegtran.mak
makewdep.vc6 to wrjpgcom.dep
makewdsp.vc6 to wrjpgcom.dsp
makewmak.vc6 to wrjpgcom.mak (Note that the renaming is critical!)
2. Click on jpeg.dsw and apps.dswto load the project workspaces.
(If you are using DevStudio more recent than 6.0, you'll probably
get a message saying that the project files are being updated.)
3. Build the library project, then the applications project.
4. Move the application .exe files from `app`\Release to an appropriate location on your path.
5. To perform the self-test, execute the command line NMAKE /f makefile.vc test
2단계에서 dsw 파일 읽어 오는것은 실패했다.. OTL
아무튼 5단계의 nmake를 이용하면 컴파일까지 완료된다.
Microsoft Windows, Microsoft Visual C++ 2008 Developer Studio (v9):
We include makefiles that should work as project files in Visual Studio
2008 or later.
There is a library makefile that builds the IJG library
as a static Win32 library,
and application makefiles that build the sample
applications as Win32 console applications.
(Even if you only want the
library, we recommend building the applications so that you can run the
self-test.)
To use:
1. Copy
jconfig.vc to jconfig.h
makeasln.vc9 to apps.sln
makecvcp.vc9 to cjpeg.vcproj
makedvcp.vc9 to djpeg.vcproj
makejsln.vc9 to jpeg.sln
makejvcp.vc9 to jpeg.vcproj
makervcp.vc9 to rdjpgcom.vcproj
maketvcp.vc9 to jpegtran.vcproj
makewvcp.vc9 to wrjpgcom.vcproj (Note that the renaming is critical!)
2. Click on jpeg.sln and apps.sln to load the project solutions.
(If you are using Visual Studio more recent than 2008 (v9), you'll
probably get a message saying that the project files are being updated.)
3. Build the library project, then the applications project.
4. Move the application .exe files from `app`\Release to an appropriate location on your path.
5. To perform the self-test, execute the command line
NMAKE /f makefile.vc test
/A Build all evaluated targets
/B Build if time stamps are equal
/C Suppress output messages
/D Display build information
/E Override env-var macros
/HELP Display brief usage message
/I Ignore exit codes from commands
/K Build unrelated targets on error
/N Display commands but do not execute
/NOLOGO Suppress copyright message
/P Display NMAKE information
/Q Check time stamps but do not build
/R Ignore predefined rules/macros
/S Suppress executed-commands display
/T Change time stamps but do not build
/U Dump inline files
/Y Disable batch-mode
/? Display brief usage message
--args Arguments after executable-file are passed to inferior
-b BAUDRATE Set serial port baud rate used for remote debugging.
--batch Exit after processing options.
--batch-silent As for --batch, but suppress all gdb stdout output.
--return-child-result
GDB exit code will be the child's exit code.
--cd=DIR Change current directory to DIR. --command=FILE, -x Execute GDB commands from FILE. --eval-command=COMMAND, -ex
Execute a single GDB command.
May be used multiple times and in conjunction
with --command.
--core=COREFILE Analyze the core dump COREFILE.
--pid=PID Attach to running process PID.
--dbx DBX compatibility mode.
--directory=DIR Search for source files in DIR.
--epoch Output information used by epoch emacs-GDB interface.
--exec=EXECFILE Use EXECFILE as the executable.
--fullname Output information used by emacs-GDB interface.
--help Print this message.
--interpreter=INTERP
Select a specific interpreter / user interface
-l TIMEOUT Set timeout in seconds for remote debugging.
--nw Do not use a window interface.
--nx Do not read .gdbinit file.
--quiet Do not print version number on startup.
--readnow Fully read symbol files on first access.
--se=FILE Use FILE as symbol file and executable file.
--symbols=SYMFILE Read symbols from SYMFILE.
--tty=TTY Use TTY for input/output by the program being debugged.
--tui Use a terminal user interface.
--version Print version information and then exit.
-w Use a window interface.
--write Set writing into executable and core files.
--xdb XDB compatibility mode.
For more information, type "help" from within GDB, or consult the
GDB manual (available as on-line info or a printed manual).
Report bugs to "bug-gdb@gnu.org".
$ sudo apt-get install nfs
라는 말에 낚여 해보니 안되는데 -ㅁ-!! 광분을 하면서 패키지 검색을 해봤더니
$ sudo apt-cache search nfs | grep ^nfs
nfs-user-server - User space NFS server
nfsboot - Allow clients to boot over the network
nfsbooted - Prepares your image for nfs boot nfs-common - NFS support files common to client and server nfs-kernel-server - support for NFS kernel server
머.. 아무튼, nfs-common만 해도 되는지는 모르겠지만,
synaptic package manager에서는 의존성이 없는지 두개가 따로 선택이 가능했다.