|
I doubt this is possible. Maybe with a global hook, you could intercept the message to fire up your message box, but I doubt you can dismiss the Messagebox called by another applicaton. Why would you like to do this ?
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
|
|
|
|
|
Glad to see you replay,i am an automation engineer ,in my work,i use siemens software "wincc",in the software ,i call system "MessageBox",only because it can return "IDYES","IDNO" ...Value,but i don't like it stytle,so i want to make another "MessageBox" to replace but he must can return some value
|
|
|
|
|
You can use global hook . Study about SetWindowsHook | SetWindowsHookEx | ... .
and my belief is that vc++ is male not female !!! )
|
|
|
|
|
See Hooks [^] if its good for you
|
|
|
|
|
Hi,
I Want to add A dialog Box In An MDI Application. So that It displays when i click on the menu item corresponding to it
please Reply all the Steps Including
1. Adding The Dialog box
2. Creating the menu Item For It.
|
|
|
|
|
(using VC6; if using VS.net 2003/2005 you will need to do a little more work since the wizard is gone )
1- go in the resource editor.
create a new dialog; add all the necessary controls.
ctrl-w to call up the wizard.
create a new class for your dialog.
still using the wizard, add variables for you different controls.
2- go in the resource editor.
select your main menu.
go to the last item in a menu.
type in a name.
right-click on your new item and select the wizard.
create an handler for the command.
... the next steps, how to show the dialog is left as an exercise to you.
|
|
|
|
|
In Solution Explorer R click n your project Add->Add class->MFC class then click open button in new window in section Base class select CDialog and in Class Name insert your class name (if you want only to insert dialog goto resource and insert Dialog)and click Finish button now you have a CDialog class
--------------
goto resource editor R click and select Add Resource select menu and click New button now you can insert your items to menu and declare event for these items r click in each item and select Add Event Handler and select COMMAND in Message type and select your class that you want insert this event to it and clickAdd and Edit------------for set menu to your dialog you need to use SetMenu(...);
|
|
|
|
|
Hi,
I am using CreateFile API for getting handle of the shared drive hardware.
HANDLE hDrive = ::CreateFile("\\\\.\\PHYSICALDRIVE0", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,OPEN_EXISTING, 0,NULL );
i want to to issue the commands to the hardware using the handle(hDrive ). But some commands works with "\\\\.\\PHYSICALDRIVE0" and some commands works if i give the "Scsi3:" parameter instead of Drive name("\\\\.\\PHYSICALDRIVE0").
I am unable to understand what is the difference between these two; calling CreateFile using Drive name and using "Scsi3:" as a parameter.
Thanks
Tushar.
|
|
|
|
|
Maybe this microsoft support link ([^]) helps you
SkyWalker
|
|
|
|
|
Hello there!
I've got a project with a folder structure similar to the following
- folderA
- subFolderA
- folderB
- subFolderB
All of the folders and sub folders have source code and header files in them. That is actually my problem.
Say, for example, I have a source file in folderB, and a header file in folderA, how do I show Visual Studio the location of the file without providing an absolute path on my computer (like c:\project\folderA\header.h)? Is there a way to provide a relative pointer to the folder?
As always, thanks for your help in advance.
Patrick
|
|
|
|
|
pgav wrote: Is there a way to provide a relative pointer to the folder?
you can use relative paths : "../folderA/subfolderB"
|
|
|
|
|
Yes, you can use "..\" to specify to look in the parent folder. Example:
In file from folderB:
#include "..\FolderA\MyFile.h"
|
|
|
|
|
Thanks a lot!
Patrick
|
|
|
|
|
You can also add the relative (or absolute) path of the other directory to the project's additional include's in your project settings.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
I am trying to derive bytes from a pass phrase. The latest MSDN doc
indicated that the PasswordDerivedBytes.GetBytes method is obsolete. This
leads me to the CryptDeriveKey method. I can get it to work just fine with the following:
algName = "TripleDES"
algHashName = "SHA1"
keySize=192
rbgIV. Length =8
[this produces byte[] length = 24 {192 bits}]
Now. I want to create a 256 bit byte[] for use with Rijndael.
Unfortunatelty, I do not know the "correct" parameter values. I thought:
algName = "RijndaelManaged"
algHashName = "SHA256"
keySize=256
rbgIV.Length = 16
I can not get it to work. I keep getting the following exception:
System.Security.Cryptography.CryptographicExceptio n was unhandled
Message="Object identifier (OID) is unknown."
Source="mscorlib"
Q1. What are the valid values for the algName ?
Q2. Can any hash be used for any algnName?
Thanks for you help.
|
|
|
|
|
Hi all,
I am currently working on Serial Interface between a control box and PC and want to send/receive double values from Pc to the box as 8 uint8 values since the box only accepts in uint8 form.
For that i thought as follows : to get that double value (64 bits) in binary form and get the last 8 bits with &(and) operator and shifting bits to right till all bits are finished,namely :
double var;
char var2send[8]; % in array
var2send[0]= var & 0x00000000000000ff % last 8 bits with & operator
var>>8; %shifting bits
var2send[1]= var & 0x00000000000000ff
var>>8;
.
. % and sending this array as output
.
But in this code, i received an error that says i cant use double with & operators so that must be converted 64 bit long form.Besides, cast function rounds my double value to the nearest integer even if i type number like 23.34353 with precision.
How can i manage to do this?? or anyone has better way or suggestion?
I hope i could clearly explain my problem.
I would be very pleased if you could help me!
Thanks a lot!
Cahit
|
|
|
|
|
This is just a guess, but can you use a union for this?
union
{
double dValue;
struct
{
uint8 uValu1;
uint8 uValu2;
uint8 uValu3;
uint8 uValu4;
uint8 uValu5;
uint8 uValu6;
uint8 uValu7;
uint8 uValu8;
}
};
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
or even
union
{
double dValue;
uint8 u8value[8];
};
In general, what makes stuff like this tricky is using it across different architectures, such as x86 and m68k, for example, where byte ordering is different.
Steve S
Developer for hire
|
|
|
|
|
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Steve S wrote: union
{
double dValue;
uint8 u8value[8];
};
I would like to suggest this:
#pragma pack(1)
union
{
double dValue;
uint8 u8value[8];
};
#pragma pack()
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
There really is no need for that. Unsigned char's will be placed on 8-bit boundaries on all common systems, and doubles will be placed on 64-bit boundaries. The union will be sized and oriented based on the largest size requirement (the double), so packing it serves no purpose.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
BYTE *pBytes = (BYTE *)&var;
send(pBytes[0]);
send(pBytes[1]);
...
send(pBytes[7]);
|
|
|
|
|
hello everyone. i am building an FTP client to upload files on to an FTP server. my ftp client can create a folder, upload files and almost does everything when connected to local server. in fact, the code works fine with the local server. but when a remote server is used, my ftp client cannot upload files on to the server. the directory listing also cant be obtained. can anyone heip??
|
|
|
|
|
Hi...
Does anyone know why FaxRegisterRoutingExtension fails on Windows XP,
while it succeeds on Windows 2000?
Thanks very much
|
|
|
|
|
See here[^] if its good for you
|
|
|
|