ok my problem is how do i make or assign a keyboard accelerator with modal dialog boxes since the message loop is inside the function call of DailogBox() functions, unlike the modeless dialog box in which you are the one who will create the message loop for the dialog box...
is it even possible?
| |
|
Welcome to KnowledgeSutra - Dear Guest | |
Win32: Dialog Box And Accelerator
Started by saga, Feb 14 2006 08:31 AM
4 replies to this topic
#2
Posted 19 October 2007 - 09:07 AM
@see: http://support.microsoft.com/kb/100770
"How to use accelerator keys and a main menu on the dialog box in Visual C++"
-wiRe
"How to use accelerator keys and a main menu on the dialog box in Visual C++"
-wiRe
#3
Posted 15 August 2008 - 04:33 PM
how to display mbr contents in readable form to view the partition table on console in vc++
Win32: Dialog Box And Accelerator
I have written a code to read the mbr. But this displays in ascii. How to convert it into a form which is readable to locate the ext2 fs on the system...
// kk.Cpp : Defines the entry point for the console application.
//
#include "stdafx.H"
#include<windows.H>
#include<stdio.H>
#include<conio.H>
Int _tmain(int argc, _TCHAR* argv[])
{
HANDLE hDriver;
hDriver= CreateFile(TEXT(".PHYSICALDRIVE0"),GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE,0,OPEN_EXISTING,0,0);
printf("%d",hDriver);
if (hDriver == INVALID_HANDLE_VALUE) // cannot open the drive
{
printf("%d",GetLastError());
}
char data[513]={0};
DWORD dwBytesRead=0;
if( FALSE == ReadFile(hDriver, &data, 512,&dwBytesRead, NULL))
{
printf("Could not read from file (error %d)and", GetLastError());
CloseHandle(hDriver);
return 0;
}
if (dwBytesRead > 0)
{
data[dwBytesRead+1]='0'; // NULL character
_tprintf(TEXT("Text read from (%d bytes): and"), dwBytesRead);
printf("%sand", data);
}
else
{
_tprintf(TEXT("No data read from file and"));
}
CloseHandle(hDriver);
Getch();
return 0;
}
-reply by pooja
Win32: Dialog Box And Accelerator
I have written a code to read the mbr. But this displays in ascii. How to convert it into a form which is readable to locate the ext2 fs on the system...
// kk.Cpp : Defines the entry point for the console application.
//
#include "stdafx.H"
#include<windows.H>
#include<stdio.H>
#include<conio.H>
Int _tmain(int argc, _TCHAR* argv[])
{
HANDLE hDriver;
hDriver= CreateFile(TEXT(".PHYSICALDRIVE0"),GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE,0,OPEN_EXISTING,0,0);
printf("%d",hDriver);
if (hDriver == INVALID_HANDLE_VALUE) // cannot open the drive
{
printf("%d",GetLastError());
}
char data[513]={0};
DWORD dwBytesRead=0;
if( FALSE == ReadFile(hDriver, &data, 512,&dwBytesRead, NULL))
{
printf("Could not read from file (error %d)and", GetLastError());
CloseHandle(hDriver);
return 0;
}
if (dwBytesRead > 0)
{
data[dwBytesRead+1]='0'; // NULL character
_tprintf(TEXT("Text read from (%d bytes): and"), dwBytesRead);
printf("%sand", data);
}
else
{
_tprintf(TEXT("No data read from file and"));
}
CloseHandle(hDriver);
Getch();
return 0;
}
-reply by pooja
Reply to this topic

1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users














