|
don't know whether i am on the right track.. when you click outside a modal dialog the message it is posting will be 0x118.. with wParam 0xfff8 by handling that you can check for your mouse pointer position and check whether it is the area where the component fall in the parent. You don't have to wait for a click on the button but for the mouse click on that area you can trigger that function.. I think i am clear.
urs,
Raghavendran.V.
Raghavendran V
CDAC
|
|
|
|
|
Ragha Venkat wrote: when you click outside a modal dialog the message it is posting will be 0x118.. with wParam 0xfff8
I don't think this is quite true, the messages posted on a mouse click are dependent on where the mouse is positioned: a menu item, button, task bar etc.
This will not provide consistent or reliable results. If this click happens to be on another open window, then that window will be given the focus and receive the message. This is a very unsafe way to handle messages; if you bypass the rules prescribed by Microsoft, then you must be prepared to accept that it may not work as you wish.
|
|
|
|
|
http://lookpic.com/i/990/Q8s8GvYz.jpeg[^]
i want to do a programming using visual C++..
firstly...the key that input was S,D,F,J,K,L...how can i set the input from keyboard...
example like> if i push the input from keyboard letter SDF is for image 1, S for image 2,SDFJKL for image 3 or etc...
example>the sentences was
'saya suka makan'
s=image 1
a=image 2
y=image 3
a=image 1
s=image1
u=image 4
k=image 5
a=image 2
m=image7
a=image 2
k=image 5
a=image 2
n=image 8
display look like,
image 1,image2,image3,image1 ,image 0,image1,image 4,image5,image6,image0,image7,image2,image5,image2,image8
*image 0 for the space.
i wanted to put just 20 image on row...every time finish, i can reset the image...
|
|
|
|
|
Please do not repeat the same question - see here for guidelines on how to get an answer. If no-one answers the question it may be because there is no answer.
|
|
|
|
|
I didnt get your exact need but still i think you are looking for something mentioned
below:-
Before i answer i have small doubt regarding the type of applicaiton.
so a question.
Whether your application is SDI application with CEditView or
From assumption
If it is CEditView then override OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) function of CView by choosing WM_CHAR from classwizard.
And simply check the character with nChar value.
if it is "s" then simply load the bitmap corresponding to it, but i think CRichEdit will support Bitmap loading.
If Edit box(CEditCtrl) then
Firstly override the PreTranslateMessage of Dialog and
you can use the below code if only one edit box else
get the position to to get the exact edit box before checking for the message WM_CHAR.
BOOL CYourDlg::PreTranslateMessage(MSG* pMsg)
{
if( WM_CHAR == pMsg->message )
{
AfxMessageBox( "sa" );
}
return CDialog::PreTranslateMessage(pMsg);
}
Величие не Бога может быть недооценена.
modified on Wednesday, September 9, 2009 5:39 AM
|
|
|
|
|
Hi all
sorry but i post re-question becouse i havn't got any reply and i need help from form.I am useing ODBC 5.1 Driver for connect to MySQL.It's working fine for XP OS.I am getting error on Window Server 2000.on server 2000 OS i am able to connect but after connection i am getting error.
CString por="Driver={MySQL ODBC 5.1 Driver};";
CString Database="Database="";";
CString User="User=";
CString Userp=root;
CString password=";Password=";
CString Passwords=root;
CString option=";Option=3;";
CString final=por;
final +=Database;
final +=User;
final +=Userp;
final +=password;
final +=Passwords;
final +=option;
CoInitialize (NULL);
_bstr_t strCon(final);
try
{
HRESULT hr = m_pConn.CreateInstance (__uuidof (Connection));
if (FAILED (hr))
{
}
if (FAILED (m_pConn->Open (strCon,bstrString,bstrString1,0)))
{
AfxMessageBox ("Can't open datasource");
}
else
{
MessageBox("There is an error to connect with MySQL. Please check your input parameters or server configuration.","Message",MB_ICONEXCLAMATION);
return;
}
AfxMessageBox ("Connection successfully");
_CommandPtr pCommand;
hr = pCommand.CreateInstance (__uuidof (Command));
"Erro showing here"
if (FAILED (hr))
{
AfxMessageBox ("Can't create an instance of Command");
return;
}
::_RecordsetPtr pRecordset;
pCommand->ActiveConnection = m_pConn;
Plz helpe me.
modified on Wednesday, September 9, 2009 3:47 AM
|
|
|
|
|
Please use the code block button when posting code snippets.
Whenever a COM error happens, the HRESULT return value is quite informative, please report it.
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]
|
|
|
|
|
MsmVc wrote: on server 2000 OS i am able to connect but after connection i am getting error.
So what's the error?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
What is the error you're getting?!
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Errot is
Can't create an instance of Command
|
|
|
|
|
Hello all.
I want to kill the process using DebugActiveProcess.. I read somewhere that to kill the debugee process or target process i need to terminate the Debug object.. Can anyone clarify that? How do i do that?
Thanks.
|
|
|
|
|
I'm doing something like this.
#define DEBUG_KILL_PROCESS_ON_EXIT 0x1
#define OBJ_KERNEL_HANDLE 0x00000200L
#define OBJ_CASE_INSENSITIVE 0x00000040L
#define OBJECT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x1)
if(strcmp(Proc_Argument, "-debug") == 0)
{
OBJECT_ATTRIBUTES objAttr;
objAttr.Length = sizeof(OBJECT_ATTRIBUTES);
objAttr.RootDirectory = NULL;
objAttr.Attributes = OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE;
objAttr.ObjectName = NULL;
objAttr.SecurityDescriptor = NULL;
objAttr.SecurityQualityOfService = NULL;
HMODULE hDebugObject = NULL;
HANDLE MyDebugHandle = NULL;
HANDLE hProc = MyOpenProcess(PROCESS_SUSPEND_RESUME,FALSE, dwID);
typedef NTSTATUS (WINAPI *_NtCreateDebugObject)(OUT PHANDLE DebugHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN ULONG Flags);
_NtCreateDebugObject Debug_Object;
typedef NTSTATUS (WINAPI *_NtDebugActiveProcess)(IN HANDLE ProcessHandle,
IN HANDLE DebugHandle);
_NtDebugActiveProcess Debug_Process = NULL;
hDebugObject = GetModuleHandle("ntdll.dll");
if(hDebugObject == INVALID_HANDLE_VALUE || hDebugObject == NULL)
{
hDebugObject = LoadLibrary("ntdll.dll");
if(hDebugObject == INVALID_HANDLE_VALUE || hDebugObject == NULL)
{
MessageBox(NULL, "Cannot Load NtDll.dll", "Error", MB_OK);
}
}
Debug_Object = (_NtCreateDebugObject)GetProcAddress(hDebugObject, "NtCreateDebugObject");
Debug_Process = (_NtDebugActiveProcess)GetProcAddress(hDebugObject, "NtDebugActiveProcess");
NTSTATUS nStatus = Debug_Object(&MyDebugHandle,
OBJECT_ALL_ACCESS,
&objAttr,
DEBUG_KILL_PROCESS_ON_EXIT);
DWORD err = GetLastError();
if(nStatus != STATUS_SUCCESS)
{
MessageBox(NULL, "Fail to create object", "Error", MB_OK)
return FALSE;
}
NTSTATUS nStatusProc = Debug_Process(hWnd, MyDebugHandle);
err = GetLastError();
if(nStatusProc != STATUS_SUCCESS)
{
MessageBox(NULL, "Cannot Attach Processl", "Error", MB_OK)
return FALSE;
}
CloseHandle(MyDebugHandle);
}
Also the error after Debug_Process comes out to be 299 i.e "Only part of a ReadProcessMemory or WriteProcessMemory request was completed."...
|
|
|
|
|
Hello to everyone,
Does anyone know any document (downloadable from internet or any you can attach me in an email) wich deals with topics about libraries, headers (.h),...step by step with examples and all that....
S.O.: Windows
COMPILER: VC++ 2008
LANGUAGE: C
MAIL: programmer202@gmail.com
Thank you!
modified on Wednesday, September 9, 2009 3:27 AM
|
|
|
|
|
programmer202 wrote: LANGUAGE: C
MAIL: programmer202@gmail.com
Dear, which book are you are referencing for learning c++
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
programmer202 wrote: Does anyone know any document wich deals with topics about libraries, headers (.h), source code (.c),...step by step with examples and all that....
Yes: any good C programming language book deals with topics such basic as headers and source code.
BTW have you tried to google for [^]?
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 need exactly? are you sure you want a book that it contains source codes?
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 )
|
|
|
|
|
Hamid. wrote: What do you need exactly? are you sure you want a book that it contains source codes?
might be looking for example book
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
This might be a good place to start.
|
|
|
|
|
|
Hi All,
i am trying to send mail using mapiex.dll in outlook 2002, but its not working other than that outlook 2007 , 2003 its all working fine ...plz suggest me how to rectify this problem ...
kindly help me
thanks
~~~~~~~~~~~~~Raju~~~~~~~~~~~~~
|
|
|
|
|
rajugis wrote: mapiex.dll in outlook 2002
Is it user defined dll?? if yes you need to check code of MapiEx
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Are you getting error during linking time? If so, you may be miss symbols from your dll's. check with dependency walker for get missing symbols.
Thanks and Regards,
Selvam,
http://www.wincpp.com
|
|
|
|
|
What exactly is the problem?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi All
How do i do Unit testing for C programming in visual studio.
I have written code in c in visual studio .net and now i need to do unit testing please gimme idea....how do we test.........
Thanks,
Mohan.T
Mohan t
|
|
|
|
|
If you need to do unit testing then, you've to know how to do it. What I mean is: "testing is a difficul activity, you've to know very well theory in order to start".
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]
|
|
|
|
|