Menu Bar repaint (eVC)  
Author Message
WindowsWizard12





PostPosted: Thu Aug 28 13:48:09 CDT 2003 Top

PocketPCDev >> Menu Bar repaint (eVC)

Hi,



I have created a menu bar in my Pocket PC app. One of the menu items is
View, with Landscape and Portrait as sub-menu items. When I select sub-menu
items, the main window repaints correctly. However, the menu bar popup
window is never erased. How do I erase the submenu? Here is a snippet of
my code.



Thanks in advance,

Bev



LPARAM DoMainCommandLandscape (HWND hWnd, WORD idItem, HWND hwndCtrl, WORD
wNotifyCode)

{

g_bPortrait = FALSE;



InvalidateRect (hWnd, NULL, TRUE);



return 0;

}

Computer116  
 
 
Amit





PostPosted: Thu Aug 28 13:48:09 CDT 2003 Top

PocketPCDev >> Menu Bar repaint (eVC) Use GetWindowRect() and pass the RECT structure in the InvalidatRect...
Hope it helps...
Regards
Amit


> Hi,
>
>
>
> I have created a menu bar in my Pocket PC app. One of the menu items is
> View, with Landscape and Portrait as sub-menu items. When I select
sub-menu
> items, the main window repaints correctly. However, the menu bar popup
> window is never erased. How do I erase the submenu? Here is a snippet of
> my code.
>
>
>
> Thanks in advance,
>
> Bev
>
>
>
> LPARAM DoMainCommandLandscape (HWND hWnd, WORD idItem, HWND hwndCtrl, WORD
> wNotifyCode)
>
> {
>
> g_bPortrait = FALSE;
>
>
>
> InvalidateRect (hWnd, NULL, TRUE);
>
>
>
> return 0;
>
> }
>
>
>


 
 
Athanasios





PostPosted: Thu Aug 28 04:36:04 CDT 2003 Top

PocketPCDev >> Menu Bar repaint (eVC) Helo.

I have the same problem.
There is a previous thread which i began some hour before
yours

It starts as pop up menus and dialog boxes. I haven't
find something until now but for sure you can't make it
work by invalidate.In my occasion it don't work.

Anyway take a look to this thread maybe find out
something good.

Bye
Thanasis.
>-----Original Message-----
>Hi,
>
>
>
>I have created a menu bar in my Pocket PC app. One of
the menu items is
>View, with Landscape and Portrait as sub-menu items.
When I select sub-menu
>items, the main window repaints correctly. However, the
menu bar popup
>window is never erased. How do I erase the submenu?
Here is a snippet of
>my code.
>
>
>
>Thanks in advance,
>
>Bev
>
>
>
>LPARAM DoMainCommandLandscape (HWND hWnd, WORD idItem,
HWND hwndCtrl, WORD
>wNotifyCode)
>
>{
>
> g_bPortrait = FALSE;
>
>
>
> InvalidateRect (hWnd, NULL, TRUE);
>
>
>
> return 0;
>
>}
>
>
>
>.
>
 
 
4Hope





PostPosted: Sun Aug 31 02:11:17 CDT 2003 Top

PocketPCDev >> Menu Bar repaint (eVC) Thanks for replying. I tried this but the problem wasn't resolved. I'm
going to switch to a command bar and see if that works...

Thanks again
Bev



> Use GetWindowRect() and pass the RECT structure in the InvalidatRect...
> Hope it helps...
> Regards
> Amit


> > Hi,
> >
> >
> >
> > I have created a menu bar in my Pocket PC app. One of the menu items is
> > View, with Landscape and Portrait as sub-menu items. When I select
> sub-menu
> > items, the main window repaints correctly. However, the menu bar popup
> > window is never erased. How do I erase the submenu? Here is a snippet
of
> > my code.
> >
> >
> >
> > Thanks in advance,
> >
> > Bev
> >
> >
> >
> > LPARAM DoMainCommandLandscape (HWND hWnd, WORD idItem, HWND hwndCtrl,
WORD
> > wNotifyCode)
> >
> > {
> >
> > g_bPortrait = FALSE;
> >
> >
> >
> > InvalidateRect (hWnd, NULL, TRUE);
> >
> >
> >
> > return 0;
> >
> > }
> >
> >
> >
>
>