Click here to Skip to main content
16,010,114 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: docking dialogbars Pin
Peter Marino23-Jul-01 21:35
Peter Marino23-Jul-01 21:35 
GeneralRe: docking dialogbars Pin
Diarrhio23-Jul-01 22:18
Diarrhio23-Jul-01 22:18 
GeneralRe: docking dialogbars Pin
Diarrhio24-Jul-01 20:53
Diarrhio24-Jul-01 20:53 
GeneralRe: docking dialogbars Pin
Peter Marino25-Jul-01 8:11
Peter Marino25-Jul-01 8:11 
Questionwhich type of variable for exa nambers ??? Pin
22-Jul-01 9:29
suss22-Jul-01 9:29 
AnswerRe: which type of variable for exa nambers ??? Pin
Jim A. Johnson22-Jul-01 9:54
Jim A. Johnson22-Jul-01 9:54 
GeneralThank you very much !!! Pin
22-Jul-01 23:24
suss22-Jul-01 23:24 
GeneralPlease help blinking the scroll lock light Pin
22-Jul-01 6:01
suss22-Jul-01 6:01 
I'm desesperated. I wanna make the scroll lock light blink.
I had these functions:

BOOL GetLight()
{
	return (1&GetKeyState(VK_SCROLL)); //I tried GetAsyncKeyState and nothing
}

void SetLight(BOOL bState)
{
	if(bState)
	{		
		if(GetLight()) //Already on
			return;

		//Simulate the keystroke
		keybd_event(VK_SCROLL, 0, KEYEVENTF_EXTENDEDKEY,0);
		keybd_event(VK_SCROLL, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP,0);
		return;
	}
	if(!GetLight()) //Already off
	{
		return;
	}

	//Simulate the keystroke
	keybd_event(VK_SCROLL, 0, KEYEVENTF_EXTENDEDKEY,0);
	keybd_event(VK_SCROLL, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP,0);
	return;
}

OnTimer(UINT nIDEvent)
{
	if(nIDEvent==ID_TIMER_BLINK)
	{
		if(BLINK)
		{
			SetLight(TRUE);
			BLINK=FALSE;
		}
		else
		{
			SetLight(FALSE);
			BLINK=TRUE;
		}
	}	
}

I know the logic of the functions can be improved (ands, ors and whatever). Well, those functions work fine if you don't start threads in Windows 9x (in Windows 2000 the functions work fine with threads).
If I start threads in Windows 9x the blink period is perturbated and the GetLight function doesnt work correctly. I tried to use the AttachThreadInput function and nothing, the GetAsyncKeyState and nothing, Sleep times between keybd_event and nothing, what can i do???.
Please help me, I'm desperated.
Thanks in advance.
:confused: 

GeneralPassing lists Pin
22-Jul-01 5:41
suss22-Jul-01 5:41 
QuestionClass Design - your thoughts? Pin
22-Jul-01 5:20
suss22-Jul-01 5:20 
GeneralHBITMAP AND BITMAPINFOHEADER Pin
AJ12322-Jul-01 1:56
AJ12322-Jul-01 1:56 
GeneralRe: HBITMAP AND BITMAPINFOHEADER Pin
Chris Losinger22-Jul-01 3:51
professionalChris Losinger22-Jul-01 3:51 
QuestionWhat can DLL and LIB do? How to create DLL and LIB files and How can u use these back within a VC++ program? Pin
will22-Jul-01 1:48
will22-Jul-01 1:48 
QuestionHow to make edit box not visible Pin
nulldreamer21-Jul-01 23:52
nulldreamer21-Jul-01 23:52 
AnswerRe: How to make edit box not visible Pin
Hadi Rezaee22-Jul-01 0:07
Hadi Rezaee22-Jul-01 0:07 
GeneralRe: Humm, is this right? Pin
Masaaki Onishi22-Jul-01 4:28
Masaaki Onishi22-Jul-01 4:28 
GeneralRe: Humm, is this right? Pin
nulldreamer22-Jul-01 10:46
nulldreamer22-Jul-01 10:46 
GeneralRe: Well... Pin
Masaaki Onishi22-Jul-01 12:49
Masaaki Onishi22-Jul-01 12:49 
GeneralRe: Humm, is this right? Pin
Andrew Peace22-Jul-01 13:59
Andrew Peace22-Jul-01 13:59 
GeneralCStringArray Pin
Michael Martin21-Jul-01 21:55
professionalMichael Martin21-Jul-01 21:55 
GeneralRe: CStringArray Pin
Anders Molin22-Jul-01 3:53
professionalAnders Molin22-Jul-01 3:53 
GeneralRe: CStringArray Pin
Michael Martin22-Jul-01 4:04
professionalMichael Martin22-Jul-01 4:04 
GeneralObject Oriented DLL Problem Pin
21-Jul-01 21:35
suss21-Jul-01 21:35 
GeneralRe: Object Oriented DLL Problem Pin
21-Jul-01 21:59
suss21-Jul-01 21:59 
GeneralRe: Object Oriented DLL Problem Pin
Joaquín M López Muñoz22-Jul-01 5:39
Joaquín M López Muñoz22-Jul-01 5:39 

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.