C Board  

Go Back   C Board > Platform Specific Boards > Windows Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 02-01-2003, 10:09 AM   #1
i want wookie cookies
 
the Wookie's Avatar
 
Join Date: Oct 2002
Posts: 455
working with resource files

its a pain int eh butt to have to manually lay out all the components, so im playing with the resource file. i can get the dialog box to show up and have the callback funtion and everything.

except, if i have a button on the form, and its been clicked, or i want to add text to a edit box, how do i get its window handle? all i know is its id thingy, like IDC_BUTTON or whatever...ive been looking around and thought this would be the quickest way...if i find out before someone posts ill juust delete this

thanks
the Wookie is offline   Reply With Quote
Old 02-01-2003, 10:15 AM   #2
erstwhile
 
Join Date: Jan 2002
Posts: 2,223
HWND hCntrl=GetDlgItem(hDlg,IDC_CNTRL_ID);

where hDlg is the dialog box handle and IDC_CNTRL_ID is the short int id for your control.
Ken Fitlike is offline   Reply With Quote
Old 02-01-2003, 10:16 AM   #3
i want wookie cookies
 
the Wookie's Avatar
 
Join Date: Oct 2002
Posts: 455
oh gotcha, thanks
the id is always a short int?
the Wookie is offline   Reply With Quote
Old 02-01-2003, 10:22 AM   #4
erstwhile
 
Join Date: Jan 2002
Posts: 2,223
>>the id is always a short int?<<

If it's a number, yes. You can also use strings as id's but I wouldn't recommend it.
__________________
CProgramming FAQ
Caution: this person may be a carrier of the misinformation virus.
Ken Fitlike is offline   Reply With Quote
Old 02-01-2003, 10:26 AM   #5
i want wookie cookies
 
the Wookie's Avatar
 
Join Date: Oct 2002
Posts: 455
okidokey, gotcha, thanks
the Wookie is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
working with FIFO files icebabe C Programming 6 05-06-2006 11:35 AM
Linking header files, Source files and main program(Accel. C++) Daniel Primed C++ Programming 3 01-17-2006 11:46 AM
graphics....linking resource files... ssjnamek C++ Programming 4 08-18-2005 11:32 PM
Resource Files.... gcn_zelda Windows Programming 2 12-13-2003 03:02 PM
Resource Files Unregistered C Programming 4 09-10-2001 09:20 AM


All times are GMT -6. The time now is 06:52 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22