|
Would you like to be clear.
I am a beginner.
What to do exactly
I learn my self
|
|
|
|
|
How can I make the ENTER key act like the TAB key on a dialog?
http://www.mvps.org/vcfaq/mfc/17.htm[^]
My blogs:
http://blog.joycode.com/jiangsheng
http://blog.csdn.net/jiangsheng
http://bloglines.com/public/jiangsheng
Command what is yours
Conquer what is not
---Kane
|
|
|
|
|
He wants to move from one control to another ie he wants to simulate the behavior of the Tab key.
Happy christmas friends. May the Love of My Lord and Saviour Jesus bring forth Joy and Happiness into your life too.
<marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" hspace="2" vspace="2">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
-- modified at 3:18 Friday 23rd December, 2005
|
|
|
|
|
BOOL CMsgTesterView::PreTranslateMessage(MSG* pMsg)
{
if(pMsg->message == WM_KEYDOWN)
if(pMsg->wParam == VK_RETURN)
pMsg->wParam=VK_TAB;
return CFormView::PreTranslateMessage(pMsg);
}
BOOL CMsgTesterView::PreTranslateMessage(MSG* pMsg);
I have tested it with a formview.
Happy christmas friends. May the Love of My Lord and Saviour Jesus bring forth Joy and Happiness into your life too.
<marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" hspace="2" vspace="2">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Thanks for your help.
I works very well
God bless you.
Jesus is really the LORD, I accept it in my heart
|
|
|
|
|
You said the best thing buddy.
Happy christmas friends. May the Love of My Lord and Saviour Jesus bring forth Joy and Happiness into your life too.
<marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" hspace="2" vspace="2">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
The size of a deque has changed between VS.Net 2003 and VS.Net 2005, extra member variables are added to the iterator base class in the debug build. This means you are now forced to link applications built for debug with debug versions of libraries. With VS.Net 2003 this was not the case. If you declare a deque in the debug build app and pass it to a release build library you will potentially be accessing the wrong offset in the deque.
Has anybody else encountered this problem or have a solution?
AxisFirst For Business
|
|
|
|
|
I need to set some pages to PAGE_GUARD using the function
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/memory/base/virtualprotectex.asp
BOOL VirtualProtectEx(
HANDLE hProcess,
LPVOID lpAddress,
SIZE_T dwSize,
DWORD flNewProtect,
PDWORD lpflOldProtect
);
but Im always getting an :
ERROR_INVALID_PARAMETER
87 The parameter is incorrect.
This only happens when I use PAGE_GUARD and msdn says nothing special
about this. I have seen an article in creating page guards but anything
about setting PAGE_GUARD in an existing page. so.. is this is an undocumented limitation or something?. I really need to use PAGE_GUARD because PAGE_NOACCESS or PAGE_READONLY remains after exceptions.
If is a limitation i wonder if its possible to make a driver that set the flag of a page to PAGE_GUARD.
If someone knows another approach to memory monitoring please tell me
sorry for my english
|
|
|
|
|
Just a couple tips.
I have always seen the PAGE_GUARD on something like an 8K block at exactly a 64K boundary of virtual memory.
So, your virtual alloc must occur on a 64K boundary and request an 8K memory block. Try that and then see if you can guard it.
I have not actually tried to ever guard memory, however, I am only reporting what my virtual memory spy utility has always displayed.
No shirt, no shoes, no brains, no service.
|
|
|
|
|
Solved, as in most of the cases is a misunderstanding problem
i used PAGE_GUARD as the flNewProtect parameter of VirtualProtectEx but
msdn says PAGE_GUARD is a modifier for one of the other memory protection
constants like MEMORY_EXECUTE_READWRITE. This actually works:
if(!(VirtualProtect(
meminf.BaseAddress,
meminf.RegionSize,
PAGE_EXECUTE_READWRITE|PAGE_GUARD,
&oldprotect)))
all product of lazzyness.. [zzz]
thanks 4 the help anyway. mmm im interested on that virtual memory spy utility, can you tell me the name?
|
|
|
|
|
I wrote the utiity which I have not posted to CP yet. I still need to enumerate the selected process heaps and correlate them with the virtual memory allocations. It will be called AppMemUse once it is posted here.
No shirt, no shoes, no brains, no service.
|
|
|
|
|
Hi all,
I installed the VC++ 2005 Express and started with a very simple program. It compiles but can not be executed: "MSVCP80D.dll can not be found". I re-installed the Express Edition but the problem persists.
Help me please!
Thanks a lot and wish you a Merry Christmas!
Mr. Indestructible
|
|
|
|
|
I found some links that might help you with your issue... hope this helps:
http://www.codecomments.com/archive292-2005-11-692791.html
http://blogs.msdn.com/michkap/articles/category/8354.aspx
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=142382&SiteID=1
Good luck!
|
|
|
|
|
Thanks Lenny P,
I was not able to tell you earlier that it's kind for helping me. I will go to the links that you gave me.
Happy new year!
M. Indestructible
Save the world!
|
|
|
|
|
When I define a dialog in a dll (MFC) the compiler refuses to recognise the resource ID. Do I have to use COM?
GER
Ger
|
|
|
|
|
more complicated than you may think.
If you are using a MFC extension DLL then you will need to link the resources of your DLL into the clients resource chain.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_MFCNOTES_TN033.asp[^]
If you are using a bog standard DLL you need to switch the context to that of the DLL using a call to
AFX_MANAGE_STATE(AfxGetStaticModuleState());
before constructing the dialog class. I do this by having a manager class do all the dialog construction/domodal e.t.c. from within the DLL so I can make the manage state call.
This will lead to all sorts of other issues if your dialog is modeless though.
Not the view of my employer
|
|
|
|
|
Hi All ,
i have some data(raw data) and i want to save those as xml in to hardisk , how do i do it in vc++,can any one help me sending the link or give an idea .
Regards
Farpointer
|
|
|
|
|
I suggest that you read up on MSXML. You still need to read the "raw" data yourself, though - either by reading it into a datastructure or - if its "human readable" - by parsing it into one.
MSXML provides loads of functions to read and write XML files.
There are some other XML libs out there that might be more advanced or sophisticated, but until now, I only had to read a few setting from a file that held some configuration options.
MSXML should be available on most win-boxes, though I am not sure about the relation between windows-version/SP and msxml-release.
With VC7, you could also use the tools provided by the .NET-Runtime, which handles XML pretty well, but would require the .NET Redistributable to be installed on the target system.
If you need further information on XML per se: I think a saw a free EBook on the O'Reilly-Website dealing with XML in general.
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
|
HI EveryBody,
I am facing a problem... i am not able to compile this code.. could any body suggest me work around for following code :-
#include <iostream.h>
typedef int wxCoord ;
template <class T>
class CTextDropTarget
{
private:
bool (T::*m_pt2CallbackFunc)(wxCoord x, wxCoord y);
public:
CTextDropTarget(bool (T::*pt2Func)(wxCoord x, wxCoord y));
virtual ~CTextDropTarget(void);
virtual bool OnDropText(wxCoord x, wxCoord y);
};
template <class T>
CTextDropTarget<T>::CTextDropTarget(bool ( T::*pt2Func)(wxCoord x, wxCoord y))
{
m_pt2CallbackFunc=pt2Func;
}
template <class T>
CTextDropTarget<T::~CTextDropTarget(void)
{
}
template <class T>
bool CTextDropTarget<T>::OnDropText(wxCoord x, wxCoord y)
{
return false;
}
class CSACAddressListCtrl
{
public:
CTextDropTarget<CSACAddressListCtrl> *m_pDropTarget;
static bool OnTextDropTarget(wxCoord x, wxCoord y)
{
return x+y;
}
};
void main()
{
CTextDropTarget* m_pDropTarget = new CTextDropTarget<CSACAddressListCtrl>( &CSACAddressListCtrl::OnTextDropTarget);
}
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
-- modified at 8:01 Thursday 22nd December, 2005
|
|
|
|
|
|
toxcct wrote: dear alok what does the compiler or the linker say ?
Ohh Sorry!, here is what compiler/linker says
D:\Alok\Test Project\cpp\11.cpp(70) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
D:\Alok\Test Project\cpp\11.cpp(78) : error C2664: '__thiscall
CTextDropTarget<class CSACAddressListCtrl>::CTextDropTarget<class
CSACAddressListCtrl>(bool (__thiscall CSACAddressListCtrl::*)
(int,int))' :
cannot convert parameter 1 from 'bool (__cdecl *)(int,int)' to 'bool (__thiscall CSACAddressListCtrl::*)(int,int)'
There is no context in which this conversion is possible
Error executing cl.exe.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
-- modified at 8:23 Thursday 22nd December, 2005
|
|
|
|
|
ThatsAlok wrote: D:\Alok\Test Project\cpp\11.cpp(70)
I don't see 70 lines in your code snippet.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: I don't see 70 lines in your code snippet.
Hai Sir,
while posting code.. I removed blank lines from source code.. actually problem is at this line :-
CTextDropTarget* m_pDropTarget =
new CTextDropTarget<CSACAddressListCtrl>
( &CSACAddressListCtrl::OnTextDropTarget);
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
this is a compiler error (not a linker one.
it says that it cannot convert a __cdecl function pointer to a __thiscall one...
i don't know why it does happen, but you might try to call a global function thinking it is a class member.
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VisualCalc 3.0]
|
|
|
|