|
kakan wrote: Don't expect us to mind-read!
he he he! he wanted you to be god!
"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
Support CRY- Child Relief and You
|
|
|
|
|
mrizki wrote: built lux meter base on pc and use adc 12 bit, parallel port, and vb programing. could u help me to give some code to finish this project!
how much you have coded!... do you designed something
"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
Support CRY- Child Relief and You
|
|
|
|
|
How to disbel the popup menu that was displayed when window button (start menu) is clicked (in keyboard)
|
|
|
|
|
prathuraj wrote: How to disbel the popup menu that was displayed when window button (start menu) is clicked (in keyboard)
system level hook!
"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
Support CRY- Child Relief and You
|
|
|
|
|
i have tried in the follwing way to disable left window key
if (pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_LWIN )
{
pMsg->wParam = NULL;
}
But it does not disabled the key what is a problem.
|
|
|
|
|
The code that you posted will only intercept keystrokes when your app has the input focus. When you click on the Start button, you are shifting focus away from your app, and so you will never see those keystrokes. As ThatsAlok said, you need to do this on a system-wide basis.
Best wishes,
Hans
|
|
|
|
|
Hi everybody.
I am using this cite first time, so I am not aware of the specific ways of asking any question.
My problem is that I have a file published by sharing the folder containing that file. I don't want to allow other users, who will access that file through LAN to delete and to copy. But they should be able to read the contents of that file.
I tried using the CreateFile API with no sharing mode as one of the argument but if I do so then nobody is able to open it.
Is there any way to achieve this?
Pavan Deshpande
|
|
|
|
|
Are _chmod, _wchmod helpful to you solve your problem ?
Regards,
Paresh.
|
|
|
|
|
Can you restrict their access through ACL?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I wonder whats the paradigm of learning...
Let me clear what I am saying...
What our learning process is:
1... Get a very minimal architectural view of a technology (suppose .NET)
2... Jump in and Code! Where stuck, consult documentation and then back to keyboard!
Here we slove the problems on fly. We solve and understand them as we encounter them. For instance,
I want to have a small menu to appear under a specific word. That needs to customize the rich text box. Now Whats the correct way? Complete a books or two on the topic then start working on learn as you go along?
Which one of is the approach of the professionals?
Regards.
Polite Programmer
More Object Oriented then C#
|
|
|
|
|
I sort of take the shotgun approach - that is, I take all approaches. I first read up a little, then jump in and start codeing, and then read more in depth. When you first start learning a new technology it can be daunting so it's best not to dwell. Try to be flexible - don't get hung up on something.
|
|
|
|
|
Hi all,
Im VC++ illiterate and would like to know on how to interface the serial port using VC++..
See my ultimate goal is to control the lighting of LEDs via serial port using VC++...
Thanks!
|
|
|
|
|
Hey
Use CreateFile,ReadFile,WriteFile function of
Winbase.h
You can also find help of these functions on msdn too
Regards,
Pankaj Sachdeva
|
|
|
|
|
The serial port uses +-12 Volts for signalling, and has just a few pins to use. Consider using the parallel port instead. It has 5 Volts, and has at least 10 pins you can use.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
|
|
I have a dll written in C++ running in a Linux machine. Now i want to move that dll to a Windows system and use it with a Windows application.
How can i do that?
Can you please tell what all are the performance issues i face?
What all are the dependencies?
Thanks in advance
|
|
|
|
|
Depends - does it use Linux specific APIs or is it plain standard C++ ?
I don't see why you'd expect performance issues. The dependencies depend entirely on the nature of hte code.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi,
I want to post message from my worker thread to the main frame window in a SDI application. To do so I need to pass hWnd or pMainWnd to the child thread. Because I create my thread in CDocument::OnNewDocument, I need to get handle or pointer to the main frame window from inside CDocument. Is there any way to do that ?
|
|
|
|
|
|
thanks,
i have tried AfxGetMainWnd()
it works fine in CMyDoc but when I pass the pointer to my thread and call postmessage from inside my thread, program crash. the code is like this:
CMyDOc::OnNewDocument()
{
m_pMyWnd = AfxGetMainWnd();
m_pMyWnd->PostMessage(WM_MYMSG,0,0); --> run OK
CX25Thread* m_pX25Thread;
m_pX25Thread = (CX25Thread*)AfxBeginThread(RUNTIME_CLASS (CX25Thread),THREAD_PRIORITY_NORMAL,
0, // stack size
CREATE_SUSPENDED);
m_pX25Thread->m_pMyWnd = m_pMyWnd;
m_pX25Thread->ResumeThread();
}
In Mythread:
when I call m_pMyWnd->PostMessage(WM_MYMSG,0,0); --> program crash ! i don't understand why
|
|
|
|
|
I took an old multithreaded app and gutted it to use AfxGetMainWnd() to populate a member variable in the thread and the CMainFrame is receiving the messages without any apparent problems.
The message was registered with RegisterWindowMessage().
All the thread creation code is consistent as your snippet so I'm not sure what it is you are fighting. Do you have any other details that might help us identify where our code differs?
|
|
|
|
|
I've found the problem
AfxGetMainWnd() returns 0 in CMyDoc::OnNewDocument()
AfxGetMainWnd() only return after all MainFrame, Doc, View have finished initialize.
So to get the correct pointer, I must put it earliest in the end of InitInstance and it work.
|
|
|
|
|
That would make sense. I had put my code in a button click handler for the view so I guess I didn't pay enough attention to where your code was being placed versus the code itself.
|
|
|
|
|
Try passing the HWND to the thread instead of the CWnd pointer. You can get the HWND by doing something like m_pX25Thread->m_hWnd = m_pMyWnd->m_hWnd; .
Best wishes,
Hans
|
|
|
|