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

C / C++ / MFC

 
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 
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 
Axonn Echysttas wrote:
1. So I can specify NULL for all of these?

 Yes.


Axonn Echysttas wrote:
2. But still, how can I get the HINSTANCE of a window that I created using CreateWindowEx using a simple class that I created too using RegisterClassEx.

 Two choices here:
1. When you call RegisterClass(Ex) use the CS_GLOBALCLASS style. If you do this you can pass NULL for your own classes. This is the more dangerous option because as the class is global you run the risk of name clashes.
2. When you call RegisterClass(Ex) pass the HINSTANCE of the you EXE/DLL and use the same HINSTANCE when calling CreateWindow(Ex). In this case it is the HINSTANCE/class name pair that identify the window class. Typically the HINSTANCE of the module that calls RegisterClass(Ex) is used.

Steve

-- modified at 9:29 Thursday 19th January, 2006

I misunderstood (2):
A HINSTANCE identifies a module (an .EXE or DLL). I'm not sure if you can get the HINSTANCE of a class from a HWND.
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 
AnswerRe: Programming an updating feature Pin
Blake Miller19-Jan-06 8:04
Blake Miller19-Jan-06 8:04 
GeneralRe: Programming an updating feature Pin
Demonware66619-Jan-06 18:36
Demonware66619-Jan-06 18:36 
QuestionFurther sub-classing of CEdit Pin
Lilith.C18-Jan-06 15:55
Lilith.C18-Jan-06 15:55 
AnswerRe: Further sub-classing of CEdit Pin
Owner drawn18-Jan-06 17:01
Owner drawn18-Jan-06 17:01 
QuestionC++ Compiler for Win XP Pro Pin
JGHayles18-Jan-06 15:40
JGHayles18-Jan-06 15:40 
AnswerRe: C++ Compiler for Win XP Pro Pin
<color>Aljechin 18-Jan-06 17:35
<color>Aljechin 18-Jan-06 17:35 
AnswerRe: C++ Compiler for Win XP Pro Pin
Owner drawn18-Jan-06 17:54
Owner drawn18-Jan-06 17:54 

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.