|
Hi Nick,
Thanks for the answer.
But, i m switching between 3-4 icons to be displayed in system tray depending on situation and use of timer creates the problem of repaiting the screen and which results into total distoration of screen.
So id there is another effective solution then pls let me know or any other friend knows about it then also it will be very thankful.
|
|
|
|
|
I don't understand what you mean. Timers should have no impact on repainting of the screen. you only call Shell_NotifyIcon from the timer routine... I don't see how that should distort your screen...
|
|
|
|
|
Hi everybody,
I try to use the class library for the DirectMusic MIDI created by Carlos Jiménez de Parga found on 'the code project', but I'm not use to C++.
I will need a interface: what would be the best solution ? Win32, ATL, MFC, Framework.NET. I have too many options. Can someone tell me the steps to create a new project who's working. It will be a good starting point.
Thanks a lot.
|
|
|
|
|
Hi guys
I've got an app where I only do a CenterWindow() in InitInstance and in w2000 it opens correctly and in XP the scrollbars appears and not all my main window is visible. Have you experienced something similar? DO you know why?
Best Regards
Doc
|
|
|
|
|
Maybe you have different resolution in defferent windows so it looks like that in XP.
Mazy
No sig. available now.
|
|
|
|
|
Same resolution in both SO. It's an amazing bug.
Doc
|
|
|
|
|
In fact I need to adapt some piece of code whether the application is running on Win2k+ or Win9x.
Thanks for your help
-MyttO
|
|
|
|
|
GetVersionEx()
Mazy
No sig. available now.
|
|
|
|
|
|
I found this true!
//------------------------------------------------------------------------
CString GetWinVersion()
{
CString Ver;
OSVERSIONINFO osinfo;
osinfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
GetVersionEx(&osinfo);
Ver.Format("Windows Version %1d.%1d", osinfo.dwMajorVersion, osinfo.dwMinorVersion);
return Ver;
}
//------------------------------------------------------------------------
I'll TRY my best
|
|
|
|
|
Thank you all for fast answers!!
-MyttO
|
|
|
|
|
Hi,
I would like to know how to make a copy of the file that i just opened.
what is the sytax for it????
Ehsan Behboudi
|
|
|
|
|
Look for CopyFileEx() in MSDN:
Mazy
No sig. available now.
|
|
|
|
|
What's the best way to go about "learning" the machines that are connected to a network? (as part of a LAN Workgroup, domain, etc.)
Let's say for instance that I have an app that can remotely connect to other machines to provide monitoring functionality. It would be nice to have a dynamic list of available machines that it could connect to. What all is involved here? I'm not sure if I need to look into SNMP or if just TCP/IP stuff will do the trick. Or maybe there are Windows API functions that handle all this?
[EDIT] Not sure if it matters, but I'm only interested in how to do this on Windows NT/2000/XP/2003 (not 95/98/ME). [/EDIT]
Thanks!
--
Edward Livingston
(aka ExtraLean)
--
"I still maintain that seeing a nipple is far less disturbing than seeing someone get their brains blown out." -- Chris Maunder
|
|
|
|
|
Does WNetOpenEnum()/WNetEnumResource() help?
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Yes! Thank you David.
--
Edward Livingston
(aka ExtraLean)
--
"I still maintain that seeing a nipple is far less disturbing than seeing someone get their brains blown out." -- Chris Maunder
|
|
|
|
|
Hi all,
I would like to know how to insert a CDateTimeCtrl (DateTimePicker) into my ToolBar.
I use this way :
BOOL CMyToolBar::CreateDTPicker(CDateTimeCtrl& dtPicker, UINT nIndex, UINT nID, int nWidth)
{
// Create the DateTimePicker Control :
SetButtonInfo(nIndex, nID, TBBS_SEPARATOR, nWidth);
CRect rect;
GetItemRect(nIndex, &rect);
if (!dtPicker.Create(DTS_RIGHTALIGN | DTS_UPDOWN | WS_TABSTOP, rect, this, nID))
{
TRACE("Failed to create DateTimePicker Control\n");
return FALSE;
}
return TRUE;
}
taken from : http://www.codeproject.com/docking/ToolbarWithCombo.asp
but it doesn't work for the CDateTimeCtrl, the control doesn't appear.
Can someone help me ?
Thanks in advance,
Phil
|
|
|
|
|
hmmmmmmmmmmm, sh*t, I just forgot the WS_VISIBLE in the Create function !!!
So it works now.
BrutalDeath0
|
|
|
|
|
My application draws complex shapes to the screen that consist of a mixture of straight lines and polybezier curves. The shapes are filled by defining a Path and creating a CRgn object, within a CreateRegion() function. The Draw function for the object first paints the fill and then draws the outline. This works just fine for output to the screen, but when I use Print Preview and sometimes print the display I get a mismatch between the shapes outline and fill. I've found the MSDN article on how to convert the screen coordinates to CPreviewDC coordinates (http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q128/3/34.asp&NoWebContent=1) but this only deals with rectangular shaped clip regions. Anyone got any points? Code can be included if you need to take a look
___________________________
Jeremy Preston
|
|
|
|
|
Try this article.
http://www.codeproject.com/printing/ClipRegionProblem.asp
I think it may help you.
You should also consider that some printer DCs only support one clipping region at one time. So setting multiple clipping regions may not work when printing!
|
|
|
|
|
Thanks CodeBrain....I'd found this article too. But it's still only dealling with rectangular shaped regions. I have regions that are a mixture of straight lines and bezier curves that are defined via Paths, and used to fill these shapes. When in Print Preview / Printing I need to offset and scale this region so that the fill is in the same location as the outlines. The big problem are the bezier curves and how to offset them....I'm really stuck!!
___________________________
Jeremy Preston
|
|
|
|
|
Unfortunatly I am not a clipping path expert.
Maybe the problem is your printer which does not support complex regions. But I am not sure... You may check the caps. of your printer using GetDeviceCaps. But I don't know if GetDeviceCaps returns this information. What I know is that some printer do support only ONE clipping region. So that may be your problem, too.
So if you have the problem in print and preview it may be a printer problem.
You can try to paint your output in a memory DC (compatible to the screen DC) with a DIB first and then use StretchDIBits to copy the whole thing to your printer DC in OnPrint. I have very bad experiences when doing the output directly to the printer DC...
Sorry that I can't help you more...
|
|
|
|
|
Thanks for your efforts CodeBrain....it really is an annoying problem. I came up with an idea last night walking home from work, so I'll try that today and see how I get on. If it works I'll let you know what I did!!;)
|
|
|
|
|
I have a Dialog based Vc++ application from where i added some class(Dialog classes) to the gallery .
I began work on a new MFC wizard created Dialog App and added the components from the gallery (.ogx) . When i try to compile i am getting compilation errors about the ID's of controls(resources) that were imported from the gallery .
Errors look like this
: error C2065: 'IDD_EEPROM' : undeclared identifier<br />
: error C2057: expected constant expression<br />
: error C2065: 'IDC_WKSAFE' : undeclared identifier<br />
Doesnt seem to like this !!!
enum { IDD = IDD_EEPROM };<br />
CMSFlexGrid m_grid1;<br />
What do i need to modify to get it compiled . I even deleted the .clw files and built it again and it reflects the imported class and all these resources
|
|
|
|
|
When you save a class into the Gallery, it's implementation and header files (.cpp and .h) are stored away. In the case of a dialog class, it also requires a dialog resource (IDD_EEPROM) to exist in your resource script. Apparently, your dialog resource didn't get saved with the other files.
Like the error code states, the IDD_EEPROM identifier is unknown: check your resource script of what the ID of the dialog is there, and replace the identifier with the correct one.
Additionally, the resource identifiers are not saved with the class. This means that if your dialog class has DDX routines implemented, then those WILL cause the same error. To fix this, you must manually rename the identifiers in DoDataExchange function of your dialog class.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|