Click here to Skip to main content
15,921,113 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralNTService creating COM object problem Pin
Ed K30-Aug-02 9:26
Ed K30-Aug-02 9:26 
GeneralRe: NTService creating COM object problem Pin
Vagif Abilov30-Aug-02 10:12
professionalVagif Abilov30-Aug-02 10:12 
GeneralRe: NTService creating COM object problem Pin
Ed K30-Aug-02 11:13
Ed K30-Aug-02 11:13 
GeneralRe: NTService creating COM object problem Pin
Le centriste30-Aug-02 10:20
Le centriste30-Aug-02 10:20 
GeneralRe: NTService creating COM object problem Pin
Ed K30-Aug-02 11:08
Ed K30-Aug-02 11:08 
GeneralRe: NTService creating COM object problem Pin
Jörgen Sigvardsson30-Aug-02 11:52
Jörgen Sigvardsson30-Aug-02 11:52 
GeneralRe: NTService creating COM object problem Pin
Anders Molin30-Aug-02 12:32
professionalAnders Molin30-Aug-02 12:32 
Questionposition of code matters? Pin
ns30-Aug-02 9:23
ns30-Aug-02 9:23 
I had in my OnInitialUpdate this fragment at the end of the function:

 if(NULL != m_THBImage1.GetSafeHwnd())

{
    m_THBImage1.MoveWindow(10,10,200,180);
    m_THBImage2.MoveWindow(10,200,200,180);
    m_THBImage3.MoveWindow(10,390,200,180);
    m_THBImage4.MoveWindow(10,580,200,180);

}


Well, the code would run and never go into the block, so that my controls were higgledy piggledy on the screen. I moved it to the start of the function, and it works (though one time it crashed and didnt move the imageboxes). I am uneasy about why the crash and why the relocation works.

Most of the code in the OnInitialUpdate function does database access and sets things up.

The same relocation trick worked for the following in the same function:

if(NULL != m_listdisplay.GetSafeHwnd())

{
m_listdisplay.SetExtendedStyle(LVS_EX_CHECKBOXES);
m_listdisplay.InsertColumn(0,"Options",LVCFMT_LEFT,800);
}


If it was at the end of the function, my listctrl would come up blank with no columnheader, and when moved up, its okay.

The one time it crashed (even after moving the code up), the list ctrl was blank and there was no columnheader. I cant reproduce it but am extremely nervous.

Appreciate your insight.
Thanks,
nsConfused | :confused: Confused | :confused: Cry | :((
AnswerRe: position of code matters? Pin
Ravi Bhavnani30-Aug-02 12:32
professionalRavi Bhavnani30-Aug-02 12:32 
GeneralCHeaderCtrl messages from CListView based View Pin
JennyP30-Aug-02 7:34
JennyP30-Aug-02 7:34 
GeneralRe: CHeaderCtrl messages from CListView based View Pin
Tomasz Sowinski30-Aug-02 7:52
Tomasz Sowinski30-Aug-02 7:52 
GeneralPointer to Document Pin
Kash30-Aug-02 7:01
Kash30-Aug-02 7:01 
GeneralRe: Pointer to Document Pin
JennyP30-Aug-02 7:27
JennyP30-Aug-02 7:27 
GeneralRe: Pointer to Document Pin
Kash30-Aug-02 8:29
Kash30-Aug-02 8:29 
Generalgaining back lost focus Pin
Anonymous30-Aug-02 6:38
Anonymous30-Aug-02 6:38 
GeneralAdding spin control to ListCtrl Pin
dennisV30-Aug-02 6:10
dennisV30-Aug-02 6:10 
Generalzooming problem Pin
Zayax30-Aug-02 5:29
Zayax30-Aug-02 5:29 
GeneralRe: zooming problem Pin
Chris Losinger30-Aug-02 5:46
professionalChris Losinger30-Aug-02 5:46 
GeneralRe: zooming problem Pin
Zayax30-Aug-02 6:23
Zayax30-Aug-02 6:23 
GeneralLoad Icons from DLL Pin
Matt Newman30-Aug-02 5:02
Matt Newman30-Aug-02 5:02 
GeneralRe: Load Icons from DLL Pin
Tomasz Sowinski30-Aug-02 5:08
Tomasz Sowinski30-Aug-02 5:08 
GeneralRe: Load Icons from DLL Pin
Matt Newman31-Aug-02 1:56
Matt Newman31-Aug-02 1:56 
GeneralRe: Load Icons from DLL Pin
Brian Delahunty30-Aug-02 5:27
Brian Delahunty30-Aug-02 5:27 
GeneralRe: Load Icons from DLL Pin
Matt Newman31-Aug-02 1:57
Matt Newman31-Aug-02 1:57 
GeneralRe: Load Icons from DLL Pin
Brian Delahunty1-Sep-02 0:41
Brian Delahunty1-Sep-02 0:41 

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.