|
From the MSDN:
&& (and)
&= (and_eq)
& (bitand)
| (bitor)
~ (compl)
! (not)
!= (not_eq)
|| (or)
|= (or_eq)
^ (xor)
^= (xor_eq)
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
|
how to draw bitmap using CDC
Ashish
|
|
|
|
|
You can use of this code on the paint event or earse event(I didnt test but I think it works).
#include "Atlimage.h"
CImage m;
m.Load(_T("c:\\1.jpg"));
m.BitBlt(0,0,800,600);
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
I want only CDC class to use
Ashish
|
|
|
|
|
So see Displaying Bitmap with Scrolling[^].
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Check out this article - Displaying a Bitmap from a BMP File[^]. If you don't want to display the file, then just skip that part and refer the drawing part only.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
unsigned char sBuffer[];
sBuffer[8]= 0x80 | 0
What is the value of sBuffer[8]?
Thanks
|
|
|
|
|
hung1984 wrote: unsigned char sBuffer[];
sBuffer[8]= 0x80 | 0
Array size must be specified!
hung1984 wrote: What is the value of sBuffer[8]?
You can quickly check in the debugger to find out!
|
|
|
|
|
|
|
What about documentation [^]?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
DWORD GetMessagePos(void);
This function returns a long value that gives the cursor position in screen coordinates.
How to get X and y coordinates.
|
|
|
|
|
Use GET_X_LPARAM and GET_Y_LPARAM .
const DWORD Pos = GetMessagePos();
const short XPos = GET_X_LPARAM(Pos);
const short YPos = GET_Y_LPARAM(Pos);
Another alternative is to use MAKEPOINTS structure, depends on if you want your pos wrapped in a POINT struct.
|
|
|
|
|
CPoint point = CPoint(GetMessagePos());
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Or use LOWORD and HIWORD macro instead, like this
DWORD dwPos = ::GetMessagePos ();
CPoint point (LOWORD (dwPos), HIWORD (dwPos));
|
|
|
|
|
Do not use LOWORD and HIWORD . Coordinates are signed values, LO /HIWORD treat the parameter as unsigned.
|
|
|
|
|
Hi All,
Could anyone tell me where to put the code for initialization for a new added dialog box in MFC application?
The InitInstance() is available only for the main window, inside which we can write code for initialization.But my problem is , where to write the code for a newly created dialog (if i want to do something when the dialog gets loaded)
Than u in advance
Himangshu
|
|
|
|
|
The right place is OnInitDialog [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
What do you think about Constructor or WM_INITDIALOG?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Member 4250705 wrote: But my problem is , where to write the code for a newly created dialog (if i want to do something when the dialog gets loaded)
In MFC for every dialog there must be a class that's generated by the class wizard. Also it generates a function for this class called OnInitDialog , this function is called after the dialog and it's controls are created but not bound to data exchange member variables, which will be done when we call CDialog::OnInitDialog from our OnInitDialog .
There must be a comment in your OnInitDialog function which says
// Add your initialization code here
So after this call you can add your code for intialization.
|
|
|
|
|
i have call a dialog class on button click of another dialog class, i want to close the dialog from where i have clicked the button. is there any method or function to handle this event?
|
|
|
|
|
Have a look at this nice article [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi
Can AnyBody tell me How to sort out these errors....i am using Vs2005 (VC++)
Compiling...
CommonHeader.cpp
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(382) : error C2061: syntax error : identifier '__in_z'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(383) : error C2059: syntax error : ')'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(383) : error C2143: syntax error : missing ')' before ';'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(452) : error C2061: syntax error : identifier '__in_z'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(476) : error C2061: syntax error : identifier '__in_z_opt'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(477) : error C2061: syntax error : identifier '__in_z'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(485) : error C2061: syntax error : identifier '__in_z'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(486) : error C2061: syntax error : identifier '__in_z'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(502) : error C2061: syntax error : identifier '__in_z_opt'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(504) : error C2061: syntax error : identifier '__in_z_opt'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(505) : error C2061: syntax error : identifier '__in_z'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(580) : error C2061: syntax error : identifier '__in_z'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(594) : error C2061: syntax error : identifier '__in_z'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(619) : error C2061: syntax error : identifier '__in_z'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(621) : error C2061: syntax error : identifier '__in_z'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(61) : error C2065: '__in_z' : undeclared identifier
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(61) : error C2146: syntax error : missing ')' before identifier 'LPTSTR'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(61) : error C2761: 'BOOL CHttpServerContext::GetServerVariable(void)' : member function redeclaration not allowed
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(62) : error C2059: syntax error : ')'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(63) : error C2143: syntax error : missing ';' before '{'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(63) : error C2447: '{' : missing function header (old-style formal list?)
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(120) : error C2146: syntax error : missing ')' before identifier 'LPTSTR'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(120) : error C2761: 'BOOL CHttpFilterContext::GetServerVariable(void)' : member function redeclaration not allowed
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(121) : error C2059: syntax error : ')'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(122) : error C2143: syntax error : missing ';' before '{'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(122) : error C2447: '{' : missing function header (old-style formal list?)
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(126) : error C2146: syntax error : missing ')' before identifier 'LPTSTR'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(126) : error C2761: 'BOOL CHttpFilterContext::AddResponseHeaders(void)' : member function redeclaration not allowed
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(127) : error C2059: syntax error : ')'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(128) : error C2143: syntax error : missing ';' before '{'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(128) : error C2447: '{' : missing function header (old-style formal list?)
DatabaseHandler.cpp
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(382) : error C2061: syntax error : identifier '__in_z'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(383) : error C2059: syntax error : ')'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(383) : error C2143: syntax error : missing ')' before ';'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(452) : error C2061: syntax error : identifier '__in_z'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(476) : error C2061: syntax error : identifier '__in_z_opt'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(477) : error C2061: syntax error : identifier '__in_z'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(485) : error C2061: syntax error : identifier '__in_z'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(486) : error C2061: syntax error : identifier '__in_z'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(502) : error C2061: syntax error : identifier '__in_z_opt'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(504) : error C2061: syntax error : identifier '__in_z_opt'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(505) : error C2061: syntax error : identifier '__in_z'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(580) : error C2061: syntax error : identifier '__in_z'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(594) : error C2061: syntax error : identifier '__in_z'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(619) : error C2061: syntax error : identifier '__in_z'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(621) : error C2061: syntax error : identifier '__in_z'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(61) : error C2065: '__in_z' : undeclared identifier
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(61) : error C2146: syntax error : missing ')' before identifier 'LPTSTR'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(61) : error C2761: 'BOOL CHttpServerContext::GetServerVariable(void)' : member function redeclaration not allowed
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(62) : error C2059: syntax error : ')'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(63) : error C2143: syntax error : missing ';' before '{'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(63) : error C2447: '{' : missing function header (old-style formal list?)
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(120) : error C2146: syntax error : missing ')' before identifier 'LPTSTR'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(120) : error C2761: 'BOOL CHttpFilterContext::GetServerVariable(void)' : member function redeclaration not allowed
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(121) : error C2059: syntax error : ')'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(122) : error C2143: syntax error : missing ';' before '{'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(122) : error C2447: '{' : missing function header (old-style formal list?)
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(126) : error C2146: syntax error : missing ')' before identifier 'LPTSTR'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(126) : error C2761: 'BOOL CHttpFilterContext::AddResponseHeaders(void)' : member function redeclaration not allowed
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(127) : error C2059: syntax error : ')'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(128) : error C2143: syntax error : missing ';' before '{'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(128) : error C2447: '{' : missing function header (old-style formal list?)
eScanISARegister.cpp
GENERAL.CPP
main.cpp
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(382) : error C2061: syntax error : identifier '__in_z'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(383) : error C2059: syntax error : ')'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(383) : error C2143: syntax error : missing ')' before ';'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(452) : error C2061: syntax error : identifier '__in_z'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(476) : error C2061: syntax error : identifier '__in_z_opt'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(477) : error C2061: syntax error : identifier '__in_z'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(485) : error C2061: syntax error : identifier '__in_z'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(486) : error C2061: syntax error : identifier '__in_z'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(502) : error C2061: syntax error : identifier '__in_z_opt'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(504) : error C2061: syntax error : identifier '__in_z_opt'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(505) : error C2061: syntax error : identifier '__in_z'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(580) : error C2061: syntax error : identifier '__in_z'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(594) : error C2061: syntax error : identifier '__in_z'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(619) : error C2061: syntax error : identifier '__in_z'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.h(621) : error C2061: syntax error : identifier '__in_z'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(61) : error C2065: '__in_z' : undeclared identifier
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(61) : error C2146: syntax error : missing ')' before identifier 'LPTSTR'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(61) : error C2761: 'BOOL CHttpServerContext::GetServerVariable(void)' : member function redeclaration not allowed
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(62) : error C2059: syntax error : ')'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(63) : error C2143: syntax error : missing ';' before '{'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(63) : error C2447: '{' : missing function header (old-style formal list?)
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(120) : error C2146: syntax error : missing ')' before identifier 'LPTSTR'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(120) : error C2761: 'BOOL CHttpFilterContext::GetServerVariable(void)' : member function redeclaration not allowed
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(121) : error C2059: syntax error : ')'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(122) : error C2143: syntax error : missing ';' before '{'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(122) : error C2447: '{' : missing function header (old-style formal list?)
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(126) : error C2146: syntax error : missing ')' before identifier 'LPTSTR'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(126) : error C2761: 'BOOL CHttpFilterContext::AddResponseHeaders(void)' : member function redeclaration not allowed
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(127) : error C2059: syntax error : ')'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(128) : error C2143: syntax error : missing ';' before '{'
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxisapi.inl(128) : error C2447: '{' : missing function header (old-style formal list?)
Generating Code...
Creating browse information file...
Microsoft Browse Information Maintenance Utility Version 8.00.50727
Copyright (C) Microsoft Corporation. All rights reserved.
Build log was saved at "file://e:\source\ESSource\ISA Proxy\eScanISA\eScanISAonVS2005\Debug\BuildLog.htm"
eScanISA - 93 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
|
|
|
|