Click here to Skip to main content
16,004,854 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to control the behaviour of a toolbar button? [modified] Pin
ovidiucucu13-Aug-06 1:54
ovidiucucu13-Aug-06 1:54 
AnswerRe: How to control the behaviour of a toolbar button? Pin
Hamid_RT14-Aug-06 7:09
Hamid_RT14-Aug-06 7:09 
QuestionHost ActiveX control and draw to memory context? Pin
Andrew Altham12-Aug-06 0:22
Andrew Altham12-Aug-06 0:22 
AnswerRe: Host ActiveX control and draw to memory context? Pin
bob1697212-Aug-06 6:45
bob1697212-Aug-06 6:45 
QuestionRe: Host ActiveX control and draw to memory context? Pin
Andrew Altham12-Aug-06 23:08
Andrew Altham12-Aug-06 23:08 
AnswerRe: Host ActiveX control and draw to memory context? Pin
bob1697213-Aug-06 11:51
bob1697213-Aug-06 11:51 
Questionhooks work only for own application Pin
_tasleem11-Aug-06 23:58
_tasleem11-Aug-06 23:58 
AnswerRe: hooks work only for own application Pin
Naveen12-Aug-06 0:43
Naveen12-Aug-06 0:43 
tasleem143 wrote:
HINSTANCE hInstance;
hInstance=AfxGetInstanceHandle();


i think the problem is with the instance u taking.

try the following way

create a global vaibale of HINSTANCE.
initialize this variable with the hinstance passed in the DllMain().
pass this hinstance in the SetWindowsHookEx()...

or if ur using MFC dll initialize the hinstance as shown below

BOOL CDllApp::InitInstance()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
hins = AfxGetInstanceHandle();
return CWinApp::InitInstance();
}

nave

GeneralRe: hooks work only for own application Pin
_tasleem12-Aug-06 2:15
_tasleem12-Aug-06 2:15 
GeneralRe: hooks work only for own application Pin
Naveen13-Aug-06 17:29
Naveen13-Aug-06 17:29 
QuestionFunction needed Pin
SandhyaSri11-Aug-06 20:22
SandhyaSri11-Aug-06 20:22 
AnswerRe: Function needed Pin
PJ Arends11-Aug-06 21:33
professionalPJ Arends11-Aug-06 21:33 
AnswerRe: Function needed Pin
Hamid_RT14-Aug-06 7:10
Hamid_RT14-Aug-06 7:10 
Questionlibrary error in program Pin
Y_Kaushik11-Aug-06 18:53
Y_Kaushik11-Aug-06 18:53 
AnswerRe: library error in program Pin
Naveen11-Aug-06 18:59
Naveen11-Aug-06 18:59 
QuestionRe: library error in program Pin
Hamid_RT11-Aug-06 22:28
Hamid_RT11-Aug-06 22:28 
QuestionDefault Protocol Handler ignored in MIME filter? Pin
kevinvh2000011-Aug-06 11:41
kevinvh2000011-Aug-06 11:41 
QuestionMFC ActiveX control tutorial Pin
BlackDice11-Aug-06 9:39
BlackDice11-Aug-06 9:39 
AnswerRe: MFC ActiveX control tutorial Pin
Reagan Conservative11-Aug-06 11:40
Reagan Conservative11-Aug-06 11:40 
GeneralRe: MFC ActiveX control tutorial Pin
BlackDice11-Aug-06 12:05
BlackDice11-Aug-06 12:05 
AnswerRe: MFC ActiveX control tutorial Pin
Hamid_RT11-Aug-06 22:26
Hamid_RT11-Aug-06 22:26 
QuestionLock a file / Directory Pin
sundar15611-Aug-06 9:38
sundar15611-Aug-06 9:38 
AnswerRe: Lock a file / Directory Pin
David Crow11-Aug-06 10:53
David Crow11-Aug-06 10:53 
GeneralRe: Lock a file / Directory [modified] Pin
sundar15611-Aug-06 11:02
sundar15611-Aug-06 11:02 
QuestionMoving AfxMessageBox() to a different location Pin
Reagan Conservative11-Aug-06 8:32
Reagan Conservative11-Aug-06 8:32 

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.