Click here to Skip to main content
15,879,535 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CWinApp DLL communication Pin
hxhl953-Apr-10 16:10
hxhl953-Apr-10 16:10 
QuestionIE8 and ShellExecute weirdness Pin
Monty23-Apr-10 9:41
Monty23-Apr-10 9:41 
AnswerRe: IE8 and ShellExecute weirdness Pin
LunaticFringe3-Apr-10 12:37
LunaticFringe3-Apr-10 12:37 
GeneralRe: IE8 and ShellExecute weirdness Pin
Luc Pattyn3-Apr-10 13:41
sitebuilderLuc Pattyn3-Apr-10 13:41 
GeneralRe: IE8 and ShellExecute weirdness Pin
LunaticFringe3-Apr-10 16:08
LunaticFringe3-Apr-10 16:08 
QuestionIP information class/function Pin
includeh103-Apr-10 8:25
includeh103-Apr-10 8:25 
AnswerRe: IP information class/function Pin
Moak3-Apr-10 8:38
Moak3-Apr-10 8:38 
QuestionKey press detection and while loop problem Pin
User 68017803-Apr-10 8:21
User 68017803-Apr-10 8:21 
Hi, guys,
I am using ncurses library on *nix.
I have a while loop that always keep running until a user hits a button that would exit the loop, also it accepts other buttons and in respect to their code, certain actions take place. i have several issues i'd like to fix. first of all, how can i solve this:

[code]
while(cond1)
{
halfdelay(2);
chr = getch();

switch(chr)
{
//code
}

foo(chr);
}
[/code]
if key x was pressed, something would happen, then it would do a certain action, if nothing was pressed, it would continue doing that action in respect to they previous char (in this case, char x). if key(char) x was hit again, it should ignore it (without significant pause) and continue doing foo() in respect to key x.
my problem is that pause.

problem 2: since i have that pause, if a user woudl decide to do a silly action and hold key x for long time (not a single quick key hit, but hoding it), obviously the action would be paused for that moment. how can i eliminate that problem?
any hints, please?
thanks

modified 1-Aug-19 21:02pm.

Questiona simple VC++ scrolling display Pin
Alan Kurlansky3-Apr-10 3:17
Alan Kurlansky3-Apr-10 3:17 
AnswerRe: a simple VC++ scrolling display Pin
Maximilien3-Apr-10 3:43
Maximilien3-Apr-10 3:43 
GeneralRe: a simple VC++ scrolling display Pin
Alan Kurlansky3-Apr-10 3:57
Alan Kurlansky3-Apr-10 3:57 
AnswerRe: a simple VC++ scrolling display Pin
Richard MacCutchan3-Apr-10 4:35
mveRichard MacCutchan3-Apr-10 4:35 
AnswerRe: a simple VC++ scrolling display Pin
Moak3-Apr-10 4:37
Moak3-Apr-10 4:37 
QuestionMessage Removed Pin
2-Apr-10 22:47
ozmrdn2-Apr-10 22:47 
AnswerRe: 8 puzzle game C,C++ source code Pin
Richard MacCutchan2-Apr-10 22:49
mveRichard MacCutchan2-Apr-10 22:49 
GeneralRe: 8 puzzle game C,C++ source code Pin
ozmrdn2-Apr-10 22:59
ozmrdn2-Apr-10 22:59 
GeneralRe: 8 puzzle game C,C++ source code Pin
Richard MacCutchan2-Apr-10 23:10
mveRichard MacCutchan2-Apr-10 23:10 
GeneralRe: 8 puzzle game C,C++ source code Pin
ozmrdn2-Apr-10 23:14
ozmrdn2-Apr-10 23:14 
GeneralRe: 8 puzzle game C,C++ source code Pin
Richard MacCutchan2-Apr-10 23:23
mveRichard MacCutchan2-Apr-10 23:23 
GeneralRe: 8 puzzle game C,C++ source code Pin
ozmrdn2-Apr-10 23:36
ozmrdn2-Apr-10 23:36 
GeneralRe: 8 puzzle game C,C++ source code Pin
Graham Breach3-Apr-10 3:38
Graham Breach3-Apr-10 3:38 
GeneralRe: 8 puzzle game C,C++ source code Pin
LunaticFringe3-Apr-10 0:30
LunaticFringe3-Apr-10 0:30 
GeneralRe: 8 puzzle game C,C++ source code Pin
Tim Craig3-Apr-10 8:52
Tim Craig3-Apr-10 8:52 
GeneralRe: 8 puzzle game C,C++ source code Pin
Richard MacCutchan3-Apr-10 9:46
mveRichard MacCutchan3-Apr-10 9:46 
GeneralRe: 8 puzzle game C,C++ source code Pin
LunaticFringe3-Apr-10 13:28
LunaticFringe3-Apr-10 13:28 

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.