i need to draw on tv screen (win32 api)....
i need to create an application where user selects (on primary display device) items to draw on tv screen (under win32).
i used EnumDisplayDevices to search for a device without DISPLAY_DEVICE_ATTACHED_TO_DESKTOP flag (this will be my tv screen). this seems working.
but i don't know how to create a dc. msdn says i should use CreateDC(device_name, NULL, NULL, devmode). how should i set devmode parameter? because it always fails
please, any suggestion or example or something... help me and i will love you forever
[edited by - miko on July 26, 2003 9:12:58 PM]
in an attempt to recieve your eternal love, i might be able
to answer your post, but as usual i have sources that might
answer it better than i could ever do, check out this website
http://www.gametutorials.com/Tutorials/Win32/Win32_Pg1.htm
im not sure whether they have what exactly your looking for
but it might be of help ;]
to answer your post, but as usual i have sources that might
answer it better than i could ever do, check out this website
http://www.gametutorials.com/Tutorials/Win32/Win32_Pg1.htm
im not sure whether they have what exactly your looking for
but it might be of help ;]
this is not what i want. i want to create DC but i don''t have a window so GetDC will not help. i''m trying to get DC of off-desktop monitor and this is a problem...
There''s some kind of function like GetDesktopHandle() which returns the hdc of the desktop. I''m not exactly sure of the name but it''s something like that. check msdn.
i think you mean hdc = GetDC(GetDesktopWindow()) but i''m NOT DRAWING TO DESKTOP but to independent tv screen.
again: only solution i see is to use CreateDC (not GetDC because i don''t have hwnd - window manager don''t know about independent displays) but lovely CreateDC always fails. GetLastError says somethink like `Invalid printer name'' (i don''t have english windows so i can only guess english message)
again: only solution i see is to use CreateDC (not GetDC because i don''t have hwnd - window manager don''t know about independent displays) but lovely CreateDC always fails. GetLastError says somethink like `Invalid printer name'' (i don''t have english windows so i can only guess english message)
Use EnumDisplayDevices() to find the correct display name for your secondary output, then put that into the CreateDC() call :
CreateDC(deviceName,deviceName,NULL,NULL);
THe error message you are receiving means that Windows thinks that you are trying to create a DC for a printer not a display device - make sure you have the correct device name from EnumDisplayDevices().
CreateDC(deviceName,deviceName,NULL,NULL);
THe error message you are receiving means that Windows thinks that you are trying to create a DC for a printer not a display device - make sure you have the correct device name from EnumDisplayDevices().
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement