Click here to Skip to main content
15,914,447 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: FLOAT/STRING conversions Pin
jhwurmbach14-Oct-02 1:35
jhwurmbach14-Oct-02 1:35 
GeneralQuestion about how to get the Control's ID in a message handler Pin
Matias13-Oct-02 7:37
Matias13-Oct-02 7:37 
GeneralRe: Question about how to get the Control's ID in a message handler Pin
Joaquín M López Muñoz13-Oct-02 8:32
Joaquín M López Muñoz13-Oct-02 8:32 
GeneralRe: Question about how to get the Control's ID in a message handler Pin
Matias13-Oct-02 11:06
Matias13-Oct-02 11:06 
GeneralGet the Class Name Pin
Gaurika Wijeratne13-Oct-02 7:21
Gaurika Wijeratne13-Oct-02 7:21 
GeneralRe: Get the Class Name Pin
pankajdaga13-Oct-02 10:12
pankajdaga13-Oct-02 10:12 
GeneralRe: Get the Class Name Pin
alex.barylski13-Oct-02 16:30
alex.barylski13-Oct-02 16:30 
GeneralRe: Get the Class Name Pin
alex.barylski13-Oct-02 16:57
alex.barylski13-Oct-02 16:57 
I don't know exactly and i'm to lazy to make a Q and D app to test yer code, but i'll offer my suggestion.

LRESULT CALLBACK FindToolbarProc(int nCode, WPARAM wParam, LPARAM lParam)
{
	// watch window creation:
	if (nCode == HCBT_CREATEWND)
	{
		CBT_CREATEWND* pcw = (CBT_CREATEWND*)lParam;
		ASSERT(pcw); // Ensure valid pointer

		// Beep when notepad is started
		if(strcmp(pcw->lpcs->lpszClass, "Notepad") == 0) 
			Beep(1000,100); // Just to Identify..
	}
	
	return CallNextHookEx(g_hkCBT, nCode, wParam, lParam);
}


Are you sure that pointer is valid...?

Also I dunno if this has anything to do with it...but...perhaps ReadProcessMemory() should be used...? I'm thinking because a windows window class is probably stored locally to the process that created it so trying to read it using c-style pointers might cause memory read errors...??? I have no idea other than that...

Cheers! Smile | :)

"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
GeneralThreads problem ... Pin
BlackKettle13-Oct-02 5:16
BlackKettle13-Oct-02 5:16 
GeneralRe: Threads problem ... Pin
Stephane Rodriguez.13-Oct-02 5:36
Stephane Rodriguez.13-Oct-02 5:36 
GeneralRe: Threads problem ... Pin
BlackKettle13-Oct-02 6:43
BlackKettle13-Oct-02 6:43 
GeneralRe: Threads problem ... Pin
Al Giv.13-Oct-02 7:08
sussAl Giv.13-Oct-02 7:08 
GeneralShare variable into DLL Pin
Raphael Kindt13-Oct-02 5:06
Raphael Kindt13-Oct-02 5:06 
GeneralRe: Share variable into DLL Pin
Stephane Rodriguez.13-Oct-02 5:40
Stephane Rodriguez.13-Oct-02 5:40 
GeneralRe: Share variable into DLL Pin
Joaquín M López Muñoz13-Oct-02 8:48
Joaquín M López Muñoz13-Oct-02 8:48 
GeneralDumb question... Copying derived class from base class pointer Pin
work_to_live13-Oct-02 3:44
work_to_live13-Oct-02 3:44 
GeneralRe: Dumb question... Copying derived class from base class pointer Pin
Nish Nishant13-Oct-02 4:18
sitebuilderNish Nishant13-Oct-02 4:18 
GeneralRe: Dumb question... Copying derived class from base class pointer Pin
Nish Nishant13-Oct-02 4:23
sitebuilderNish Nishant13-Oct-02 4:23 
GeneralRe: Dumb question... Copying derived class from base class pointer Pin
Joaquín M López Muñoz13-Oct-02 4:29
Joaquín M López Muñoz13-Oct-02 4:29 
GeneralMySQL Inserting data Pin
Anonymous13-Oct-02 3:20
Anonymous13-Oct-02 3:20 
GeneralRe: MySQL Inserting data Pin
Nish Nishant13-Oct-02 3:31
sitebuilderNish Nishant13-Oct-02 3:31 
GeneralRe: MySQL Inserting data Pin
Anonymous13-Oct-02 10:45
Anonymous13-Oct-02 10:45 
GeneralGetting DNS Server IP Pin
Al Giv.13-Oct-02 0:19
sussAl Giv.13-Oct-02 0:19 
GeneralRe: Getting DNS Server IP Pin
Anders Molin13-Oct-02 0:29
professionalAnders Molin13-Oct-02 0:29 
GeneralQuery about how to pass a control's Identification through its Message parameters Pin
12-Oct-02 22:17
suss12-Oct-02 22:17 

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.