Click here to Skip to main content
15,921,840 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionChange CFrameWnd background color Pin
Tran Vu Quan16-Aug-09 18:41
Tran Vu Quan16-Aug-09 18:41 
AnswerRe: Change CFrameWnd background color Pin
«_Superman_»16-Aug-09 19:45
professional«_Superman_»16-Aug-09 19:45 
QuestionCDateTimeCtrl in MFC - How to Use? Pin
Larry Mills Sr16-Aug-09 14:59
Larry Mills Sr16-Aug-09 14:59 
AnswerRe: CDateTimeCtrl in MFC - How to Use? Pin
David Crow17-Aug-09 3:14
David Crow17-Aug-09 3:14 
GeneralRe: CDateTimeCtrl in MFC - How to Use? Pin
Larry Mills Sr17-Aug-09 4:19
Larry Mills Sr17-Aug-09 4:19 
GeneralRe: CDateTimeCtrl in MFC - How to Use? Pin
David Crow17-Aug-09 4:25
David Crow17-Aug-09 4:25 
GeneralRe: CDateTimeCtrl in MFC - How to Use? Pin
Larry Mills Sr19-Aug-09 8:07
Larry Mills Sr19-Aug-09 8:07 
QuestionRe: CDateTimeCtrl in MFC - How to Use? Pin
David Crow19-Aug-09 8:29
David Crow19-Aug-09 8:29 
AnswerRe: CDateTimeCtrl in MFC - How to Use? Pin
Larry Mills Sr19-Aug-09 10:26
Larry Mills Sr19-Aug-09 10:26 
GeneralRe: CDateTimeCtrl in MFC - How to Use? Pin
David Crow19-Aug-09 10:30
David Crow19-Aug-09 10:30 
QuestionUse a map as a source of data Pin
Waldemar Ork16-Aug-09 3:18
Waldemar Ork16-Aug-09 3:18 
AnswerRe: Use a map as a source of data Pin
«_Superman_»16-Aug-09 19:19
professional«_Superman_»16-Aug-09 19:19 
GeneralRe: Use a map as a source of data Pin
Waldemar Ork17-Aug-09 5:53
Waldemar Ork17-Aug-09 5:53 
Question╠ How get video card memory size ? ╣ Pin
bzsolt9116-Aug-09 2:21
bzsolt9116-Aug-09 2:21 
AnswerRe: ╠ How get video card memory size ? ╣ Pin
Hristo-Bojilov16-Aug-09 7:45
Hristo-Bojilov16-Aug-09 7:45 
AnswerRe: ╠ How get video card memory size ? ╣ Pin
kilt17-Aug-09 3:06
kilt17-Aug-09 3:06 
AnswerRe: ╠ How get video card memory size ? ╣ Pin
bzsolt9123-Aug-09 4:29
bzsolt9123-Aug-09 4:29 
QuestionHow to cause a CPropertySheet to show a particular page .. [SOLVED] Pin
Ahmed Charfeddine16-Aug-09 1:12
Ahmed Charfeddine16-Aug-09 1:12 
AnswerRe: How to cause a CPropertySheet to show a particular page .. Pin
David Crow16-Aug-09 11:31
David Crow16-Aug-09 11:31 
GeneralRe: How to cause a CPropertySheet to show a particular page .. Pin
Ahmed Charfeddine16-Aug-09 11:41
Ahmed Charfeddine16-Aug-09 11:41 
QuestionError 1008 while using CoCreateInstance Pin
emmmatty115-Aug-09 21:19
emmmatty115-Aug-09 21:19 
Hi,
My application i calls a dll[Dll1.dll] which installs an keyboard
hook. Whenever user presses some key the hook function will execute
from another dll[Dll2.dll]. The hook function will try to create a COM
object using CoCreateInstance.I have given CoInitialize on top. The
problem is that the CoCreateInstance fails with error 1008. Please
tell me what is happening.

The same code is running perfectly when i use it in different exe or
dll. I am using the following code

  CoInitialize(NULL);
 IShellWindows *psw;
 //AfxMessageBox(L"Reached here1");
 if (SUCCEEDED(CoCreateInstance(CLSID_ShellWindows, NULL, CLSCTX_ALL,
                                IID_IShellWindows, (void**)&psw)))

                                                                AfxMessageBox(L"Pass");
 else{

CString str;
str.Format(L"%d",GetLastError());
AfxMessageBox(str);
 } 


The value in the HRESULT is - "Failed to allocate necessary memory"

This problem only occurs within the hook function. Any other function
in the same dll i put this code it works just fine.

I am using VC++2005 as my development envoirnment.

Any security reasons??


Thanks,
J
QuestionPrint and Print Preview and relation with document view Pin
Amin.Abdi15-Aug-09 19:34
Amin.Abdi15-Aug-09 19:34 
AnswerRe: Print and Print Preview and relation with document view Pin
«_Superman_»16-Aug-09 19:06
professional«_Superman_»16-Aug-09 19:06 
QuestionMouse as an erasing tool Pin
kudlaty7915-Aug-09 10:06
kudlaty7915-Aug-09 10:06 
AnswerRe: Mouse as an erasing tool Pin
Michael Schubert15-Aug-09 13:22
Michael Schubert15-Aug-09 13:22 

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.