Click here to Skip to main content
15,887,746 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: MFC help : code error 0000007B Pin
jawadali47714-May-12 23:42
jawadali47714-May-12 23:42 
GeneralRe: MFC help : code error 0000007B Pin
CPallini14-May-12 23:52
mveCPallini14-May-12 23:52 
GeneralRe: MFC help : code error 0000007B Pin
jawadali47716-May-12 19:14
jawadali47716-May-12 19:14 
GeneralRe: MFC help : code error 0000007B Pin
TinyDevices15-May-12 3:32
professionalTinyDevices15-May-12 3:32 
AnswerRe: MFC help : code error 0000007B Pin
Andy41114-May-12 22:49
Andy41114-May-12 22:49 
GeneralRe: MFC help : code error 0000007B Pin
CPallini14-May-12 23:09
mveCPallini14-May-12 23:09 
GeneralRe: MFC help : code error 0000007B Pin
Andy41114-May-12 23:18
Andy41114-May-12 23:18 
GeneralRe: MFC help : code error 0000007B Pin
jawadali47714-May-12 23:46
jawadali47714-May-12 23:46 
yes COM3 is available and i have tried \\.COM3 and \\\\.\\COM3 both. basically i'm developing GUI via MFC in vs2008 for my console program. part of the code for opening serial port in console program is given below. i can't understand how to do it in MFC.

C#
COMportName[0] = ' ';
     while (COMportName[0] == ' ') {
         printf("\nEnter the %s port number the PTU is attached to: ", COMportPrefix);
         scanf("%d", &COMportNum);
         printf("You selected %s%d. Is this OK? (enter 'y' or 'n'): ", COMportPrefix, COMportNum);
         tmpChar = 'f';
         while ( (tmpChar != 'y') && (tmpChar != 'n') )
               tmpChar = ((char) tolower(getchar()));
         if ( tmpChar == 'y' )
            sprintf(COMportName, "%s%d", COMportPrefix, COMportNum);
     }
     tmpChar = 'f';
     while (tmpChar != 'y') {
         printf("\nEnter the baud rate the ptu is communicate at (default: 9600): ");
         scanf("%d", &BaudRate);
         printf("You selected %d. Is this OK? (enter 'y' or 'n'): ", BaudRate);
         tmpChar = 'f';
         while ( (tmpChar != 'y') && (tmpChar != 'n') )
               tmpChar = ((char) tolower(getchar()));
     }


     /* initialize the serial port */
     set_baud_rate(BaudRate);
     COMstream = open_host_port(COMportName);

     if ( COMstream == PORT_NOT_OPENED )
         { printf("\nSerial Port setup error.\n");
           goto abnormal_exit;  }
     printf("\nSerial port %s initialized\n", COMportName);

GeneralRe: MFC help : code error 0000007B Pin
Andy41114-May-12 23:59
Andy41114-May-12 23:59 
GeneralRe: MFC help : code error 0000007B Pin
David Crow15-May-12 3:52
David Crow15-May-12 3:52 
SuggestionRe: MFC help : code error 0000007B Pin
David Crow15-May-12 3:58
David Crow15-May-12 3:58 
AnswerRe: MFC help : code error 0000007B Pin
soaringpilot15-May-12 10:44
soaringpilot15-May-12 10:44 
GeneralRe: MFC help : code error 0000007B Pin
jawadali47716-May-12 19:19
jawadali47716-May-12 19:19 
GeneralRe: MFC help : code error 0000007B Pin
soaringpilot17-May-12 6:19
soaringpilot17-May-12 6:19 
QuestionResponding To Asynchronous Functions Pin
AmbiguousName14-May-12 20:38
AmbiguousName14-May-12 20:38 
AnswerRe: Responding To Asynchronous Functions Pin
CPallini14-May-12 22:08
mveCPallini14-May-12 22:08 
AnswerRe: Responding To Asynchronous Functions Pin
TinyDevices15-May-12 3:31
professionalTinyDevices15-May-12 3:31 
AnswerRe: Responding To Asynchronous Functions Pin
soaringpilot15-May-12 10:51
soaringpilot15-May-12 10:51 
AnswerRe: Responding To Asynchronous Functions Pin
TomasRiker217-May-12 8:12
TomasRiker217-May-12 8:12 
QuestionHow do I check or change text in a VS2008 menu bar menu item Pin
soaringpilot14-May-12 12:22
soaringpilot14-May-12 12:22 
AnswerRe: How do I check or change text in a VS2008 menu bar menu item Pin
«_Superman_»14-May-12 16:32
professional«_Superman_»14-May-12 16:32 
GeneralRe: How do I check or change text in a VS2008 menu bar menu item Pin
soaringpilot15-May-12 10:21
soaringpilot15-May-12 10:21 
Questionc++ win32, What's the best way to handle large fonts 120 dpi Pin
jkirkerx14-May-12 8:33
professionaljkirkerx14-May-12 8:33 
AnswerRe: c++ win32, What's the best way to handle large fonts 120 dpi Pin
enhzflep14-May-12 11:06
enhzflep14-May-12 11:06 
GeneralRe: c++ win32, What's the best way to handle large fonts 120 dpi Pin
jkirkerx14-May-12 11:38
professionaljkirkerx14-May-12 11:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.