Print Page | Close Window

New skin problem

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Skin Framework
Forum Description: Topics Related to Codejock Skin Framework
URL: http://forum.codejock.com/forum_posts.asp?TID=10699
Printed Date: 24 September 2024 at 8:27pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: New skin problem
Posted By: himanshu
Subject: New skin problem
Date Posted: 20 May 2008 at 7:24am
HI
 
please find the image attached
 
i am not able to apply skin for the button attached with dialog box created with CreateWindow.
 



Replies:
Posted By: Oleg
Date Posted: 20 May 2008 at 8:12am
Hi,
Think you already know that my answer will be "please attach this sample project"
:)


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: himanshu
Date Posted: 20 May 2008 at 8:22am
hi
please find the sample attached
:) https://forum.codejock.com/uploads/20080520_082214_TestMFCApp.zip - uploads/20080520_082214_TestMFCApp.zip
 


Posted By: Oleg
Date Posted: 20 May 2008 at 8:43am
Hi,
Problem in sample code.
 
You set windowproc for button and then call wndClass.lpfnWndProc.
but have to store previous windowproc and call it.
 


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: himanshu
Date Posted: 21 May 2008 at 12:56am
hi
 
could you please put the code for how to achieve this.
 
thanks
himanshu


Posted By: Oleg
Date Posted: 21 May 2008 at 2:02am
Just save pointer

ButtonOldProc = (WNDPROC)SetWindowLongPtr( hWndButton, GWLP_WNDPROC, (LONG_PTR)StaticOptMenuWndProc );

 

and use it in StaticOptMenuWndProc

static LRESULT CALLBACK StaticOptMenuWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam )

{

WNDPROC lpfnButtonProc = ButtonOldProc;

 
 
ps. You need cleanup your code. its too dirty.
 
 
for example This code

case WM_LBUTTONDOWN:

{

SendMessage( hWnd, WM_PAINT, wParam, lParam );

 

can kill OS.



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: himanshu
Date Posted: 21 May 2008 at 2:46am
thanks Oleg,
 
This is just the sample i am trying many things.that call "SendMessage" was intended over there.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net