|
Larry Antram wrote:
Is there any way to programatically change a theme on Windows XP???
I certainly hope not! I sure as hell don't want some random program deciding to change my theme just because whatever dimwit wrote it thinks he knows better than me what colors I like.
But on a more serious note, any time programmatic access is given to user-controlled areas, idiot companies/people abuse it. Top of the Start menu - abused. Quick launch toolbar - spammed with icons (*coughNetscapecough*). Desktop - more unwanted icons put there. IE favorites folder - junk shows up there.
You know the pinned apps list on the XP Start menu? Notice how there's no programmatic access to that list. That was done on purpose so that nothing can override what the user wants to show up there.
--Mike--
Ericahist [updated Oct 26] | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber
"Linux is good. It can do no wrong. It is open source so must be right. It has penguins. I want to eat your brain."
-- Paul Watson, Linux Zombie
|
|
|
|
|
Michael Dunn wrote:
I certainly hope not! I sure as hell don't want some random program deciding to change my theme just because whatever dimwit wrote it thinks he knows better than me what colors I like.
I'm not suggesting that. I just want to create a tool that makes it easier for the user to view and switch between themes. A better mousetrap.
Unfortunately, it appears Microsoft has added a major feature to Windows XP and intentionally kept the API undocumented -- except for its own use. That sounds suspiciously like the behavior that got them in trouble before. They never learn.
I'll figure it out one way or another.
|
|
|
|
|
I'm creating a chained hash table data structure using VC++ 6.0.
I've got one template for a linked list and another for the hash table. I need to create assignment operators for both, but when I do it seems that using one in the other template class doesn't work. I either get a "can't nest template classes" error or "can't resolve right hand argument" error.
Any suggestions?
Peace
|
|
|
|
|
Could you post some code showing your problem? At least to me, it is not clear what your problem precisely is.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
How can i make a pinging appliction in vc++(MFC), that pings an server after evry specified time interval.I will be thankful to you all.
Amit
|
|
|
|
|
Hm... have you tried looking here on CodeProject for code? I know there is ping code here somewhere, too lazy to search for ya...
Rickard Andersson
Here is my card, contact me later!
UIN: 50302279
Sonork: 37318
|
|
|
|
|
use the system() function and specify the ping command with it like the following.
system("ping computername");
but it works only in XP/2000
|
|
|
|
|
Hail all!
How windows know where to search dll's? I don't want to store my debug dlls in system32 but in someone else. Or may be there another solution to run debug projects what uses dll?
|
|
|
|
|
What debug DLLs? Yours? Microsoft?
You aren't allow to distribute Microsoft debug DLLs.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
See MSDN's documentation for LoadLibrary[^].
Generally you should place your own DLLs in your application's directory, unless you're going to ship DLLs shared between many applications, in which case they should go in the Program Files\Common Files directory. Use your installer tool's method for finding this folder (the name is localised and the user may have moved it) or call SHGetFolderPath passing CSIDL_PROGRAM_FILES_COMMON as the nFolder parameter.
|
|
|
|
|
You can also store your DLL with the same directory level with your application or call #import ... in codes to specify where to get your DLLs.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
Very puzzling:
I am trying to debug this (its tricky to get the mouse right over the editbox ). It doesnt go into the mouseMove. But if I position the cursor over the part of the parent dilaog which is uncovered by controls, it goes into mouseMove but then of course I'm not in the rect. It looks like the richEdit is obscuring the mouseMove somehow....
void CImageDisplay::OnMouseMove(UINT nFlags, CPoint point)
{
CRect rect;
m_richEdit.GetWindowRect(rect);
ScreenToClient(rect);
if (rect.PtInRect(point))
{
CString str;
m_richEdit.GetWindowText(str);
m_titleTip.Show(rect, str, 0, -1);
}
CDialog::OnMouseMove(nFlags, point);
}
Many thanks,ns
|
|
|
|
|
Ummm... I'd say you've got to subclass the RichEdit control and add the OnMouseMove there.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
|
That worked great! I read the MAunder subclass article.
Did get puzzled about one thing though............the richeditctrl had no ownerdraw property to check. ALso I didnt use SubclassDlgItem or subClassWindow() at all......just changed CRichEDitCtrl to myCRichEditCTrl in the h file. I cant see when one would ever need to use SubClassWindow() etc ...? Its the subclassdemo.asp in /miscctrl.
Thanks,
ns
ALso --- to subclass the e ditctrl portion of the combobox, how would we get the nID? The entire combobox has an id, but what about just the editctrl part...
Thanks for all the help!
|
|
|
|
|
Well, the appwizard is doing the subclassing for you. You'd need to it by hand if, for instance, the control you're subclassing is not known to the wizard, or if you don't add a member variable attached to the control.
As for your other question, seems (after googling around), that you can get hold of the edit control handle by calling GetWindow(hWndCombo, GW_CHILD) , hWndCombo being the handle of the entire combobox (didn't try it myself.) After getting the handle, you can proceed with manual subcassing. Good luck.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
|
Does anybody know how to debug a console application that needs a filename as an argument e.g.
program.exe filename
I would like to set breakpoints in the code and then run it. I don't know how I can pass the filename as an argument to the program when I start running the program for debugging.
Anybody with ideas?
I am the handsome one in the crowd.
|
|
|
|
|
If you're using VC++ 6, you can go in the Project Settings, on the debug tab. Look for "Command Line Argument" and your in business!!!
Jean Bédard
Optifor Inc.
Québec,Canada
|
|
|
|
|
I am new to activex.
We have activex dialog box with gridcontrol on top of it.
there is no function to access this grid control in interface.
I need to refresh this grid everytime open up this dialog.
I noticed there is a function called findwindow(specified
title name) and get the handle to the window. Now I get the
handle to dialog. can i access this grid control from here?
Thanks,
Shin
|
|
|
|
|
why am i getting this error eventhough i did the following steps to use the mydll
1) go to project->setting->link->typed myDll.lib in the lib/mod
2) copy myDll.lib, myDll.dll, and myDllClassName.h and paste them into the myTesting program dir
3) include "myDllClassName.h"
4) myDllClassName myDllCN;
CString oldstr = "oldstr";
CString newStr;
myDllCN.Function1(oldstr,newStr); //replace original string with the old str and get the new str back
[code]
ERRORSSSSS
Linking...
LINK : warning LNK4075: ignoring /EDITANDCONTINUE due to /INCREMENTAL:NO specification
myDll.obj : error LNK2001: unresolved external symbol ""public: void __thiscall myDll::Function1(class CString,class CString &)" (?Function1@myDll@@QAEXVCString@@AAV2@@Z)
Debug/FH_Testing.exe : fatal error LNK1120: 1 unresolved externals
[/code]
|
|
|
|
|
|
I wrote the dll using c++.net
To test the myDll I open the new project.
in vc++ 6.0
1) i go to project->setting->linkig->insert myDll.lib into the lib/modules.
2) copy .h, .dll,.lib and paste into mytesting project directory
3) go back to mydll and debug with myTesting.exe
Now I have myTesting project created with vc++ .net
how can i test myDll functions is working or not in .Net
Thank you
|
|
|
|
|
There are two type of dll in general.
Win32 DLL and .NET DLL which AKA assemblies.
To use Win32 DLL which you have I presume.
Go to the URL below. It show how to use C# to do it.
http://207.219.70.31/csharp/interop.asp[^]
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
How can I save a window with graphical paints to a jpeg file????
See the code below:
/////////////////////////////////////////////////////////////////////////////////
//gdiplus
////////////////////////////////////////////////////////////////////////
int GetCodecClsid(const WCHAR* format, CLSID* pClsid){
UINT j,num = 0; // number of image encoders
UINT size = 0; // size of the image encoder array in bytes
ImageCodecInfo * pImageCodecInfo = NULL;
GetImageEncodersSize(&num, &size); if(size == 0) return -1; // Failure
pImageCodecInfo = (ImageCodecInfo *)(malloc(size)); if(pImageCodecInfo == NULL) return -1; // Failure
GetImageEncoders(num, size, pImageCodecInfo);
for(j=0; j<num; ++j){="" if(wcscmp(pimagecodecinfo[j].mimetype,="" format)="=0" ){="" *pclsid="pImageCodecInfo[j].Clsid;" return="" j;="" }="" for
=""
="" -1;
}
="" menu="" write
=""
void="" cjanelaview::ongravar()="" {
="" cjaneladoc*="" pdoc="GetDocument();
" cfile="" arquivo;
="" arquivo.open("textando.txt",="" cfile::modecreate="" |="" cfile::modewrite);
="" arquivo.write(pdoc-="">texto,pDoc->texto.GetLength());
arquivo.Close();
CPaintDC dc(this); // device context for painting
using namespace Gdiplus;
Graphics graphics(dc.m_hDC);
Pen blue (Color(255, 0, 0, 255)); Pen red (Color(255, 255, 0, 0)); int y = 256;
for (int x = 0; x < 256; x += 5){
graphics.DrawLine(&blue, 0, y, x, 0);
graphics.DrawLine(&red, 256, x, y, 256);
y -= 5; }
for (y = 0; y < 256; y++){ Pen pen(Color(y, 0, 255,0));
graphics.DrawLine(&pen, 0, y, 256, y);
Sleep(20); }
for (x = 0; x < 256; x++){ Pen pen(Color(x, 255, 0, 255));
graphics.DrawLine(&pen, x, 100, x, 200);
Sleep(20); }
// Write window ----> Image Im(L"fig.gif", FALSE); //
CLSID GifCodec;
GetCodecClsid(L"image/jpeg", &GifCodec);
Im.Save(L"gif.jpg", &GifCodec, NULL);
}
|
|
|
|