stop window from resizing. RegisterClassEx. #define ? 
Author Message
 stop window from resizing. RegisterClassEx. #define ?

Hello out there.

I have the following 3 questions.

1. How can I make my dialog stop resizing... ( I used BRW 4.5)

2. If I create my dialog in BRW and I use RegisterClassEx, why do
I need to declare in the WC-struct a menuName if I already
"linked" the menu to the dialog with BRW4.5?? And why IF I declare
MENUNAME in wc-struct but don't declare in the .rc (with BRW) the menu
doesn't show ( ofcourse there is a menu-resource in the .rc file)??
( I thought in the registerclassex procedure you declare a seperate menu
and dialog SO THEY ARE LINKED TOGETHER.)

3. What are those numbers doing behind the defines ??

#define ICON_1  1      
#define main_menu       1
#define CM_FILEOPEN_PROJECT     102
#define CM_HELPABOUT    24346
#define CM_HELPUSING_HELP       24345

If they a used in the source, how come ICON_1 and main_menu have the
same number ??

These a normal beginners questions...

<anybody>



Sat, 07 Jul 2001 03:00:00 GMT  
 stop window from resizing. RegisterClassEx. #define ?
Hello out there.

Quote:

> 1. How can I make my dialog stop resizing... ( I used BRW 4.5)

Three possibilities:
a) Don't specify the 'Thick frame' option when designing the dialog box.
b) Handle the WM_GETMINMAXINFO message, which is sent to the window (or
dialog) when its size or position is about to change, and change the
members of the MINMAXINFO structure pointed to by lParam so that the
window size doesn't change.
c) Handle the WM_SIZING message, which is sent to the window (or dialog)
when the user is resizing it, and change the members of the RECT
structure pointed to by lParam so that the size doesn't change.

Quote:
> 2. If I create my dialog in BRW and I use RegisterClassEx, why do
> I need to declare in the WC-struct a menuName if I already
> "linked" the menu to the dialog with BRW4.5?? And why IF I declare
> MENUNAME in wc-struct but don't declare in the .rc (with BRW) the menu
> doesn't show ( ofcourse there is a menu-resource in the .rc file)??
> ( I thought in the registerclassex procedure you declare a seperate menu
> and dialog SO THEY ARE LINKED TOGETHER.)

If I'm not mistaken, you should not need to use RegisterClassEx (or
RegisterClass) for a dialog, since it's constructed from a template when
you use DialogBox etc. In that case, the menu should work as expected.

Quote:
> 3. What are those numbers doing behind the defines ??

> #define ICON_1  1

The number of the ICON_1 resource.

Quote:
> #define main_menu       1

The number of the main_menu resource.

Quote:
> #define CM_FILEOPEN_PROJECT     102
> #define CM_HELPABOUT    24346
> #define CM_HELPUSING_HELP       24345

These are probably numbers of the menu items in main_menu.

Basically all of the above are generated by RW using the default values
of RW. If you want to control the numeric values yourself, you can do it
from the dialog box opened from the menu Resource/Identifiers.

Quote:
> If they a used in the source, how come ICON_1 and main_menu have the
> same number ??

They are processed differently. For example, LoadIcon and LoadMenu API
functions know what type of resource they want to load. It doesn't
matter if the actual values of different resources are the same. You
could have an icon value 1, a menu value 1, a dialog value 1, etc. You
can't, of course, have two similar resources with the same value.

        AriL
--
Humans may send email (if absolutely necessary) to the
obvious non-spam address.



Mon, 09 Jul 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. stop window from resizing. RegisterClassEx. #define ?

2. Stopping Automatic Window Resizes

3. Q: resizing listbox with window resize

4. VA3.0b - window resizing on form resize

5. Help stop image control from resizing.

6. Stopping Resizing

7. stop counter in a well defined way

8. Resizing Window in windows

9. C5b: Window formatter resizes window when toolbar is used

10. Stop main window from closing app when child windows exist

11. STOP doesn't stop this procedure [TECHNICAL]

12. stop, I repeat, stop replying to nudds you godam dumbfuks

 

 
Powered by phpBB® Forum Software