|
just show the dialog, don't call DoModal.
Back to real work : D-21.
|
|
|
|
|
I'm not too sure what you're meaning I'm afraid. I got it wrong in my first post, I was called the dialogs initDialog() and not the initinstance function.
do you mean changing the int nResponse = dlg.DoModal(); line in the app class? I tried changing that to dlg.ShowWindow(SW_SHOWNORMAL) but its giving errors
Sorry to be a pain in the ass about this and thanks for your help
|
|
|
|
|
You've got plenty of modeless dialog code snippets on CodeProject to play with.
Back to real work : D-21.
|
|
|
|
|
Pick a command ID, such as 100, then at the end of OnInitDialog() , call
PostMessage ( WM_COMMAND, 100 ); Add a handler for that command ID to the dialog, and do the conversion in that handler.
--Mike--
"alyson hannigan is so cute it's crazy" -- Googlism
Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Fantastic, thanks guys. I think my heads still stuck somewhere painful after my birthday drinks last night
|
|
|
|
|
Please tell me how or what to change in order to be able to write in HKEY_LOCAL_MACHINE-section of the registry.
Now I'm using the SetRegistryKey(), m_pszRegistryKey and WriteProfileString()
but I can't make them write anywhere else but in HKEY_CURRENT_USER.
Any help will be greatly appreciated!
|
|
|
|
|
May be a security issue. Check out you are allowed any write access with the regedt32 tool, (security menu).
Back to real work : D-21.
|
|
|
|
|
I doubt it's a security issue, because it's about writing a key in HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/Run - it's about a key that starts my application when Windows starts. Any suggestions how can I do this in other way?
|
|
|
|
|
WriteProfileString() is only used for per-user data such as options for the program. To write to any key in the registry, use the registry APIs or CRegKey in ATL.
--Mike--
"alyson hannigan is so cute it's crazy" -- Googlism
Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Hello there,
I've some Binary and Text data in some files.
What's the best algorithm to encrypt them ?
Regards,
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Blowfish works for me. There are Dept. of Commerce restrictions that may apply to you if you develop software in the US for export.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I found these encryption algorithms for both text and binary files, all written in C. Hope it helps:
http://membres.lycos.fr/pc1
(Opens in new window).
Isaac Sasson,
Small time programmer - complainer at large!
Sonork ID 100.13704
|
|
|
|
|
Thanks for reply
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Best by what measure?
Are you looking for serious security?
(Get the password from outside source,
pass through one-way hash, and use as
the key for a symmetric cipher like
Blowfish?) or...
If the key is a part of your program
(i.e. encoded somewhere reachable),
and you just want a bit of obfuscation,
why not get a little benefit and just
compress the data using some fast alg
like LZSS?
|
|
|
|
|
Cool
Thanks alooot for reply !
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Can anyone tell me what includes are needed for TrackMouseEvent or even the GET_X_LPARAM macros to be recognized...I have included winuser/windows.h I have linked with user32.lib...I am stumped. I am missing some kind of update here? Using MS VC++ 6.0 under Windows XP.
|
|
|
|
|
_TrackMouseEvent is in commctrl.h
GET_X_LPARAM is in windowsx.h
The latest platform SDK is not even needed. That's the search results for an old VC6 install.
Back to real work : D-21.
|
|
|
|
|
How can I retrieve the resource of a entry in the string table. That is knowing the name, "IDS_STRING1" to retrieve the int value and thus to be able to retrieve the caption of the specific entry.
Spiros Prantalos
|
|
|
|
|
LoadString API function or CString::LoadString method if using MFC.
Pavel
Sonork 100.15206
|
|
|
|
|
Using that I have to provide the IDS_STRING1 which actually is the int value. What I am saying is to have the name on a string that is CString hhh = "IDS_STRING1" and with that to be able to find the caption of that the entry that has the same name in the string table
Spiros Prantalos
|
|
|
|
|
You can't do that directly. The compiler never sees "IDS_STRING1", only the number that it is #define d as.
You'll need to create a lookup table (using std::map for example) to convert from the string to the numerical equivalent.
--Mike--
"alyson hannigan is so cute it's crazy" -- Googlism
Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
I feel kind of stupid asking this question, but I couldn't find it at msdn, nor any other webpages. How can I set the drop down height of a comboboxex that is on a dialog? Thanks,
-Ken Mazaika
|
|
|
|
|
Not such a stupid question. You need to get the handle (HWND) of the dropdown list. AFAICR this is only available on one of the WM_CTLCOLORLISTOBX messages. Check the MSDN docs. Once you have the HWND resize as normal.
Note that if you create the dialog manually (ie. m_cmb.Create(...)) then the height specified is the height that will be used for the dropdown list.
HTH
Jerry
|
|
|
|
|
If you're doing this from the dialog editor...
Click on the down-arrow for your combo-box. The size frame with switch modes to show the height of the drop-down.
Brad Bruce
|
|
|
|
|
Exactly what I wanted; Thanks
-Ken Mazaikak
|
|
|
|