CFanatic

Go Back   CFanatic > Programming > Win32 Programming

Join CFanatic Forum Now

Convert HWND to LPCTSTR WIN32 topic posted under Win32 Programming which is a part of Programming category in CFanatic Forum
Reply
 
Thread Tools Display Modes
  #11  
Old 10-05-2008, 06:48 AM
Senior Member
 
Join Date: Jul 2008
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
xpi0t0s is on a distinguished road
| More
Re: Convert HWND to LPCTSTR WIN32

I'm sure I used to use %x for this sort of stuff. Maybe compilers were less strict in those days. Anyway, the following definitely works (I tested this in a WM_CREATE block within the basic Windows C++ program generated by VS2005):
Code:
TCHAR szBuffer[256];
wsprintf(szBuffer, L"Window handle 0x%08p", hWnd);
SetWindowText(hWnd,szBuffer);
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Win32 programming book sen_kumar76 Win32 Programming 11 09-11-2011 01:26 PM
how to convert NFA to DFA in c ashokkumarrsp C Programming 3 07-31-2008 04:51 PM
convert dialog application rachel196 MFC Programming 1 06-26-2008 10:31 AM
new win32 programmer rajeshreddy Introduce yourself 1 02-20-2008 01:30 AM
Win32 resources shabbir Win32 Programming 0 09-09-2006 05:16 AM

 

Advertisement

CFanatic Search
Custom Search

Advertisement

All times are GMT -5. The time now is 03:48 PM.



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO ©2010, Crawlability, Inc.
Cfanatic.com is a premier member of the IDG TechNetwork. For advertising opportunities contact here
Get Paid for Working on Projects Matching Your Expertise at Go4Expert's Jobs Board