Click here to Skip to main content
15,923,852 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Worker Thread problem Pin
nanukos26-Apr-04 4:30
nanukos26-Apr-04 4:30 
GeneralRe: Worker Thread problem Pin
Antony M Kancidrowski26-Apr-04 11:41
Antony M Kancidrowski26-Apr-04 11:41 
GeneralCTreeView assert when clicking in CEdit Pin
newbeetoc25-Apr-04 14:02
newbeetoc25-Apr-04 14:02 
GeneralRe: CTreeView assert when clicking in CEdit Pin
Mike Dimmick26-Apr-04 0:19
Mike Dimmick26-Apr-04 0:19 
Generalpassing parameters to main in debugger Pin
toxcct25-Apr-04 10:55
toxcct25-Apr-04 10:55 
GeneralRe: passing parameters to main in debugger Pin
f6425-Apr-04 11:22
f6425-Apr-04 11:22 
GeneralRe: passing parameters to main in debugger Pin
toxcct25-Apr-04 11:24
toxcct25-Apr-04 11:24 
GeneralCalling api functions with C++ Pin
soul.ripper25-Apr-04 10:24
soul.ripper25-Apr-04 10:24 
I now how to call api functions with visual basic
I’m new with C++ ,
I cant find out how to call this function with C++
<code>
file name : APIDeclarations.bas
' Declare API calls for System access
Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

How do I declare this function ?

</code>

This is the function, thats not the problem
<code>
Option Explicit
Public Sub WSHWait(ticks As Variant)
' For WSH: provide a Wait-Function
' ticks: delay time in milli seconds (must be > 0)
Dim ticks1
On Error GoTo Error

If Not IsNumeric(ticks) Then
MsgBox ticks & " illegal value for parameter ticks", vbOKOnly, _
"DaemonExt Error in method WSHWait"
Exit Sub
Else
If ticks < 0 Then ' catch negative values -> infinite wait
MsgBox ticks & " illegal value for parameter ticks", vbOKOnly, _
"DaemonExt Error in method WSHWait"
Exit Sub
End If
End If
ticks1 = ticks

Sleep (ticks) ' Wait x milli seconds

Exit Sub

Error: ' Error handling
MsgBox "Run-Time Error number " & Err.Number, vbOKOnly, _
"DaemonExt Error in method WSHWait"
End Sub
Sub Wait(x)
' provide a Wait-Function
Dim start, i
start = CInt(Second(Time))
i = 0
Do
i = i + 1
Loop While (CInt(Second(Time)) < start + CInt(x))
End Sub
</code>

Nice code, doesn't use any CPU time during wait

Greets Jeroen
GeneralRe: Calling api functions with C++ Pin
toxcct25-Apr-04 11:07
toxcct25-Apr-04 11:07 
GeneralRe: Calling api functions with C++ Pin
soul.ripper25-Apr-04 11:26
soul.ripper25-Apr-04 11:26 
GeneralRe: Calling api functions with C++ Pin
f6425-Apr-04 11:48
f6425-Apr-04 11:48 
GeneralRe: Calling api functions with C++ Pin
toxcct25-Apr-04 11:53
toxcct25-Apr-04 11:53 
Questionlonger paths than MAX_PATH ? Pin
name_or_alias25-Apr-04 10:13
name_or_alias25-Apr-04 10:13 
AnswerRe: longer paths than MAX_PATH ? Pin
peterchen25-Apr-04 10:19
peterchen25-Apr-04 10:19 
GeneralRe: longer paths than MAX_PATH ? Pin
name_or_alias25-Apr-04 11:04
name_or_alias25-Apr-04 11:04 
GeneralRe: longer paths than MAX_PATH ? Pin
peterchen25-Apr-04 11:11
peterchen25-Apr-04 11:11 
GeneralAccessing variable in CView anywhere in application Pin
Krugger40425-Apr-04 9:10
Krugger40425-Apr-04 9:10 
GeneralRe: Accessing variable in CView anywhere in application Pin
Ravi Bhavnani25-Apr-04 11:22
professionalRavi Bhavnani25-Apr-04 11:22 
Generalmodeless dialog Handle required Pin
Krugger40425-Apr-04 9:05
Krugger40425-Apr-04 9:05 
GeneralRe: modeless dialog Handle required Pin
Ravi Bhavnani25-Apr-04 11:26
professionalRavi Bhavnani25-Apr-04 11:26 
GeneralHWND of app Pin
Daniel132425-Apr-04 7:43
Daniel132425-Apr-04 7:43 
GeneralRe: HWND of app Pin
peterchen25-Apr-04 8:06
peterchen25-Apr-04 8:06 
GeneralRe: HWND of app Pin
Prakash Nadar25-Apr-04 16:10
Prakash Nadar25-Apr-04 16:10 
GeneralRe: HWND of app Pin
Maxwell Chen25-Apr-04 16:25
Maxwell Chen25-Apr-04 16:25 
GeneralRe: HWND of app Pin
Prakash Nadar25-Apr-04 16:34
Prakash Nadar25-Apr-04 16:34 

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.