|
Hello,
I am using Windows 2000 Professional and VC++ 6.0 (MFC).
I have created a simple dialog based application.
I want to run this application when I click "Shut Down" from start menu.
How to achieve this?
TIA,
Regards,
Jahfer V P
|
|
|
|
|
You would need a separate application running that handles the WM_QUERYENDSESSION message. When that message is received, return 0, start the "dialog based application."
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
But, would the os allow launching a process when its in the process of shutdown? I think you have to abort the shutdown first, launch your application and call ExitWindows(...) again.
____________________________________________________________
rishabhs
I think therefore I am.
|
|
|
|
|
r i s h a b h s wrote:
I think you have to abort the shutdown first, launch your application...
Which is exactly what I suggested.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
HI,
I am using ActiveX ( formula 1 Control grid .. same as Excel) , as i enter value ( 1/1/2004 etc in the cell. the ActiveX grid take it as a date and convert it in a numeric value ( i think ) , but when i get beck the Value from that cell it returns me the Interger( numeric) value.
How can i get that values back same as in 1/1/2004 format
Because i want to print it in same format.
other then this date format all integer and String values are working fine
thanks
Regards.
|
|
|
|
|
Hi,
I use a none MFC based Dialogbox, and I dont get an accelerator to run.
Here are my codesnippets:
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
MSG msg;
HACCEL hAccelTable;
// Perform application initialization:
if (!InitInstance (hInstance, nCmdShow)) return FALSE;
if((hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_STEALTHDIALOG)) == 0)
error(0, "Cant load Accelereators!");
// Main message loop:
while (GetMessage(&msg, NULL, 0, 0))
{
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)||
!IsDialogMessage(msg.hwnd,&msg) )
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
return (int) msg.wParam;
}
Now: I created a new Accelerator, with the same ID as a button, cause they should do the same.
IDC_STEALTHDIALOG ACCELERATORS MOVEABLE PURE
BEGIN
"S", BTN_CONNECT, VIRTKEY, ALT, NOINVERT
END
I see that something happens to the button, it gets the focus, and theres no peep like when I press another combination than Alt+s.
But nothing happens. No action for the button. I also changed the ID of the accelerator, and put some code to its WM message, same result.
Whats wrong?
DKT
|
|
|
|
|
Hi
I am a 13 year old newbie to C++ and I really want to learn it. I already know HTML, XHTML, CSS and the basics of PHP. I already have a set of video tutorials but I need to know some stuff about c++ first.
1) What can you do with it (e.g. create programs, create webpages, etc)?
2) What is an IDE?
3) Are there any free C++ compilers out there (like Microsoft Visual C++)?
Thanks a lot
Rob
|
|
|
|
|
Also, is there anything else I need to know before learning it?
Thanks a lot guys.
|
|
|
|
|
Rob_BCFC wrote:
1) What can you do with it (e.g. create programs, create webpages, etc)?
A better question might be "What can you not do with it?"
Rob_BCFC wrote:
2) What is an IDE?
Integrated Development Environment. It's the editor, compiler, and linker all rolled into one.
Rob_BCFC wrote:
3) Are there any free C++ compilers out there (like Microsoft Visual C++)?
Yes.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Ok thanks. So as you said, What can you not do with it?
And where can I get a free compiler?
|
|
|
|
|
Rob_BCFC wrote:
Ok thanks. So as you said, What can you not do with it?
For example it cannot cook for you, or cut the grass or...
Ok just kidding
No in fact it is used for developping applications. You can developp a large variety of aplpications from notepad to very complex programs or games... It depends a lot also of the knowledge of the programmer .
Rob_BCFC wrote:
And where can I get a free compiler?
Search on google for Dev-C++. It is a free IDE (so the graphical interface with the compiler and linker).
|
|
|
|
|
Thanks a lot mate. I really want to get into the computing industry and I think by learning C++ by the time I am 13 would be good.
|
|
|
|
|
If you learn it by yourself, I have one advice: don't try to make things that are too complicated at the begining. For example, if you want to make a very complicated programm at the begining, you will be disgusted... There are a lot of examples and tutorials on the web. But be patient, this won't come in one month of time...
|
|
|
|
|
hey,
C++ is one of the most powerful languages around in my opinion.
This means that you can do almost anything with C++, but it also means you have to be careful how to program. It's easier to mess up your code into "spaghetti" with C++ then eg. with C#.
Read up about descent O-O programming (Object Oriented). It's not that something is allowed in a language that it's ok to do it so.
For the rest good luck with your quest in learning C++, if you get stuck you can always ask here on codeproject and don't let me see your code on the daily wtf
have fun.
No hurries, no worries.
|
|
|
|
|
Rob_BCFC wrote:
What can you not do with it?
I personally do not know of anything. Some languages are better suited for certain types of problems, however.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Thanks guys. Do you think I am too young to learn it though? Will it be to tough for me?
|
|
|
|
|
it will depend on ur intrest!,since u already are into thiz programming,u did be having that programming logic,so u wouldnt find it a prob!
one adivce.....dont stop!....keep going and trying.....like they say,if therz a will, therez definitely a way!age iz never a barrier!!!!!
cheerz.....
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
Thanks. I am really ambitious and I really want to be an expert when I am older in various aspects of computing. I am learning bits of networking from my dad and I am teaching myself web programming and now I would like to learn this
|
|
|
|
|
Rob_BCFC wrote:
Do you think I am too young to learn it though? Will it be to tough for me?
You are the only one that can determine this.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
But whatever you do, don't get so frustrated that you delete->this
|
|
|
|
|
hiho@ll
i'm using the outport source to export contact and appointments
my problem is i need to know a unique ID for a contact or appointment, to know if a contact or appointment has changed
outport uses InvokeHelper(0xf051, DISPATCH_METHOD, VT_EMPTY, NULL, parms, (LPCTSTR)fullname, &type);
to tell outlook to save the contacts or appointments in seperate files
(it's the same as if you do File->Save as) in outlook
the problem is it doesn't save a ID
so anybody knows how to determine the ID for a appointment and/or contact?
thx@ll
|
|
|
|
|
Hi, I am trying to use a C-program to read a virtual com port. Attached to this com port it is a Bluetooth Adapter(D-Link DBT 120). I am sending text strings from a bluetooth-unit and over to the Bluetooth adapter. I do manage to read the text strings with HyperTerminal, but I don't manage to read the text strings with C. I am using CreateFile to open the com-port, DCB to set the preferences(BaudRate, parity etc.) and ReadFile to read the Com-port. Anyone got an ide of what I can do? Thanks in advance!
pete
|
|
|
|
|
Hye.
i write this code to get inpur from user such as ram and hard disk capacity as integer type using structures. After that i want to create a file in which i want to save that data. In the code below it is getting input from user but not creating file . Plz tell where is my mistake.
Code is:
#include <conio.h>
#include <iostream.h>
#include <fstream.h>
void main()
{
struct computerspec
{
int ram;
int hdisk;
}compuspec;
cout<<"Enter the RAM capacity"<<endl;
cin>>compuspec.ram;
cout<<endl;
cout<<"enter the="" hard="" disk="" capacity"<<endl;
cin="">>compuspec.hdisk;
cout<
|
|
|
|
|
i dont see any problem in your code.
It must be working fine and must crate the file.
Check the file
1) if you are directly running the .exe, at the location of the exe file.
2) if you are executing from the vc projecy, then the file will be created at the location of workspace and project files i.e. where .dsw/.dsp exists.
Rahim Rattani
Software Engineer,
Matrix Systems (Pvt) Ltd.,
Karachi - Pakistan
|
|
|
|
|
rose aashii wrote:
file.open("computerspec.txt");
Does this statement create the file if it does not exist?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|