|
PJ Arends wrote: Any reason you did not suggest using a #pragma?
I left that for you to suggest! I suggest you suggest it to the OP
Thanks for the tip!
Mark
|
|
|
|
|
Fritzables wrote: So what does the 'L' basically do ?
You too can achieve 'legend' status by reading here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thanks Dave,
I have come across from using Borland's Delphi, so it's difficult coming to terms with some of the coding.
Fritzables.
|
|
|
|
|
|
This is a simple VC6 question:
Build > Start Debug > Attach to Process
My problem is, no process is shown on the Attach to Process dialog - I am using account with membership in both Administrator+Debugger Users. Thanks.
Norman Fung
|
|
|
|
|
|
hi for all
i need to write code in vc++,
this code uses word and pdf formats to convert word files
into pdf files.
and i need help in getting start with my job.
can any one help me to find the format of required files.
and thanks for all
with peace,live is good
|
|
|
|
|
a_yosef wrote: i need to write code in vc++,
this code uses word and pdf formats to convert word files
into pdf files.
Good luck! Even Word can't do that. PDFs are Adobe Acrobat files.
This may help get you started...
Adobe Acrobat SDK[^]
|
|
|
|
|
hello,
is it possible to create many different threads with one thread function by passing function pointer as lparam and calling it in thread?
i am trying to do something but... not successful
what i am doing wrong?
thank you for help in advance
DWORD CALLBACK mhThread(LPVOID lpParam)
{
(*lpParam)();
return 0;
}
void fff()
{
MessageBox(0,"ehlo","helo",0);
}
Screenshots::Screenshots()
{
hookHD = CreateThread(0, 0, mhThread, (*fff), 0, 0);
}
|
|
|
|
|
I think if you are going to use windows in your threads then each thread is going to have
to process window messages.
I'm not sure if I'm scared or curious to try the code you posted!
|
|
|
|
|
typedef void (*fffptr)(void);<br />
DWORD CALLBACK mhThread(LPVOID lpParam)<br />
{<br />
try{<br />
fffptr* function = static_cast<fffptr*>(lpParam);<br />
*function();<br />
}<br />
catch (std::bad_cast&)<br />
{<br />
}<br />
}
just something like that ( code might me invallid didnt test it or what... )
|
|
|
|
|
What Environment are you working in. CreateThread is essentially an SDK function. It can only be called as part of an environment you create first. The only sensible reason to call this function would be if you want to do something very smart that surpasses the capabilities of MFC, but it would require setting up accordingly. If you do not understand this requirement, the chances are that you do not need the options on offer there, and straight MFC would be your best option.
If you are working in MFC, you should rarely use 'CreateThread at all, if you do it could realy upset things, unless if you fully understand how it interracts with MFC. Instead you use:
AfxBeginThread(pFun,lpParam);
This starts a thread with pFun(lpParam);
It also has all the 'uglies' hidden inside the MFC Library.
Believe Me it is a lot easier to handle!
LateNightsInNewry
|
|
|
|
|
actually (*lpParam) is just a void pointer.. you have to define some Function Pointer to it to call it the required function!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
Here I found very simple way of doing this:
void fff()
{
MessageBox(0,"ehlo","helo",0);
}
DWORD CALLBACK mhThread(LPVOID lpParam)
{
((void(*)(void)) lpParam)();
return 0;
}
CreateThread(0, 0, mhThread, fff, 0, 0);
but... can somebody explain what does this mean: ((void(*)(void)) lpParam)(); ? it looks confusing...
and thank you again for replies
|
|
|
|
|
Simply a cast to a function pointer, the function returning no value and accepting no args. Maybe this clearify a bit the code:
typedef void (*LPFUNC)(void);
void mhThread(void * lpParam)
{
LPFUNC lpFunc = (LPFUNC) lpParam;
(*lpFunc)();
}
|
|
|
|
|
Someone in their article instructed users to "remove all post processing call to upx...". What does that mean and how do I do that?
Thanks,
BP
|
|
|
|
|
that could mean the Post-Build Step in Project Settings.
|
|
|
|
|
Thanks Chris, I'll check it out.
|
|
|
|
|
Hey all,
I have a strange question to ask. I have an app that performs some functions when a user is logged in or logged out. The functions are performed in separate threads and a dummy window is created so it can be used as the parent for windows that are popped up during this functionality.
Here is my problem: after I updated one of my machines to IE7, this functionality will only work if I am logged in and I run it manually. In debugging, the call to SetWindowPos never returned, even though the values were good. Other times, I try to circumvent the code and it fails elsewhere. I am using CreateWindow to create the dummy window and it contains a good window handle.
Any ideas what might be causing this problem? Any thoughts on what I can look at? I am completely stumped, my application doesn't even use anything from IE7 but after the install (and eventual uninstall) it still has a hangup.
|
|
|
|
|
What is IE7?
LateNightsInNewry
|
|
|
|
|
LateNightsInNewry wrote: What is IE7?
Why, it's the next step up from IE6, of course!
|
|
|
|
|
So, Let's Cut the Crapp, what's IE0, other than the step up from IE-1
LateNightsInNewry
|
|
|
|
|
LateNightsInNewry wrote: So, Let's Cut the Crapp
OK Internet Explorer Version 7
|
|
|
|
|
Wow
|
|
|
|
|