Click here to Skip to main content
15,897,704 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Modeless Dialog to back and taskbar button Pin
Michael Dunn19-Apr-03 5:19
sitebuilderMichael Dunn19-Apr-03 5:19 
GeneralWorker-Thread in Win32 Application Pin
ZarrinPour19-Apr-03 1:16
ZarrinPour19-Apr-03 1:16 
GeneralRe: Worker-Thread in Win32 Application Pin
Bartosz Bien19-Apr-03 1:32
Bartosz Bien19-Apr-03 1:32 
GeneralRe: Worker-Thread in Win32 Application Pin
Joe Woodbury19-Apr-03 5:28
professionalJoe Woodbury19-Apr-03 5:28 
GeneralRe: Worker-Thread in Win32 Application Pin
Bartosz Bien19-Apr-03 5:36
Bartosz Bien19-Apr-03 5:36 
QuestionHow To Close All Documents in MDI Pin
Vikrant Vikrant19-Apr-03 1:14
Vikrant Vikrant19-Apr-03 1:14 
AnswerRe: How To Close All Documents in MDI Pin
Bartosz Bien19-Apr-03 1:28
Bartosz Bien19-Apr-03 1:28 
GeneralExplicit Linking problem Pin
Cyberizen19-Apr-03 1:02
Cyberizen19-Apr-03 1:02 

Hi ppl
well my problem is with explicit linking here.Actually there is this function called

"SetLayeredWindowAttributes" that i want to link explicitly following is the code:

typedef BOOL (CALLBACK*LPFNSETLAYEREDWINDOWATTRIBUTES)(COLORREF,BYTE,DWORD);

...

BOOL CMainFrame ::TranparentWindow()
{
HINSTANCE hDLL; // Handle to DLL
LPFNSETLAYEREDWINDOWATTRIBUTES lpfnSetLayeredWindowAttributes; // Function

pointer
COLORREF color = RGB(100,100,100);
BYTE alpha;
DWORD what;


hDLL = LoadLibrary(_T("USER32.DLL"));
if (hDLL != NULL)
{
lpfnSetLayeredWindowAttributes =

(LPFNSETLAYEREDWINDOWATTRIBUTES)GetProcAddress(hDLL,"SetLayeredWindowAttributes");
if (!lpfnSetLayeredWindowAttributes)
{
// handle the error
FreeLibrary(hDLL);
return FALSE;
}
else
{
// call the function
BOOL status;
status = lpfnSetLayeredWindowAttributes(color,alpha,what);
}
}
}

I am calling this function on the OnCreate message handler there are no linker

problems as well when the program is executed it gives me an error regarding ESP

tellimg me something about conflicting calling conventions anyone having any idea wats

the problem here please do tell me

Thanks in advance

Ahmed ajmal
GeneralRe: Explicit Linking problem Pin
Gary R. Wheeler19-Apr-03 3:08
Gary R. Wheeler19-Apr-03 3:08 
Generalpragma once Pin
John-theKing18-Apr-03 23:14
John-theKing18-Apr-03 23:14 
GeneralRe: pragma once Pin
Taka Muraoka18-Apr-03 23:19
Taka Muraoka18-Apr-03 23:19 
GeneralRe: pragma once Pin
peterchen19-Apr-03 0:25
peterchen19-Apr-03 0:25 
GeneralDeriving my own base dialog Pin
socceroli18-Apr-03 22:54
socceroli18-Apr-03 22:54 
GeneralRe: Deriving my own base dialog Pin
Bartosz Bien19-Apr-03 1:43
Bartosz Bien19-Apr-03 1:43 
GeneralGetDecryptionExponent in Crypto++ Pin
DREVET Olivier18-Apr-03 22:52
DREVET Olivier18-Apr-03 22:52 
GeneralRe: GetDecryptionExponent in Crypto++ Pin
Neville Franks19-Apr-03 1:33
Neville Franks19-Apr-03 1:33 
Questionwho can answer my question? Pin
liuty200618-Apr-03 22:45
liuty200618-Apr-03 22:45 
Generalproblem with a ToolBar Pin
cleathley@iinet18-Apr-03 20:21
cleathley@iinet18-Apr-03 20:21 
GeneralQuestion about friend function. Pin
George218-Apr-03 18:52
George218-Apr-03 18:52 
GeneralHomework alert!!! Pin
Taka Muraoka18-Apr-03 19:21
Taka Muraoka18-Apr-03 19:21 
GeneralRe: Homework alert!!! Pin
George218-Apr-03 19:26
George218-Apr-03 19:26 
GeneralRe: Homework alert!!! Pin
Taka Muraoka18-Apr-03 19:41
Taka Muraoka18-Apr-03 19:41 
GeneralRe: Homework alert!!! Pin
George218-Apr-03 20:29
George218-Apr-03 20:29 
GeneralRe: Homework alert!!! Pin
Taka Muraoka18-Apr-03 20:35
Taka Muraoka18-Apr-03 20:35 
GeneralRe: Homework alert!!! Pin
George218-Apr-03 20:43
George218-Apr-03 20:43 

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.