Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - New skin problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

New skin problem

 Post Reply Post Reply
Author
Message
himanshu View Drop Down
Groupie
Groupie


Joined: 04 January 2008
Status: Offline
Points: 81
Post Options Post Options   Thanks (0) Thanks(0)   Quote himanshu Quote  Post ReplyReply Direct Link To This Post Topic: New skin problem
    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.
 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
himanshu View Drop Down
Groupie
Groupie


Joined: 04 January 2008
Status: Offline
Points: 81
Post Options Post Options   Thanks (0) Thanks(0)   Quote himanshu Quote  Post ReplyReply Direct Link To This Post Posted: 20 May 2008 at 8:22am
hi
please find the sample attached
 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
himanshu View Drop Down
Groupie
Groupie


Joined: 04 January 2008
Status: Offline
Points: 81
Post Options Post Options   Thanks (0) Thanks(0)   Quote himanshu Quote  Post ReplyReply Direct Link To This Post Posted: 21 May 2008 at 12:56am
hi
 
could you please put the code for how to achieve this.
 
thanks
himanshu
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
himanshu View Drop Down
Groupie
Groupie


Joined: 04 January 2008
Status: Offline
Points: 81
Post Options Post Options   Thanks (0) Thanks(0)   Quote himanshu Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.