|
HI..Dear..
You need to trap event selChanged & in that even you can get value.. e.g.: I'm traping tree in view by using following code..you can do simmilar
bye
void CLeftFirstTreeView::OnSelchanged(NMHDR* pNMHDR, LRESULT* pResult)
{
NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
CString aa;
aa.Format("%s", GetTreeCtrl( ).GetItemText(pNMTreeView->itemNew.hItem ));
MessageBox(aa);
}
Tha's it.. you can do this in tree control by traping same event...
bye again
---Sumit Kapoor---
|
|
|
|
|
COuld anyone help me , please?!
I need to create an empty MS Access file with the password.
Assume that I create MS access file like that:
BOOL bl=SQLConfigDataSource(NULL, ODBC_ADD_DSN, _T("Microsoft Access Driver (*.mdb)"),"CREATE_DB=C:\\3\\_pwd.mdb\0PWD=123\0\0");
CREATE_DB - Creates a database file.
BUT how can I set up the password in that file ( _pwd.mdb) ?? That method of using SQLConfigDataSource doesn't work!!!!!!!!!!! The file has created, but there is no a password.
PLEEEAAASE SOMEBODY HELP ME!!!!
|
|
|
|
|
Hi all.
I want to create a Device Installation application in Win98.
I have VC++ 6 and DDK98.
How can I use 16 bits function such as DiInstallDevice!
|
|
|
|
|
Results of search:
The argument to DiInstallDevice & DiInstallClass is compatible with 32-bit calling convention.
DDK98:
Extract Bin_Win98_ml.exe change name to ml.exe and copy it to VC98\BIN.
Extract Bin_Win98_ml.err change name to ml.err and copy it to VC98\BIN.
Looking at the USB examples that come with the DDK should help.
Note:
www.bluewartersystems.com has a DDK wizard that is supposed to ease the development of DDs.
MSDN:
1) Q222820 (and many other possible problems)
2) Implementing the New Win32 Driver Model for Windows 98 and Windows NT 5.0.
3) An Inside Look at Developing Applications Using the New Features of Visual C++ 6.0.
Well I hope that helps!
INTP
|
|
|
|
|
Hi!, i've created a cursor with the resource editor. i want to load it when i press a button. i've tried with this code, but it doesn't work:
HCURSOR hCursor;
hCursor = AfxGetApp()->LoadCursor(IDC_MYCURSOR);
any ideas?
thanks!
|
|
|
|
|
This code looks well and should work nicely. Check what hCursor is, if it's something non-zero or NULL.
Of course, if you want to display the cursor, you must use the SetCursor API function, see MSDN for more.
Best regards,
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
that's what i want to do.. to display it.
should i call SetCursor, or it is called automatically, like OnPaint or the like?
|
|
|
|
|
The remarks section of SetCursor in MSDN:
The cursor is set only if the new cursor is different from the previous cursor; otherwise, the function returns immediately.
The cursor is a shared resource. A window should set the cursor shape only when the cursor is in its client area or when the window is capturing mouse input. In systems without a mouse, the window should restore the previous cursor before the cursor leaves the client area or before it relinquishes control to another window.
If your application must set the cursor while it is in a window, make sure the class cursor for the specified window's class is set to NULL. If the class cursor is not NULL, the system restores the class cursor each time the mouse is moved.
The cursor is not shown on the screen if the internal cursor display count is less than zero. This occurs if the application uses the ShowCursor function to hide the cursor more times than to show the cursor.
Windows CE: Use the cursor component when targeting a platform that does not support mouse cursors. The only cursor this component supports is the wait cursor. Use the following code to set the wait cursor:
SetCursor(LoadCursor(NULL, IDC_WAIT));
Use the mcursor component when targeting a platform that does support mouse cursors. This component does not support color cursors.
Best regards,
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
I've read this kind of tutorial in msdn:
<url=http: msdn.microsoft.com="" library="" default.asp?url="/library/en-us/winui/WinUI/WindowsUserInterface/Resources/Cursors/UsingCursors.asp">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI/WindowsUserInterface/Resources/Cursors/UsingCursors.asp
I'm doing an mfc app, and that seems winampi, but i tried to implement what's there anyways.
first of all, in my dialog class i've got these member variables
HINSTANCE hinst;
HCURSOR hCursor;
In the constructor of the dialog i've got:
hCursor = LoadCursor(hinst, MAKEINTRESOURCE(IDC_LAPIZ_CUR));
then i've got this:
BOOL CVentanaPizarra::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
if (changecursor==true)
{
SetCursor(hCursor);
}
return CDialog::OnSetCursor(pWnd, nHitTest, message);
}
so, when i press a button, the changecursor variable is set to true.
But it still doesn't show the cursor when i press that button
what am i doing wrong?
|
|
|
|
|
kfaday wrote:
hCursor = LoadCursor(hinst, MAKEINTRESOURCE(IDC_LAPIZ_CUR));
Ouch. You are not initializing hinst to the application instance handle.
Rewrite to:
hCursor = LoadCursor(AfxGetResourceHandle(), MAKEINTRESOURCE(IDC_LAPIZ_CUR));
kfaday wrote:
BOOL CVentanaPizarra::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
if (changecursor==true)
{
SetCursor(hCursor);
}
return CDialog::OnSetCursor(pWnd, nHitTest, message);
}
what am i doing wrong?
You are calling the base class implementation in OnSetCursor. Rewrite to:
BOOL CVentanaPizarra::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
BOOL result = TRUE;
if (changecursor==true)
{
if( SetCursor(hCursor) )
result = TRUE;
}
else
result = CDialog::OnSetCursor(pWnd, nHitTest, message);
return result;
}
|
|
|
|
|
thank you very much for your help!!
it worked!
|
|
|
|
|
|
Hi guys,
I've written a very simple chat/message-application, when I compiled it I had no errors and even no warnings. So I thought my application is ready to execute and than the hell breaks out!
It is very frustrating , first I had 120 errors or more, than I reduced to 0 , so I thought now my application is ready to start than I got the message: Debug Assertion Failed . I could choose to break, again, or ignore.
Can anybody help me please ? I don't know what that message mean and what went wrong.
Come on guys you can do it, you helped me out once before and I'm sure you can do it again now!
(I'm sorry for my bad English, I'm from Holland and my dutch is worse )
Peace!!
|
|
|
|
|
Where does the assertion occur?
Kuphryn
|
|
|
|
|
Hi Kuphryn
The assertion failure occurs when I try to execute my application. I mean execute from Visual C++ (6.0), than I get a dialogbox with "Debug Assertion Failed"
So I hope can help me my friend
|
|
|
|
|
Try debugging your software. Look at the line of code that generated the assert. Usually they will document what the problem is or it will be obvious looking at the source.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
If you press 'Abort' (or whatever that might be in Dutch ), the debugger will stop at the ASSERT in the MFC source code. More often than not, there will be a comment giving the reason for the problem. ASSERTs are a way for the code telling that some condition is not fullfilled at this point of the execution.
BTW, a clean compile does in no way mean you have an even mildly runnable program, only that the compiler and linker successfully converted your instructions to a binary file. This has the implication that you will have to test your application after it is written, something that comes as a surprise to many developers, newbies and experiences alike
|
|
|
|
|
1) Choose to break (not abort or ignore).
2) View->Debug Window->Call Stack (or ALT+7)
3) Look at what caused the assertion.
4) Trace backward thru the callstack untill you reach the line in your code that made origanal call (checking values as you go).
Note: At this point you can place a break point at the code line in your code and stop the debugging session via the debug menu. The restart the program and single step forward if you want (some time thou it may make serveral call before one of them fails).
Good Luck!
INTP
|
|
|
|
|
|
Hi everyone...
Please i'm getting nuts with this...some activex controls when my project is compiled they don't appears on the dialog, such as Microsoft forms 2.0 (Fm20.dll) and Microsoft Datagrid 6.0 control (msdatgrd.ocx).
I think it's weird cos in another project everything is doing fine, they appears...i think the problem isn't dll's or ocx's files, is there something wrong in my project file?
Please help me with this.
thanks in advance
|
|
|
|
|
Hi,
i have the same problems.
it happens in my programms, when i have more then two windows above each other. dialog1 calls dialog2->DoModal(), dialog2 calls dialog3->DoModal(). The
ActiveX-Elements will not appear in Dialog3.
So, what I did, i put them in a dialog in a dll. then they work.
not really a help, but a information.
|
|
|
|
|
anyway you have a found a way out...i'll follow...
thanks for the hint George.
|
|
|
|
|
how do I make a chat bot with C++
|
|
|
|
|
the way you like...
be more explicit in your question please.
TOXCCT >>> GEII power
|
|
|
|
|
Using your brain!
You set the server that you will make .... that when it will receive certain messages will answer.
And this will way you will configure your virtual bot (the server) the way you want
gabby
|
|
|
|