|
I already knew such a method
And also - the string you wrote doesn't work
Guys! I realy need subj! HELP!!!
I know there are such methods...
|
|
|
|
|
Hi all, could anyone who has seen a good, clear and concise tutorial on direct3D7 object texturing (that doesn't use the Microsoft D3DFrame framework) please give me the URL. I have managed to get a 2D triangle situated in 3D space up on the screen using gouraud shading (yay ), but now would like to try a dab hand at squares, then cubes and finally textures.
Thanks all,
Alan.
"When I left you I was but the learner, now I am the master" - Darth Vader
|
|
|
|
|
Some programs (like icq) can automatically detect the proxy on my network.
Does anyone have source code that can accomplish this ?
Orcun Colak
|
|
|
|
|
They usualy read the registry under the internet explorer settings u can see that under the key:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyServer"="192.168.1.1:8080"
So u can get this value quite easily!
Papa
Murex Co.
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I put a break in the init routine and it says break won't be executed (turns the break point white).
Also, when I type a var name and the dot I don't get the drop down.
WHAT IS UP!!!!
Thanks for ANY help!!
|
|
|
|
|
Make sure the project that contains your dialog is the 'Active Project'. You can do this by right-clicking on the project in the FileView and select 'Set As Active Project'.
Also, make sure you are running in debug mode instead of release mode. To verify this, select the 'Build' menu then 'Set Active Configuration...'. Make sure your '<project name=""> - WIN32 Debug' is selected and click OK. Reset your breakpoint and hit F5.
Roger Stewart
"I Owe, I Owe, it's off to work I go..."
|
|
|
|
|
Hi,
I need a small piece of code in VC++ which will enable me to start my application automatically when Windows starts up.
I'm okay with both the Startup folder concept as well as the Registry entry under "...\CurrentVersion\Run". The code should work on all versions of Windows (9x/Me/NT/2000/XP).
The complimentary code to delete the entry is also required so that the application does not start up when Windows is launched.
I'm not very familiar with the registry routines, so am requesting you, the experts, for this.
Thanks,
With Regards,
Anuj
http://www.anujseth.com/
http://yahoopops.sourceforge.net/
|
|
|
|
|
U can detect the Operating system using this function:
CString OSDetect ( )
{
CString m_sStr;
OSVERSIONINFO OSversion;
OSversion.dwOSVersionInfoSize=sizeof(OSVERSIONINFO);
::GetVersionEx(&OSversion);
switch(OSversion.dwPlatformId)
{
case VER_PLATFORM_WIN32s:
m_sStr.Format("Windows %d.%d",OSversion.dwMajorVersion,
OSversion.dwMinorVersion);
break;
case VER_PLATFORM_WIN32_WINDOWS:
if(OSversion.dwMinorVersion==0)
m_sStr="Windows 95";
else
if(OSversion.dwMinorVersion==10)
m_sStr="Windows 98";
else
if(OSversion.dwMinorVersion==90)
m_sStr="Windows Me";
break;
case VER_PLATFORM_WIN32_NT:
if(OSversion.dwMajorVersion==5 && OSversion.dwMinorVersion==0)
m_sStr.Format("Windows 2000 With %s",OSversion.szCSDVersion);
else
if(OSversion.dwMajorVersion==5 && OSversion.dwMinorVersion==1)
m_sStr.Format("Windows XP %s",OSversion.szCSDVersion);
else
if(OSversion.dwMajorVersion<=4)
m_sStr.Format("Windows NT %d.%d with %s",OSversion.dwMajorVersion,
OSversion.dwMinorVersion,OSversion.szCSDVersion);
else
// for unknown windows/newest windows version
m_sStr.Format("Windows %d.%d ",OSversion.dwMajorVersion,
OSversion.dwMinorVersion);
}
return m_sStr ;
}
based on what u receive u can add the entry to the registry if its not windows 95 , or add a shortcut to the startup folder if it is!
if ( OSDetect ( ) == "Windows 95" ) {
// If windows 95 put it into the startup
char startupLinkPath [100] ;
strcpy ( startupLinkPath , getenv ( "windir" ) ) ;
strcat ( startupLinkPath , "\\Start Menu\\Programs\\Startup\\yourLink.lnk" ) ;
FILE * pfLink = fopen ( "a:\\FIClient.lnk" , "r" ) ;
FILE * pfStartup = fopen ( startupLinkPath , "w" ) ;
char buffer [ 100 ] ;
memset ( buffer , 0 , 100 ) ;
if ( pfLink && pfStartup ) {
while ( fread ( buffer , 100 , 1 , pfLink ) )
fwrite ( buffer , 100 , 1 , pfStartup ) ;
}
}
else { // If not 95, Put it into the startup but in the registry!
CRegKey key;
LONG status;
status = key.Open(HKEY_LOCAL_MACHINE , "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\\" ) ;
if ( status == ERROR_SUCCESS) {
status = key.SetValue("C:\\YourPath\\Application.exe","Papa") ;
if ( status == ERROR_SUCCESS) {
}
else AfxMessageBox ( "Error" ) ;
} else AfxMessageBox ( "Error" ) ;
key.Close();
}
}
U have to include #include <atlbase.h> For registry access
Hope this help!
Papa
Murex Co.
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Oups
u have to include atlbase.h for registry access
Papa
Murex Co.
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I want to change the caption of a menu item dynamically, so I want to use the SetMenuInfo method and declare a variable:
MENUINFO mii;
But when I tried to compile, I was told that
'MENUINFO' : undeclared identifier.
I have included Winuser.h and Windows.h, but it doesn't help.
Anybody help me please? thanks!
|
|
|
|
|
|
thank you! I updated the SDK and there is no problem now.
|
|
|
|
|
Hi Lucy,
Have you found a way around this problem? I am running into the same difficulty.
Thanks,
Aaron
|
|
|
|
|
yes, check the above answers. I updated the library (from MS web site) and the problem went away.
|
|
|
|
|
Hi,
I'm filling my listview with new item about each 3-4 secs... But the customer wants it to stop blinking (which is due to the redraw each 15 sec). I saw some programs that didn't suffer from this but I wonder how they did it. Should I repaint the whole list on my own or? How should I deal with this?
|
|
|
|
|
Call SetRedraw(false) then fill in the list contents. When you're done, call SetRedraw(true); followed by RedrawWindow()
--Mike--
Just released - RightClick-Encrypt v1.3 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
There are several ways to deal with this problem.
1) When refreshing, don't delete all items and re-populate the entire list. Instead only delete the items which do not exist in the new list and update the ones which need updating. During this operation set Redraw() to FALSE.
2) Handle the LVG_GETDISPINFO message. You will find information about this in the MSDN. A Codeproject search may yield some results. If you don't find enough information about how to use this technique, tell me, and I'll write an article.
3) Set Redraw() to FALSE while deleting and adding items in the list. Display an hourglass.
Regards,
James Pullicino
Drinking In The Sun
Forgot Password?
|
|
|
|
|
1)I just ADD only ONE iteam about each 3-4 secs. I don't delete any items
2) LVN_GETDISPINFO: I don't understand how this could help me?
3)Even when I use this, it still blinks (as it redraws each 3-4 secs).
The only solution I could think of is to ownerdraw, filter out the erase background etc messages and just manully draw the item I added.
I could even have the items preloaded and just change the images as they load (yes, these are thumbnails, but the pictures are big and therefore take so long to load). But numerous apps with thumbnails don't blink when changing or adding their items. Like XnView or Ulead Photo Explorer. Thanks again
|
|
|
|
|
I don't understand why it should flicker then. Can you describe whats happening in more detail? Like if it is a listview or listctrl, MFC what?
Drinking In The Sun
Forgot Password?
|
|
|
|
|
it's a WinApi application. I use a common controls listview control. The icons are 100x100 pixels. IMHO It flickers because I need to redraw it every while because I add an new item every while. I can send you the exe (92 kb) with the source if you want. But there's no "extra" stuff in it. Maybe the exe would show you the efect
|
|
|
|
|
|
when the timer elapses (when an image is loaded actually), this code takes place. It all is a part of the window proc. wParam is the number (array index) of the image to be added. hListBitmap is a initialized image list, hList is a window handle to the listview control, lpPictureList is my class for storing the images
//i tried this line to avoid the flickering, but it dosn't help
SendMessage(m_hList,WM_SETREDRAW,FALSE,0);
//i have and image list with the previous entries already set, so I just add the new one to it
ImageList_Add(hListBitmap, lpPictureList->GetPicture(wParam)->GetThumb(), NULL);
//I assign the image list to the listview
SendMessage(hList, LVM_SETIMAGELIST, (WPARAM)LVSIL_NORMAL, (LPARAM)hListBitmap);
//I add the new item
SendMessage(hList, LVM_SETITEMCOUNT, (WPARAM)1, (LPARAM)LVSICF_NOINVALIDATEALL | LVSICF_NOSCROLL);
LV_ITEM lvItem;
lvItem.mask = LVIF_TEXT | LVIF_IMAGE;
lvItem.pszText = lpPictureList->GetPicture(wParam)->GetFilename();
lvItem.iImage = wParam;
lvItem.iSubItem = 0;
lvItem.cchTextMax = 7;
lvItem.iItem = 0;
SendMessage(hList, LVM_INSERTITEM, 0, (LPARAM)&lvItem);
SendMessage(hList, LVM_SETITEMTEXT, 0, (LPARAM)&lvItem);
//the same as the first line
SendMessage(m_hList,WM_SETREDRAW,TRUE,0);
thanks in advance
|
|
|
|
|
c'mon guys, please give me some hints at least... I really can't find any soulution.
|
|
|
|
|
Not sure if i'm reading this right, but are you sending LVM_SETIMAGELIST and LVM_SETITEMCOUNT *each* time you add an item? This might have something to do with the flicker.
Otherwise, you *can* double buffer listviews, fairly easily as it turns out. Do a search on CP and in the C++ forum, this has come up before.
BTW: how bad of flicker are we talking about here? Optic-nerve-jerking, screen-tearing, unreadable flicker, or a minor blip?
- Shog9 - Aaah... It's time to relax. You know what that means: a glass of beer, your favorite ergo chair... And of course, The Code Project loaded on your Personal Computer System. So go on, and indulge yourself, put your feet up. Lean back and just enjoy the articles. After all, CP sooths even the savage
|
|
|
|
|
yes, I send them each time... How (except LVS_OWNDERDATA, if even), could I handle adding new image every time. I guess I have to set the image list each time.... IMHO this could actually eat a large portion o f cpu time, but has nothing to do with flickering because it the redraw itself doesn't take that long. It should be rexdrawn only once AFTER the image list is assigned. But correct me if I'm wrong
|
|
|
|
|