Click here to Skip to main content
15,914,323 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionChild Static Control not displayed when created when parent hidden !? Why!! Pin
Axonn Echysttas18-Jan-06 18:55
Axonn Echysttas18-Jan-06 18:55 
AnswerRe: Child Static Control not displayed when created when parent hidden !? Why!! Pin
Stephen Hewitt18-Jan-06 19:11
Stephen Hewitt18-Jan-06 19:11 
GeneralRe: Child Static Control not displayed when created when parent hidden !? Why!! Pin
Axonn Echysttas18-Jan-06 19:56
Axonn Echysttas18-Jan-06 19:56 
GeneralRe: Child Static Control not displayed when created when parent hidden !? Why!! Pin
Stephen Hewitt18-Jan-06 20:00
Stephen Hewitt18-Jan-06 20:00 
GeneralRe: Child Static Control not displayed when created when parent hidden !? Why!! Pin
Axonn Echysttas18-Jan-06 20:28
Axonn Echysttas18-Jan-06 20:28 
GeneralRe: Child Static Control not displayed when created when parent hidden !? Why!! Pin
Stephen Hewitt18-Jan-06 20:57
Stephen Hewitt18-Jan-06 20:57 
GeneralRe: Child Static Control not displayed when created when parent hidden !? Why!! Pin
Axonn Echysttas18-Jan-06 21:22
Axonn Echysttas18-Jan-06 21:22 
GeneralRe: Child Static Control not displayed when created when parent hidden !? Why!! Pin
Stephen Hewitt18-Jan-06 21:44
Stephen Hewitt18-Jan-06 21:44 
Normally you get the HINSTANCE (or HMODULE, they are the same in Win32 - there used to be a distinction in the 16 bit days) from your DllMain if you're a DLL or from WinMain for an EXE. Also see here for details on the hInstance parameter of CreateWindow. In short all the system supplied window classes (such as "STATIC") ignore the hInstance parameter because they are registered with the CS_GLOBALCLASS flag.

HINSTANCE g_hInstance;

BOOL WINAPI DllMain(
  HINSTANCE hinstDLL,
  DWORD fdwReason,
  LPVOID lpvReserved
)
{
    if ( fdwReason == DLL_PROCESS_ATTACH )
    {
        g_hInstance = hinstDLL; // Stash it.
    }
}

int WinMain(      
  HINSTANCE hInstance,
  HINSTANCE hPrevInstance,
  LPSTR lpCmdLine,
  int nCmdShow
)
{
        g_hInstance = hInstance; // Stash it.
}


Steve
GeneralRe: Child Static Control not displayed when created when parent hidden !? Why!! Pin
Axonn Echysttas18-Jan-06 22:00
Axonn Echysttas18-Jan-06 22:00 
GeneralRe: Child Static Control not displayed when created when parent hidden !? Why!! Pin
Stephen Hewitt18-Jan-06 22:03
Stephen Hewitt18-Jan-06 22:03 
GeneralRe: Child Static Control not displayed when created when parent hidden !? Why!! Pin
Axonn Echysttas19-Jan-06 0:44
Axonn Echysttas19-Jan-06 0:44 
GeneralRe: Child Static Control not displayed when created when parent hidden !? Why!! Pin
Axonn Echysttas19-Jan-06 1:07
Axonn Echysttas19-Jan-06 1:07 
GeneralRe: Child Static Control not displayed when created when parent hidden !? Why!! Pin
Stephen Hewitt19-Jan-06 1:55
Stephen Hewitt19-Jan-06 1:55 
GeneralRe: Child Static Control not displayed when created when parent hidden !? Why!! Pin
Axonn Echysttas19-Jan-06 2:23
Axonn Echysttas19-Jan-06 2:23 
GeneralRe: Child Static Control not displayed when created when parent hidden !? Why!! Pin
Stephen Hewitt19-Jan-06 3:27
Stephen Hewitt19-Jan-06 3:27 
GeneralRe: Child Static Control not displayed when created when parent hidden !? Why!! Pin
Axonn Echysttas19-Jan-06 4:15
Axonn Echysttas19-Jan-06 4:15 
QuestionWPARAM and LPARAM ? Pin
Owner drawn18-Jan-06 17:50
Owner drawn18-Jan-06 17:50 
AnswerRe: WPARAM and LPARAM ? Pin
Prakash Nadar18-Jan-06 17:57
Prakash Nadar18-Jan-06 17:57 
AnswerRe: WPARAM and LPARAM ? Pin
Christian Graus18-Jan-06 17:58
protectorChristian Graus18-Jan-06 17:58 
QuestionRe: WPARAM and LPARAM ? (What about HWND...Where should it go?) Pin
Owner drawn18-Jan-06 18:02
Owner drawn18-Jan-06 18:02 
AnswerRe: WPARAM and LPARAM ? (What about HWND...Where should it go?) Pin
Prakash Nadar18-Jan-06 18:15
Prakash Nadar18-Jan-06 18:15 
AnswerRe: WPARAM and LPARAM ? Pin
Blake Miller19-Jan-06 8:02
Blake Miller19-Jan-06 8:02 
GeneralRe: WPARAM and LPARAM ? Pin
Owner drawn19-Jan-06 16:54
Owner drawn19-Jan-06 16:54 
GeneralRe: WPARAM and LPARAM ? Pin
Blake Miller20-Jan-06 4:06
Blake Miller20-Jan-06 4:06 
QuestionProgramming an updating feature Pin
Demonware66618-Jan-06 15:55
Demonware66618-Jan-06 15:55 

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.