Click here to Skip to main content
15,914,222 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralSQL Commands Pin
Zero_One_ADO1-Aug-04 17:43
Zero_One_ADO1-Aug-04 17:43 
GeneralRe: SQL Commands Pin
Anonymous1-Aug-04 19:52
Anonymous1-Aug-04 19:52 
Generalfiles and folders Pin
Tyrus1821-Aug-04 17:02
Tyrus1821-Aug-04 17:02 
GeneralRe: files and folders Pin
Ravi Bhavnani1-Aug-04 17:37
professionalRavi Bhavnani1-Aug-04 17:37 
Generaloy ! Pin
bikram singh1-Aug-04 18:11
bikram singh1-Aug-04 18:11 
GeneralRe: oy ! Pin
Ravi Bhavnani2-Aug-04 2:26
professionalRavi Bhavnani2-Aug-04 2:26 
GeneralRe: oy ! Pin
bikram singh2-Aug-04 3:28
bikram singh2-Aug-04 3:28 
QuestionNeed Help!! GetDC failed when OffScreenSurface's YUV pixel format in directdraw? Pin
baboguru1-Aug-04 15:41
baboguru1-Aug-04 15:41 
thanks for your time in advance

i programming small video application
i use directdraw to render video frames directly

first i set Surface pixel format to RGB format,
GetDC(&_hdc) worked fine, so i could overlay some text on the screen
but when i changed Surface's RGB pixel format to YUV, problem came out..
video rendering works fine, but GetDC(&_hdc) function failed...

Returned error code is just 0x88760249 (Can't Create DC).
it answers me nothing except it's just failed. Confused | :confused:
<br />
..<br />
HRESULT res = _surface->GetDC (&_hdc); // it failed<br />
..<br />


what might be the cause of this error?? Confused | :confused:

here's some code snippet,,setting pixel format
<br />
...<br />
// set pixel format<br />
_srfDesc.dwFlags |= (DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT);<br />
_srfDesc.dwWidth = width;<br />
_srfDesc.dwHeight = height;	<br />
_srfDesc.ddpfPixelFormat.dwSize = sizeof(DDPIXELFORMAT);<br />
_srfDesc.ddpfPixelFormat.dwFlags = DDPF_FOURCC;<br />
_srfDesc.ddpfPixelFormat.dwFourCC = MAKEFOURCC('Y', 'V', '1','2');<br />
..<br />


thanks again and
prompt reply would be appreciated! Smile | :)
AnswerRe: Need Help!! GetDC failed when OffScreenSurface's YUV pixel format in directdraw? Pin
Ryan Binns1-Aug-04 18:31
Ryan Binns1-Aug-04 18:31 
GeneralRe: Need Help!! GetDC failed when OffScreenSurface's YUV pixel format in directdraw? Pin
baboguru1-Aug-04 22:45
baboguru1-Aug-04 22:45 
GeneralRe: Need Help!! GetDC failed when OffScreenSurface's YUV pixel format in directdraw? Pin
Ryan Binns1-Aug-04 23:07
Ryan Binns1-Aug-04 23:07 
GeneralRe: Need Help!! GetDC failed when OffScreenSurface's YUV pixel format in directdraw? Pin
baboguru2-Aug-04 1:05
baboguru2-Aug-04 1:05 
GeneralSelect Folder Dialog Pin
Archer2821-Aug-04 15:32
Archer2821-Aug-04 15:32 
GeneralRe: Select Folder Dialog Pin
Ravi Bhavnani1-Aug-04 16:11
professionalRavi Bhavnani1-Aug-04 16:11 
GeneralRe: Select Folder Dialog Pin
Michael Dunn1-Aug-04 19:26
sitebuilderMichael Dunn1-Aug-04 19:26 
Generalnumbers Pin
locoone1-Aug-04 12:59
locoone1-Aug-04 12:59 
GeneralRe: numbers Pin
Archer2821-Aug-04 13:20
Archer2821-Aug-04 13:20 
GeneralRe: numbers Pin
locoone1-Aug-04 17:50
locoone1-Aug-04 17:50 
GeneralRe: numbers Pin
Ravi Bhavnani1-Aug-04 14:19
professionalRavi Bhavnani1-Aug-04 14:19 
Generalone more file io (?) Pin
namethatnooneelsetook1-Aug-04 11:56
namethatnooneelsetook1-Aug-04 11:56 
GeneralRe: one more file io (?) Pin
Ravi Bhavnani1-Aug-04 12:10
professionalRavi Bhavnani1-Aug-04 12:10 
GeneralRe: one more file io (?) Pin
Ayman Mahmoud1-Aug-04 12:40
Ayman Mahmoud1-Aug-04 12:40 
Generalhelp with file io in mfc Pin
namethatnooneelsetook1-Aug-04 10:31
namethatnooneelsetook1-Aug-04 10:31 
GeneralRe: help with file io in mfc Pin
Ravi Bhavnani1-Aug-04 11:18
professionalRavi Bhavnani1-Aug-04 11:18 
Generaldeclaring variables without using classwizard Pin
lyn1-Aug-04 9:52
lyn1-Aug-04 9:52 

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.