Click here to Skip to main content
15,924,829 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Programatically create Bitmap file: How To??? Pin
V.17-Jun-04 2:50
professionalV.17-Jun-04 2:50 
AnswerRe: Programatically create Bitmap file: How To??? Pin
KarstenK17-Jun-04 4:24
mveKarstenK17-Jun-04 4:24 
AnswerRe: Programatically create Bitmap file: How To??? Pin
John R. Shaw17-Jun-04 12:04
John R. Shaw17-Jun-04 12:04 
GeneralCTreeCtrl Pin
Gizmo7917-Jun-04 2:36
Gizmo7917-Jun-04 2:36 
GeneralRe: CTreeCtrl Pin
David Crow17-Jun-04 2:55
David Crow17-Jun-04 2:55 
GeneralRe: CTreeCtrl Pin
Arjan Schouten17-Jun-04 3:00
Arjan Schouten17-Jun-04 3:00 
GeneralRe: CTreeCtrl Pin
Gizmo7917-Jun-04 3:16
Gizmo7917-Jun-04 3:16 
GeneralActiveX registration Pin
marcomars17-Jun-04 2:20
marcomars17-Jun-04 2:20 
Hello,
my MFC dialog based app uses a freeware activex I found on the net.

To use it, the relative ocx file must be registered in the system.

Is there a way to make the app do itself without the user having
to run regsvr32 c:\..... ?

I added the lines

STARTUPINFO si;<br />
PROCESS_INFORMATION pi;<br />
ZeroMemory( &si, sizeof(si) );<br />
ZeroMemory( &pi, sizeof(pi) );<br />
CreateProcess(NULL,                   // No module name (use command line). <br />
              "regsvr32 MyOcx.ocx",// Command line. <br />
              NULL,                   // Process handle not inheritable. <br />
              NULL,                   // Thread handle not inheritable. <br />
              FALSE,                  // Set handle inheritance to FALSE. <br />
              0,                      // No creation flags. <br />
              NULL,                   // Use parent's environment block. <br />
              NULL,                   // Use parent's starting directory. <br />
              &si,                    // Pointer to STARTUPINFO structure.<br />
              &pi );                  // Pointer to PROCESS_INFORMATION structure.*/


inside InitInstance().

It seems to partially work:

with the ocx unregistered, the first time I execute the app
it brings out the information message box saying "DllRegisterServer MyOcx..."
From now on each time I execute the app first I see the box and finall the app.


I'd love to skip the first dummy execution and to close automatically the system info box without having to hit OK.

Any suggestion about this?

Thanks for the precious help.

Marco.
GeneralRe: ActiveX registration Pin
Antony M Kancidrowski17-Jun-04 2:38
Antony M Kancidrowski17-Jun-04 2:38 
Questionhow to decide the parent dialog Pin
dadacncn17-Jun-04 2:18
dadacncn17-Jun-04 2:18 
AnswerRe: how to decide the parent dialog Pin
David Crow17-Jun-04 2:56
David Crow17-Jun-04 2:56 
GeneralRe: how to decide the parent dialog Pin
dadacncn17-Jun-04 3:11
dadacncn17-Jun-04 3:11 
GeneralRe: how to decide the parent dialog Pin
User 665817-Jun-04 3:20
User 665817-Jun-04 3:20 
GeneralRe: how to decide the parent dialog Pin
dadacncn17-Jun-04 3:51
dadacncn17-Jun-04 3:51 
QuestionHow to Serialize this? Pin
Tcpip200517-Jun-04 2:17
Tcpip200517-Jun-04 2:17 
AnswerRe: How to Serialize this? Pin
Blake Miller17-Jun-04 4:00
Blake Miller17-Jun-04 4:00 
GeneralRe: How to Serialize this? Pin
Tcpip200517-Jun-04 5:09
Tcpip200517-Jun-04 5:09 
GeneralSetting Dialog Box position Pin
sschilachi17-Jun-04 2:12
sschilachi17-Jun-04 2:12 
GeneralRe: Setting Dialog Box position Pin
Antony M Kancidrowski17-Jun-04 2:19
Antony M Kancidrowski17-Jun-04 2:19 
GeneralWrite a simple program that can read/write files from/into a CD Pin
ledallam17-Jun-04 2:03
ledallam17-Jun-04 2:03 
GeneralRe: Write a simple program that can read/write files from/into a CD Pin
Henry miller17-Jun-04 3:10
Henry miller17-Jun-04 3:10 
GeneralCObject and CArchive again Pin
Anonymous17-Jun-04 1:53
Anonymous17-Jun-04 1:53 
GeneralRe: CObject and CArchive again Pin
Rodrigo Pinto Pereira de Souza17-Jun-04 2:20
Rodrigo Pinto Pereira de Souza17-Jun-04 2:20 
GeneralRe: CObject and CArchive again Pin
Anonymous17-Jun-04 2:54
Anonymous17-Jun-04 2:54 
GeneralRe: CObject and CArchive again Pin
Rodrigo Pinto Pereira de Souza17-Jun-04 7:46
Rodrigo Pinto Pereira de Souza17-Jun-04 7:46 

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.