I tried that Viewport of Joseph Newcomer and I would say in the array I'm using consecutive integers as X coordinates like 1,2,3,4,...,n...so in SetWindowExt, which should be the interested method for re-scaling I guess, I use current last X value in the array for X coord and in the place of Y I use rect.bottom since Y values in the array are actually random with this formula:
(the array is fixed size to the whole window resolution width where when I add new value at the last place I rotate before the array to shift-left it).
The matter is if I set SetWindowExt with last myarray[myarray.size() - 1].x and rect.bottom, which would be reasonably the right way to set for rescale, produces an assertion error.
Using Newcomer's Viewport example I found on codeproject, i figured to set the origin at bottom right having axis going back to bottom-left and top-right it made me setting SetViewportOrg and SetWindowOrg respectively to 0,0 and rect.BottomRight() so it would start from bottom-right... and setting SetWindowExt to rect.Width() and
rect.Height() didn't produced any assertion errors but doesn't repaints rescaled graphic. You can see the two results here:
http://img707.imageshack.us/img707/3444/44318805.jpg <---- this is the
http://img16.imageshack.us/img16/4699/64174798.jpg <---- this is the
Maybe I haven't got well in my mind about right settings of those
SetWindowOrg, SetWindowExt, SetViewportOrg, SetViewportExt...
To get disk number for any drive i open drive (like \\.\c and pass its handle with IOCTL_STORAGE_GET_DEVICE_NUMBER in DeviceIoControl and get data in STORAGE_DEVICE_NUMBER structure. This structure returns the device number and partition number.
This works perfectly on basic disk but when i use the same on dynamic disk then it's fail.
Please suggest how to get disk number and partition number for dynamic disk.
After using that i get correct disk number. But i found starting offset and extent length different.It shows very large value for starting offset.And extent length shows a value(0x7e00) which is the position in disk from where this partition start.
Does extentlength means total size of drive or position of drive in disk?
I have two doubts regarding ur question
1. If DeviceIoControl API is failing, can you check error with GetLastError API([^]).
2. What type of dynamic device you are using and hope it comes in one of the define type([^])
I have made a simple Dialog box application, in that i have made a static text control with Client Edge properties true and i also have a picture control which has a bitmap. That picture control is below that static control to give a look that bitmap inside that static control border. but the problem is sometimes that bitmap is not displayed i have also used Invalidate(False) everytime i have displayed both the controls but sometimes only static box is displayed and picture is not displayed...
Have a look at this: Overlapping Controls Are Not Supported by Windows[^] (means siblings). If you want overlapping controls in a dialog use a child-parent-hierarchy, for example use SetParent()[^]. Another alternative would be modifying the static text control you mentioned, make it a custom control that draws a picture in the background.
When I first heard about Embedded360 and their Fast Embedded Model, I didn’t give much importance to it. But it’s when I worked with them and got to know their work process that I truly understood their approach. Their Agile methodologies combined with technical expertise in the embedded space have helped them in developing flexible, easily accessible, and futuristic solutions that enhance quality and maximize profits. For more details click here: http://www.embedded360.com/[^]