|
Iam using MDI Appln.
I added the foll. menus under the Veiw menu created by default by the appln.
1)"OSDToolBar" (whose ID is ID ID_VIEW_DRAWTOOLBAR)
2)"ActionEditor"(whose ID is ID ID_VIEW_ACTIONEDITOR)
the handler for ID_VIEW_ACTIONEDITOR is called before and after creating the first MDI Child Window.
But strangely the handler for ID_VIEW_DRAWTOOLBAR wont invoke after creating the first MDI Child Window.
Can anyone let me know where I am going wrong / is there anything Iam overlooking.The message map and handlers are given below.
BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
ON_WM_CREATE()
ON_COMMAND(ID_VIEW_DRAWTOOLBAR, OnDrawToolBar)
ON_UPDATE_COMMAND_UI(ID_VIEW_DRAWTOOLBAR, OnUpdateDrawToolBar)
ON_COMMAND(ID_VIEW_ACTIONEDITOR, OnViewFunction)
ON_UPDATE_COMMAND_UI(ID_VIEW_ACTIONEDITOR, OnUpdateViewFunction)
END_MESSAGE_MAP()
void CMainFrame::OnDrawToolBar()
{
if (m_bUICtrlBar)
{
m_bUICtrlBar = false;
ShowControlBar(&m_UICtrlsBar, m_bUICtrlBar, false );
}
else
{
m_bUICtrlBar = true;
ShowControlBar(&m_UICtrlsBar, m_bUICtrlBar, false );
}
}
laiju
|
|
|
|
|
Hi,
Print preview function can not be work when default printer
under off-line status.
The status is not for all computer, just for some computer.
Can give any recommanceds for this question ?
Thanks!
KHLin
|
|
|
|
|
Hi,
I'm using a CRichEdit control, changing colors of text and whatnot, but I don't want the text to automatically scroll to the bottom when I use the SetSel function. I've tried just sending the windows message via SendMessage but this seems to automatically scroll as well. Does anyone know how to not automatically scroll? Can I call upon the CEdit SetSel (which has the bNoScroll value) somehow?
Thanks!
Kelly Ryan
|
|
|
|
|
Nevermind, it was actually the HideSelection call I was making. I got it all working.
Kelly Ryan
|
|
|
|
|
I'd like to draw bitmaps with transparent colors using GDI+. For instance, I want to have a bitmap with a black background, but when it draws on my screen, the background draws transparently, i.e., does not draw, so the bitmap doesn't look like a square. Is there a way to do this with a quick GDI+ call, or do I have to resort to using bit masking with BitBlt?
Thank you!
|
|
|
|
|
If you can get to the regular GDI from GDI+, then try the TransparentBlt function call.
|
|
|
|
|
Have sombody using one of my programs that has a widescreen Dell 8600 laptop. The program uses a lot of overlaid bitmaps, and draws on it's dialogs, and everything is skewed all over the place on his system.
Wondering if anyone has run across this before, and if there's anything I can tell him to try to fix it? I don't have a widescreen to try to reproduce the issue on.
TIA,
Rick
|
|
|
|
|
Skewed how ? Can you run your program in a window to give you the aspect ratio to reproduce the problem ? Or is your screen size able to be abstracted to a property that causes you to draw as if it was wide screen ?
If your app is always full screen, I wonder if your code is just not handling the possibility of a different aspect ratio ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I'm trying to make a graphing and data analysis program using C++/Visual C++. I'm wondering if there are any graphing classes or templates available online somewhere?
htuba
|
|
|
|
|
|
Does anyone know how to find the number of windows open at a given time? I've looked into enumwindows and the find/get window functions, but there must be a way to just ask the window manager for this piece of information without having to iterate through all the windows.
Thanks,
~Himanshu
|
|
|
|
|
What's wrong with:
BOOL CALLBACK EnumProc( HWND hwnd, LPARAM lParam )
{
PUINT puCount = (PUINT) lParam;
(*puCount)++;
return TRUE;
}
UINT uCount = 0;
EnumWindows(EnumProc, (LPARAM) &uCount);
TRACE(_T("The numer of top-level windows is: %u\n"), uCount);
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I don't think there is a way to just get the count aside from the enumeration API.
However, you must make one distinction. Do you want:
a) ALL windows on the system?
b) ALL _VISIBLE_ windows on the system (There are a lot of windows on the system that are not visible)?
c) ALL _TOP LEVEL_ windows on the system?
There is also the question of do you want to include each little component such as each button, edit box, system tray, the desktop icons (progman), the task bar, etc. etc. etc. because all those little details get enumerated. All controls, etc.
Depending on what you are looking for would determine how you write the counting code to exclude and include the correct windows when you enumerate.
There is also "EnumChildWindows" which may need to be called on each top level enumerated window if you don't want just top level windows.
8bc7c0ec02c0e404c0cc0680f7018827ebee
|
|
|
|
|
Toby Opferman wrote:
c) ALL _TOP LEVEL_ windows on the system?
"Top level windows" were specifically asked for in the subject.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Ok, He'll need to filter out the invisible windows, task bar, prog man and the system tray.
8bc7c0ec02c0e404c0cc0680f7018827ebee
|
|
|
|
|
That's if he doesn't want those, he needs to figure out if he really does want all the top level windows or only ones seen by the task bar (which then he would need to fitler things like side tool bars), etc.
8bc7c0ec02c0e404c0cc0680f7018827ebee
|
|
|
|
|
Does anyone know of a function that returns the total ram size that is available on the hardware that your application is running on. I change the logic of my code based on whether I have 128 MB or 256 MB of ram on a given unit.
Thanks,
Himanshu
|
|
|
|
|
|
Yahoo! Thanks, exactly what I was looking for.
~Himanshu
|
|
|
|
|
For some reason I seem to have a problem with finding the function to retrieve the time. Could someone help out? I'd like to be able to do this without MFC if I could.
Danny
|
|
|
|
|
How about time() or GetSystemTime() ?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I have some trouble using the code and library from the Independent JPEG Group. It only occurs with damaged jpg files. I tried and cximage can load that damaged files better than my functions. Besides, every professional pictureviewer/editor can do so. I posted the whole matter under the cimage article you can find on codeproject: http://www.codeproject.com/bitmap/cximage.asp[^]
Since the project is discontinued I can't rely that I get a answer there. So I hope some people using VC++ too can help me with that matter. I know the chances are very low since there are only few people using jpg decompression directly in theyr apps.
|
|
|
|
|
Jpeg's as most image systems use scan line by scan line decompression, that is, one line at a time. If you can track down the point at which it cycles through the lines you might be able to handle errors more gracefully than the default code does. JPeg uses DCT compression which is a very complicated algorithm as you can probly tell from the size of the code, but you can most likely work backwards from the decompression in the "main" code that uses all the other code, and catch it before it gets into the complicated bits. IIRC it is jpeg.c, but you should check that out.
|
|
|
|
|
I found a solution on my own. I posted it at the comments of the cximage article.
|
|
|
|
|
ofstream out("Matrices");
if(!out){
cout<<"cannot open file.\n";
return 1;
}
for(int i=0;i<row1;i++)
{for(int j=0;j<col1;j++){
out<<mat1[i][j];}}
out<<" *";
for(int w=0;w<row2;w++){for(int e=0;e<col2;e++){
out<<mat2[w][e];}}
out<<"=";
for(int u=0;u<row1;u++){for(int v=0;v<col2;v++){
out<<mat[u][v];}}
out.close();
in the followin part of code it is workin ver well but there is a proplem for me in the output
the output is
2333 *44=2024
how ever i want to make it in the way like that
2 3 * 4 = 20
3 3 4 24
or in any way so that the user can understand the output file & became able to know where is the first matrix is & the second one is and the output as well so
HOW CAN I DO THIS????????
|
|
|
|