Click here to Skip to main content
15,917,538 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralWhen to draw the focus rectangle Pin
Ron Waller26-Feb-05 17:38
Ron Waller26-Feb-05 17:38 
GeneralRe: When to draw the focus rectangle Pin
Ravi Bhavnani27-Feb-05 5:55
professionalRavi Bhavnani27-Feb-05 5:55 
GeneralRe: When to draw the focus rectangle Pin
Michael Dunn27-Feb-05 7:04
sitebuilderMichael Dunn27-Feb-05 7:04 
Generalrandom number between.... Pin
Raylan26-Feb-05 16:20
Raylan26-Feb-05 16:20 
GeneralRe: random number between.... Pin
Ravi Bhavnani26-Feb-05 16:28
professionalRavi Bhavnani26-Feb-05 16:28 
GeneralRe: random number between.... Pin
Sheng Jiang 蒋晟27-Feb-05 9:39
Sheng Jiang 蒋晟27-Feb-05 9:39 
Generalcolor values for palettes Pin
nm_11426-Feb-05 14:10
nm_11426-Feb-05 14:10 
Generalint, read from text file Pin
jonavon blakly26-Feb-05 14:02
jonavon blakly26-Feb-05 14:02 
GeneralRe: int, read from text file Pin
Ravi Bhavnani26-Feb-05 14:11
professionalRavi Bhavnani26-Feb-05 14:11 
GeneralRe: int, read from text file Pin
uus9926-Feb-05 15:37
uus9926-Feb-05 15:37 
GeneralRe: int, read from text file Pin
jonavon blakly27-Feb-05 5:40
jonavon blakly27-Feb-05 5:40 
GeneralRe: int, read from text file Pin
uus9927-Feb-05 13:12
uus9927-Feb-05 13:12 
GeneralRe: int, read from text file Pin
eli1502197927-Feb-05 4:16
eli1502197927-Feb-05 4:16 
GeneralRe: int, read from text file Pin
jonavon blakly27-Feb-05 5:28
jonavon blakly27-Feb-05 5:28 
GeneralRe: int, read from text file (Try this 1) Pin
Alton Williams27-Feb-05 23:39
Alton Williams27-Feb-05 23:39 
Generalcode doesn't work when compiled in debug mode Pin
lino_i26-Feb-05 12:51
lino_i26-Feb-05 12:51 
GeneralRe: code doesn't work when compiled in debug mode Pin
Rob Manderson26-Feb-05 13:21
protectorRob Manderson26-Feb-05 13:21 
GeneralRe: code doesn't work when compiled in debug mode Pin
lino_i26-Feb-05 14:18
lino_i26-Feb-05 14:18 
GeneralRe: code doesn't work when compiled in debug mode Pin
Jibesh27-Feb-05 4:51
professionalJibesh27-Feb-05 4:51 
GeneralRe: code doesn't work when compiled in debug mode Pin
lino_i27-Feb-05 5:38
lino_i27-Feb-05 5:38 
Generalvoid* to Address Conversion Pin
Daklan26-Feb-05 12:22
Daklan26-Feb-05 12:22 
Hi, I've been creating, a semi-portable thread class.

all of it works fine, but i'm having trouble,
understanding how to pass the address of my structure,
through the void* of beginthreadex, and if then how to,
access the structure again from there.

here's a little code to help better explain my problem:


typedef struct {

char* szReference;
__w64 unsigned uHwnd;

unsigned uReferenceLength,
uIdentity,
uState;

} Thread_barrer;

void CCThread::SetFunction(unsigned(__stdcall *uFunction)(void*))
{
this->vfThreadProc = uFunction;
}

void CCThread::InitThread(Thread_barrer &tbObj)
{
tbObj.uHwnd = _beginthreadex(
0,0,vfThreadProc,(void*)&tbObj,
0,&tbObj.uIdentity);

}

but to pass the address of the context (&tbObj <above>) through void*
and access it inside:

unsigned __stdcall ThreadCentre(void *vArguments)
{
Thread_barrer tbObj;

printf("predicted address of tbObj: %d\n",vArguments);
return (1);
}

i'd assume that you could set another context to that address,
but it's not easy to find viable info , on such unique tasks.

note: this all compiles fine, I'm having trouble with using the address,
passed through __beginthreadex to access the context there of.

any tips, or ideals will help.

thank you.

A world without knowledge, is a world without life.
GeneralRe: void* to Address Conversion Pin
Michael Dunn26-Feb-05 12:37
sitebuilderMichael Dunn26-Feb-05 12:37 
GeneralRe: void* to Address Conversion Pin
Daklan26-Feb-05 12:48
Daklan26-Feb-05 12:48 
Generalc++ basic class Pin
bigbadnewill26-Feb-05 11:44
bigbadnewill26-Feb-05 11:44 
GeneralRe: c++ basic class Pin
Daklan26-Feb-05 12:34
Daklan26-Feb-05 12:34 

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.