Click here to Skip to main content
15,915,093 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Possible to make structures with arrays dynamic? Pin
Waldermort20-Aug-06 3:10
Waldermort20-Aug-06 3:10 
AnswerRe: Possible to make structures with arrays dynamic? Pin
Hamid_RT22-Aug-06 7:25
Hamid_RT22-Aug-06 7:25 
Questionbuilt-in variables for VC? Pin
George_George19-Aug-06 23:35
George_George19-Aug-06 23:35 
AnswerRe: built-in variables for VC? Pin
Mike Dimmick20-Aug-06 5:53
Mike Dimmick20-Aug-06 5:53 
GeneralRe: built-in variables for VC? Pin
George_George20-Aug-06 17:37
George_George20-Aug-06 17:37 
QuestionComparing strings to a table of values Pin
Rigsby6619-Aug-06 23:07
Rigsby6619-Aug-06 23:07 
Questionhow to get the execution path of dll Pin
mt_samiei19-Aug-06 22:28
mt_samiei19-Aug-06 22:28 
AnswerRe: how to get the execution path of dll Pin
Mike Dimmick20-Aug-06 6:07
Mike Dimmick20-Aug-06 6:07 
Interesting, I'd not come across that before.

The best way to get the full path to the executable running in the process is to use GetModuleFileName. Pass NULL for hModule to get the executable's path, or the hInstance value passed to your DLL's DllMain to get that DLL's path.

Looking at the C run-time source code (in STDARGV.C), I see that _pgmptr is actually initialised from the result of GetModuleFileName. This code is called from mainCRTStartup and the corresponding routines for Unicode and Windows GUI EXEs, but isn't called for a DLL (it wouldn't make sense).

Stability. What an interesting concept. -- Chris Maunder

GeneralRe: how to get the execution path of dll Pin
mt_samiei22-Aug-06 19:27
mt_samiei22-Aug-06 19:27 
QuestionPortrait to LandScape Pin
georgekjolly19-Aug-06 21:50
georgekjolly19-Aug-06 21:50 
AnswerRe: Portrait to LandScape Pin
bob1697220-Aug-06 4:48
bob1697220-Aug-06 4:48 
AnswerRe: Portrait to LandScape Pin
Hamid_RT22-Aug-06 7:25
Hamid_RT22-Aug-06 7:25 
QuestionSprite Animation Pin
lman81719-Aug-06 21:35
lman81719-Aug-06 21:35 
AnswerRe: Sprite Animation Pin
Mike Dimmick20-Aug-06 6:24
Mike Dimmick20-Aug-06 6:24 
Questioncapturing keyboard events Pin
Vissu8919-Aug-06 20:04
Vissu8919-Aug-06 20:04 
AnswerRe: capturing keyboard events [modified] Pin
bob1697220-Aug-06 4:40
bob1697220-Aug-06 4:40 
GeneralRe: capturing keyboard events Pin
Vissu8920-Aug-06 14:39
Vissu8920-Aug-06 14:39 
AnswerRe: capturing keyboard events Pin
Hamid_RT22-Aug-06 7:13
Hamid_RT22-Aug-06 7:13 
QuestionIcons Pin
Waldermort19-Aug-06 17:20
Waldermort19-Aug-06 17:20 
AnswerRe: Icons Pin
Michael Dunn20-Aug-06 6:10
sitebuilderMichael Dunn20-Aug-06 6:10 
Questioncontrol the frame WM_CLOSE message in MDI sub window, and must capture it and judge If can close the frame Pin
balconysun19-Aug-06 15:26
balconysun19-Aug-06 15:26 
AnswerRe: control the frame WM_CLOSE message in MDI sub window, and must capture it and judge If can close the frame Pin
cje22-Aug-06 10:33
cje22-Aug-06 10:33 
QuestionReturning Spoken Text from SAPI Pin
Bob X19-Aug-06 9:01
Bob X19-Aug-06 9:01 
QuestionWrite character in SDI Pin
Max++19-Aug-06 7:05
Max++19-Aug-06 7:05 
AnswerRe: Write character in SDI Pin
MarkDoubson19-Aug-06 10:13
MarkDoubson19-Aug-06 10:13 

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.