Click here to Skip to main content
15,888,610 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: AddPrinterDriver returning ERROR_IO_PENDING, what should I do? Pin
Code-o-mat22-Jul-10 23:47
Code-o-mat22-Jul-10 23:47 
GeneralRe: AddPrinterDriver returning ERROR_IO_PENDING, what should I do? Pin
David Crow23-Jul-10 3:17
David Crow23-Jul-10 3:17 
QuestionProcessing speed becomes slow if i do not use FILE_FLAG_OVERLAPPED parameter in my CreateFile Function Pin
learningvisualc22-Jul-10 20:50
learningvisualc22-Jul-10 20:50 
AnswerRe: Processing speed becomes slow if i do not use FILE_FLAG_OVERLAPPED parameter in my CreateFile Function Pin
Code-o-mat22-Jul-10 22:45
Code-o-mat22-Jul-10 22:45 
AnswerRe: Processing speed becomes slow if i do not use FILE_FLAG_OVERLAPPED parameter in my CreateFile Function Pin
Iain Clarke, Warrior Programmer23-Jul-10 11:19
Iain Clarke, Warrior Programmer23-Jul-10 11:19 
QuestionMemory Bits To Bitfield Definition Pin
Trevor Johansen22-Jul-10 20:48
Trevor Johansen22-Jul-10 20:48 
AnswerRe: Memory Bits To Bitfield Definition Pin
Member 392263923-Jul-10 2:50
Member 392263923-Jul-10 2:50 
GeneralRe: Memory Bits To Bitfield Definition Pin
Trevor Johansen23-Jul-10 6:55
Trevor Johansen23-Jul-10 6:55 
I would still have the problem of setting separate address bits, however your example would make a good compact bitfield definition.

I am trying to take bits from separate registers and create my own 'masked register' so when I write to my register it sends each bit to its specified bits in other registers.
test.b0 = SBIT(0xE2, 0); // 0xE2: 0000000x
test.b1 = SBIT(0xE2, 4); // 0xE2: 000x0000
test.b2 = SBIT(0xE2, 7); // 0xE2: x0000000

test.b3 = SBIT(0xEF, 2); // 0xEF: 000000x0
test.b4 = SBIT(0xEF, 3); // 0xEF: 00000x00

test.b5 = SBIT(0x07, 1); // 0x07: 000000x0
test.b6 = SBIT(0x07, 5); // 0x07: 00x00000
test.b7 = SBIT(0x07, 6); // 0x07: 0x000000


Hopefully this will show more clearly what I am after:
test = 0x7A; // 0111 1010

// 0xE2 gets bits xxxxx010
 // xx0 = 0xE2 bit 0
 // x1x = 0xE2 bit 4
 // 0xx = 0xE2 bit 7
 // 0xE2 = 00010000

// 0xEF gets bits xxx11xxx
 // x1 = 0xEF bit 2
 // 1x = 0xEF bit 3
 // 0xEF = 00001100

// 0x07 gets bits 011xxxxx
 // xx1 = 0x07 bit 1
 // x1x = 0x07 bit 5
 // 0xx = 0x07 bit 6
 // 0x07 = 00100010

QuestionHow to delete a memory on Heap if it is holded by a reference Pin
pandit8422-Jul-10 20:43
pandit8422-Jul-10 20:43 
AnswerRe: How to delete a memory on Heap if it is holded by a reference Pin
Cedric Moonen22-Jul-10 20:45
Cedric Moonen22-Jul-10 20:45 
GeneralRe: How to delete a memory on Heap if it is holded by a reference Pin
Emilio Garavaglia22-Jul-10 21:28
Emilio Garavaglia22-Jul-10 21:28 
GeneralRe: How to delete a memory on Heap if it is holded by a reference Pin
pandit8422-Jul-10 21:31
pandit8422-Jul-10 21:31 
QuestionHow can show a long string in Muliline in the Static Text Control? Pin
Le@rner22-Jul-10 19:44
Le@rner22-Jul-10 19:44 
AnswerRe: How can show a long string in Muliline in the Static Text Control? Pin
Madhu Nair22-Jul-10 20:14
Madhu Nair22-Jul-10 20:14 
GeneralRe: How can show a long string in Muliline in the Static Text Control? Pin
Le@rner22-Jul-10 20:25
Le@rner22-Jul-10 20:25 
GeneralRe: How can show a long string in Muliline in the Static Text Control? Pin
Madhu Nair22-Jul-10 20:27
Madhu Nair22-Jul-10 20:27 
AnswerRe: How can show a long string in Muliline in the Static Text Control? Pin
«_Superman_»22-Jul-10 20:27
professional«_Superman_»22-Jul-10 20:27 
QuestionRe: How can show a long string in Muliline in the Static Text Control? Pin
Cool_Dev22-Jul-10 20:57
Cool_Dev22-Jul-10 20:57 
AnswerRe: How can show a long string in Muliline in the Static Text Control? Pin
«_Superman_»22-Jul-10 21:18
professional«_Superman_»22-Jul-10 21:18 
GeneralRe: How can show a long string in Muliline in the Static Text Control? Pin
Cool_Dev22-Jul-10 22:33
Cool_Dev22-Jul-10 22:33 
QuestionCDateTimeCtrl Pin
john563222-Jul-10 16:56
john563222-Jul-10 16:56 
QuestionReading id3 frame header from mp3 file Pin
Danzy8322-Jul-10 7:56
Danzy8322-Jul-10 7:56 
AnswerRe: Reading id3 frame header from mp3 file Pin
Maximilien22-Jul-10 10:04
Maximilien22-Jul-10 10:04 
AnswerRe: Reading id3 frame header from mp3 file Pin
Cool_Dev22-Jul-10 18:02
Cool_Dev22-Jul-10 18:02 
GeneralRe: Reading id3 frame header from mp3 file Pin
Danzy8322-Jul-10 23:57
Danzy8322-Jul-10 23:57 

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.