|
|
|
|
![]() ![]() |
Feb 14 2006, 08:31 AM
Post
#1
|
|
|
Premium Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 165 Joined: 12-September 05 Member No.: 11,777 |
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? |
|
|
|
Oct 19 2007, 09:07 AM
Post
#2
|
|
|
Hail Caesar! ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 5,876 Joined: 21-September 07 Member No.: 50,369 |
@see: http://support.microsoft.com/kb/100770
"How to use accelerator keys and a main menu on the dialog box in Visual C++" -wiRe |
|
|
|
Aug 15 2008, 04:33 PM
Post
#3
|
|
|
Hail Caesar! ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 5,876 Joined: 21-September 07 Member No.: 50,369 |
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("%s\and", data); } else { _tprintf(TEXT("No data read from file \and")); } CloseHandle(hDriver); Getch(); return 0; } -reply by pooja |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 13th October 2008 - 05:01 PM |