Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Win32: Dialog Box And Accelerator, Win32 API programming
saga
post 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?
Go to the top of the page
 
+Quote Post
iGuest
post 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
Go to the top of the page
 
+Quote Post
iGuest
post 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
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. A Question About C++ Programming Under Linux(7)
  2. Functions In Win32(2)
  3. Opengl And Mfc Dialog Based Application(7)
  4. D Programming Language(9)
  5. Game Programming(17)
  6. Good Books On C++ Game Programming(2)
  7. Programming Help(7)
  8. Life In Programming?(11)
  9. Vesa Programming Viewer In C(2)
  10. Vesa Programming Viewer In D O S(3)
  11. Never Ending Books For C++ Programming(3)
  12. Where To Start Learning C++ Programming Language(4)
  13. Programming A Malloc(1)
  14. Win32 Api Problem(4)
  15. 256-color Vga Programming In C Site(0)
  1. Dos Game Programming In C For Beginners(1)
  2. Dos Programming, Undocumented Dos, And Dos Secrets(3)
  3. Detailed C Beginner Tut(2)
  4. C/c++ Programming Experince(3)
  5. Beginners Guide To C/c++ Programming?(3)
  6. C Programming: Arrays(2)
  7. How Many of You Use the C Programming language?(23)
  8. C Or C++ Easy Programming Generator(6)
  9. C Programming Video Tutorials(3)
  10. Discussion On Dynamic Programming(3)
  11. Alright, I'm Taking Computer Programming As A Class In School.(10)
  12. Why Must We Learn Object Oriented Programming(4)
  13. Finding The Rgb Color Of An Image(3)


 



- Lo-Fi Version Time is now: 13th October 2008 - 05:01 PM