|
hello,
i have successfully created a button in a toolbar of Outlook Express.
on the click of this button i should be able to get a email address of
the sender from the selected message.
i am getting the name of the sender but not the "Email-Address".
thanks,
Nikhil
|
|
|
|
|
iam doing my project using vc++ 1.52.the objective this project is providing GUI to one devise called quick panel.in this project when i execute Qmgr.exe it is showing the fallowing error."an error has occurred in your application.if you choose ignore,you should save your work in a new file.if you choose close ,your application will terminate." please provide solution
kir_MFC
|
|
|
|
|
And is this a different issue than the one you posted just 2 minutes earlier?
"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
|
|
|
|
|
I am creating a VC++ like IDE development environment. I am confused if it is a SDI or MDI like application. I have read in 'Jeff Prosis' book that it is a 'Workspace based' model. I searched on the net for this type of model but didn't get much help.
Can you please guide me on this.
Thanks
Sandesh
kingmax_007@yahoo.com
|
|
|
|
|
kingmax_007 wrote: I am creating a VC++ like IDE development environment. I am confused if it is a SDI or MDI like application.
Those two statements would seem to be in conflict. A person that does not understand the difference between SDI and MDI cannot have enough experience to develop the project stated in the first sentence.
|
|
|
|
|
might be he just mere developer
"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
|
|
|
|
|
I have some knowledge of making SDI and MDI applications using SDK windows API's as well as MFC. The project that I am designing now is a tough job for me. The aim of the program is to debug a programming language. It will be having source code open in various windows. There will also be watch and output window like that of VC++ 6.0. My aim is to have single document and multiple views. I want to check if there is any readymade stuff to make this workspace based architecture.
kingmax_007@yahoo.com
|
|
|
|
|
MDI!
"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
|
|
|
|
|
Hi
I am working on a CPP that created services.
It complains about the last value in the SERVICE_FAILURE_ACTIONS struct.
According to the Microsoft it is defined as follows:
lpsaActions
A pointer to an array of SC_ACTION structures.
--------------------
When compiling code that calls the function that sets the failure acitons of a server I get the following output.
---------------------------------------------------------------
SC_ACTION *action_array[1];
SC_ACTION* action_str = new SC_ACTION();
action_str->Type = SC_ACTION_RESTART;
action_str->Delay =6000;
action_array[0] = action_str;
SERVICE_FAILURE_ACTIONS actions_struct;
actions_struct.dwResetPeriod = 86400;
actions_struct.lpRebootMsg = NULL;
actions_struct.lpCommand = NULL;
actions_struct.cActions = 1;
LINE(588)---> actions_struct.lpsaActions = action_array;
int result2 = ChangeServiceConfig2W(
service,
SERVICE_CONFIG_FAILURE_ACTIONS,
&actions_struct);
------------------------
OUTPUT
#
Building post_service.dll ...
#
cl.exe @C:\xxxx\nma05692.
#
WindowsService.cpp
#
c:\xxxxxxx\windowsservice.cpp(588) :
#
error C2440: '=' : cannot convert from 'struct _SC_ACTION *[1]' to 'struct _SC_A
#
TION *'
#
Types pointed to are unrelated; conversion requires reinterpret_cast, C
#
style cast or function-style cast
#
NMAKE : U1077: 'cl.exe' : return code '0x2'
#
Stop.
---------------------------------------------
Is there something obvious that I am doing wrong here? My CPP is a little rusty. Would appreciate any help I can get
|
|
|
|
|
Change the declaration of action_array from
SC_ACTION *action_array[1];
to
SC_ACTION action_array[1];
or
SC_ACTION *action_array = new SC_ACTION[1];
If you were to use the second one, you'd have to deallocate action_array at some point, with
delete [] action_array;
HTH!
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
AlainDev22 wrote: SC_ACTION *action_array[1];
SC_ACTION* action_str = new SC_ACTION();
action_str->Type = SC_ACTION_RESTART;
action_str->Delay =6000;
action_array[0] = action_str;
Change to:
SC_ACTION action_array[1];
action_array[0].Type = SC_ACTION_RESTART;
action_array[0].Delay = 6000;
"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
|
|
|
|
|
"an error has occurred in your application.if you choose ignore,you should save your work in a new file.if you choose close ,your application will terminate."please provide solution for this error.
kir_MFC
|
|
|
|
|
Please give more information on this? just by giving an error like this we will not be able to help you.
|
|
|
|
|
iam doing my project using vc++ 1.52.the objective this project is providing GUI to one devise called quick panel.in this project when i execute Qmgr.exe it is showing the fallowing error."an error has occurred in your application.if you choose ignore,you should save your work in a new file.if you choose close ,your application will terminate."
kir_MFC
|
|
|
|
|
kir_MFC wrote: ...when i execute Qmgr.exe...
Using what?
kir_MFC wrote: ...it is showing the fallowing error."an error has occurred in your application.if you choose ignore,you should save your work in a new file.if you choose close ,your application will terminate."
Have you searched?
"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
|
|
|
|
|
I'm using Visual C++ and Windows XP
I would like to continuously increment a counter when the left mouse button is down, and then display the number of counts. The basic logic I'm trying to implement is:
count = 0;
while (left_mouse_button_down) count++;
It isn't clear to me how to do something like this in the Windows environment. Any insights would be greatly appreciated.
Thanks David!
|
|
|
|
|
If you need this feature only within your application window, it's simply a matter of adding a handler for the mouse click event (WM_LBUTTONDOWN ).
If you need this on a global scale (with no regards to which application window has the focus), you need to install a mouse hook. The following resources will get you started:
SetWindowsHook() API[^]
Hooks and DLLs[^] (has a sample mouse hook implementation with source)
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
You didn't say anything about the counter "sensitivity". If you implemented something more or less similar as what you did, your counter would reach an extremely high value in a few miliseconds. What would be the point ? Furthermore it would totally depends on the speed of the computer on which your program is running. Do you need to increase your counter every second ?
Once you defined your sensitivity, you can simply create a timer that fires at your sensitivity rate. You start your timer when the button is pressed and you kill the timer (and display your counter if needed) when the mouse button is released. When the timer fires, you simply increase your counter.
EDIT: by looking at the answer of Rajesh, I'm not sure I understood your question properly. Do you want to count the number of times the user clicks the mouse or do you want to increase your counter while the mouse button is down ? I understood the second one.
|
|
|
|
|
Cedric Moonen wrote: or do you want to increase your counter while the mouse button is down ?
And if that's the case, do you want it to work with all applications or not? And... And if...
These guys keep us puzzled with the lack of information in their posts.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Rajesh R Subramanian wrote: These guys keep us puzzled with the lack of information in their posts.
Stop your whining. That was all spelled out in your contract.
"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
|
|
|
|
|
Yeah, if you want to be an MVP the least you can do is try and guess what the question might be
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
You got me there.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
To clarify things a bit. I am actually trying to use a laptop PC to compare whether the on time of an external signal varies under different conditions. We have an external setup that will turn a switch on and then off. We want to test if this external signal's on time varies very much under different condtions. We are trying to find out whether that switch is on for the same length of time each time we turn it on or not. We are looking for time resolutions in the micro-second range, or tens of micro-second range. We are trying to decide whether we can do a quick test with a PC or whether we need to build an electronic counting circuit (we could buy an electronic counter but we are trying to keep the price low for our initial testing). We are thinking about having our external device simply use the mouse input. The problem is the system time resolution. The idea with the PC is to shut off all programs except windows and our timing program. We were thinking if we simply incremented a count as fast as possible, we could detect small changes in our external signal by repeating the test and comparing the different counts during the on time. If we could detect the small changes in time (microseconds or tens of microseconds), then we would plan to repeat things with more costly test equipment. But for now we are just trying to see if there is any way we can do some programming to detect small changes in the external signal's on time.
|
|
|
|
|
Windows is no good at all at the usec or 10usec level. And the mouse logic is designed to follow a human's manipulation, which is a few Hz at most. You will need some DIY electronics or a somewhat sophisticated frequency meter.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Rajesh has replied to you how to count the number of times the left button is pressed.
If you want to increase a timer every (eg, 0.1s) but only if the button is down (ehich is how I read your post), then you need to do two things:
1: Set a timer, and handle it. See SetTimer , OnTimer / WM_TIMER for more information.
2: When you're in the timer routine, check if the button is pressed down.
It took a bit of hunting, but you can call GetASyncKeyState with a parameter of VK_LBUTTON to find out whether the button is pressed or not.
I hope one of these interpretations matches up with your needs.
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!
|
|
|
|