|
I am using Win32 Dialog based Application. And I want to use the Java like Card Layout for this. How can I use this.
If you dont know about Card Layout sorry for that. Its just like playing cards. When a event is generated a new card is displayed. And one can see only one card at a time.
I.e. I Have a Dialog Box and a Menu. I want When somebody click on the menu Item, a Dialog box should appear with some new Buttons and edit box according to the Menu Item Clicked. :->
Is it possible in Win32 Dialog based application . If yes please tell me how.
Thnx in advance.
|
|
|
|
|
GauranG033 wrote: Is it possible in Win32 Dialog based application
Do Java applications running in Windows that use the card layout use Dialogs as you described? If so then it must be possible yes?
|
|
|
|
|
yes.In java you can use cardlayout in Farame or In Dialog.
In my application I just want that when user clicks on menu Item the Dialog Box should appear with Components according to the Item clicked.
|
|
|
|
|
GauranG033 wrote: I just want that when user clicks on menu Item the Dialog Box should appear with Components according to the Item clicked.
So in a menu item click event handler show the dialog. I must be missing something.
|
|
|
|
|
I have created a custom control to diaplay a rather compilcated bitmap on the main window. Now I can trap every message I need except for the WM_EXITSIZEMOVE, and this is probably the most important of them all.
I only want to resize the bitmap after the user has finished resizing the main window. I can re-create the effect by sending a message to the control from the main window, but this defeats the purpose of having a custom control in the first place.
Is there any way to detect when the parent window has completed a resize?
Waldermort
|
|
|
|
|
i've done this by waiting for a mouse button Up message. if you've received a bunch of WM_SIZE messages, then a WM_LBUTTONUP, you can assume the resize is done.
or, if you haven't received a WM_SIZE msg in X seconds, you can assume the resize has stopped.
|
|
|
|
|
Could the solution have come any easier? What can I say, it's been a long day...
Thanks for the answer
Waldermort
|
|
|
|
|
I'm probably missing something stupid, but I'm not getting any mouse messages whatsoever.
I added the window using the resource editor specifying the 'custom' window and my own registered class. The 'enabled' and 'visible' flags are both set, so why can't I recieve any input?
Waldermort
|
|
|
|
|
is any other control/window in your app doing a SetCapture ?
|
|
|
|
|
No, so far I only have a main window which does nothing except display my new custom control.
I'm currently reading the articles on "custom controls" hoping to spot something I have missed, but they are all geared towards MFC which I'm not using.
Waldermort
|
|
|
|
|
Do you have a WM_NCHITTEST handler that's indicating the cursor is in the NC area of the window?
IOW, is it a client area/non-client area issue?
WM_EXITSIZEMOVE should be sufficient if using the system resizing loop.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Yes, it was a NCHITTEST issue, I was returning the wrong value.
Nomatter what I tried, I just cannot trap the WM_EXITSIZEMOVE.
I am going to have to take Chris' approach and set a flag on a WM_SIZE event. But since I will only recieve mouse messages when the mouse is over the window I will have to use some type of timer. Luckily for me though, I have a thread running to monitor any changes required in the bitmap.
Waldermort
|
|
|
|
|
WalderMort wrote: I will have to use some type of timer.
A timer? Really? Hmmm, ok. This doesn't seem like it should be necessary if all the hittest
messages are handled properly.
Between SetCapture(), TrackMouseEvent(), and WM_MOUSELEAVE there shouldn't be issues
with the cursor moving outside the window.
Are you doing your own modal resize loop or relying on the system one?
It probably bugs you too, but timers in these situations are an extreme, last-resort,
cheesy solution IMO
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
How can i add thousand separator using CString.Format function in string ????
CString str;
str.Format("%##,##,###d",1234567} //not working in CString
result should be
12,34,567
|
|
|
|
|
Bhavesh Bagadiya wrote: How can i add thousand separator
By using GetNumberFormat() .
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
can u please give me example ??
|
|
|
|
|
See here and here.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hello,
I want to read a byte from a file on every place in the file. How localiser this byte and how can I get this byte from the file.
Jelle.
|
|
|
|
|
Move to the right position with 'seek' function fseek(...) /CFile::Seek(...)
then read 1 byte with fread(...) /CFile::Read(...)
Russell
|
|
|
|
|
i have two big 256 RGB images both are over 400M size, suppose we have known the GPS position of each vertexs of the two image, and the two images have same positions.
i want to splice the two images , make one new image including the two images.
is there good ways to process so big image?
thans.
|
|
|
|
|
Lao Wang wrote: is there good ways to process so big image?
the simplest one: pixel per pixel ...
i.e. do not use any build-in function, because they are surely not tested on very big images.
Russell
|
|
|
|
|
thanks Russell
but processing the two big image by pixel per pixel, consumes all my memory.
|
|
|
|
|
are the images in BMP format?
can you work without load they into the memory i.e. loading/storing pixels from/into the files?
Russell
|
|
|
|
|
yes, the two images are BMP format.
would you please detail your suggestion? the images are .bmp file in my hard disk. how can i load the pixels from the file and process the pixels without loading them into memory?
thanks
|
|
|
|
|
Lao Wang wrote: yes, the two images are BMP format
great!!
Lao Wang wrote: how can i load the pixels from the file and process the pixels without loading them into memory?
Here[^] or here[^] you can find how it is stored an image into a BMP file. i.e. how it is writed the file header.
Writing some lines of code you can load a pixel from the source image and then store into the output image...to let the processing be faster work row per row.
Probally you can find some code ready somewhere (also on CP) to access to the file.
good luck
Russell
|
|
|
|