|
Josh Gray wrote:
5) User reopens dialog. I call ShowWindow(SW_SHOW) on the object created in step one
6) Dialog opens and underlines are still displayed
Aha! The underlines are still displayed because you never closed the dialog box.
Josh Gray wrote:
InitDialog() runs and this takes a while because its loading data
How volatile is the data? Can you load it the first time you open the dialog box and then cache it so you don't have to load it the next time?
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I can do that but at the moment all the dialogs are handled in this way by common code. Our customer is very close to going to production with this system and Im reluctant to make that kind of change at the moment. I was hoping to just make a one line change that would be easy for them to test.
|
|
|
|
|
Josh Gray wrote:
I was hoping to just make a one line change
Nope, sorry
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Josh Gray wrote:
...the underlines are not shown on the button text for the hot keys until the ALT key is pressed...This seems to be a Windows feature as I see the same behaviour in the Explorer and Word and other apps.
Yes, this is a well-documented Windows feature. On the Display Properties dialog, select the Effects tab. It's the checkbox labeled "Hide keyboard navigation indicators until I use the Alt key."
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I'm trying to open the system store from IIS web extension and I
get an ACESS_DENIED error. It works when I run extension in "High-Isolation" mode under account belonging to Administrators group (which is not safe at all!!!), but id doesn't work if I run it under local IWAM_<machinename> account or specially-created "non-administrator" domain account. Where (and how) adjustments should be done to make it work?
Here is the call I make (C++)
store = CertOpenStore( CERT_STORE_PROV_SYSTEM,
PKCS_7_ASN_ENCODING | X509_ASN_ENCODING,
NULL,
CERT_SYSTEM_STORE_LOCAL_MACHINE,
L"MY"
);
Thanks,
Andrey
|
|
|
|
|
Would you be so kind as to suggest me how it is possible to make IE Toolbar in WTL sample here multiline. I tried SetRows() but it does not help me(of course I used TBSTYLE_WRAPABLE). I have read similar article here about problems with SetRows() in a simple floating Toolbar, it was solved be resizing parent control (or so?). I also had no luck in this approach. I always getting one line (but seems to me SetRows return correct coordinates as it should be to display the whole toolbar).
By the way, I used cmnctrl1 sample from MSDN and here SetRows works to set 2 lines(but not 3) even without TBSTYLE_WRAPABLE.
Best Regards,
Igor
|
|
|
|
|
i am overriding wndproc an handling the wm_command and wm_notify message appropriately.
in the case statement of wm_notify this is what i have
case WM_NOTIFY:
nmhdr = (NMHDR*) lParam;
notificationId = nmhdr->code;
if(notificationId == NM_CLICK)
{
AfxMessageBox(_T("CLICKED"));
return FALSE;
}
else if(notificationId == NM_DBLCLK)
{
AfxMessageBox(_T("double CLICKED"));
return FALSE;
}
...
....
//more if else goes here
else
{
// call default
}
the flow does enter this switch statement but never invokes the appropriate handler. When i tried to get the value of the notificationId it shows some junk value though nmhdr is properly initialzed and the controlid that generated the message is correct. what am i missing?
thanks
|
|
|
|
|
I am unsure how to start solving this problem.
I though i would begin by using the Knuth-Morris-Pratt string matching
algorithm does any one have a sugestion as to where i should begin.
Input would be the Filename: wordfind.in
The input file consists of a square table and a list of words. A blank line follows the table and then the words to find, one per line.
This is a sample of what my file contains.
cenad
aatps
rnrpj
hello
wmneo
hello
apple
car
me
men
ran
woman
Output
Filename: wordfind.out
This is what I wish my program to do after the program is run:
hello (3, 0) E
apple (0, 3) S
car (0, 0) S
car (0, 0) SE
me (4, 1) N
men (4, 1) N
ran (2, 0) NE
woman NOT FOUND
|
|
|
|
|
Hi
I am a newbie to C++ programming and am wanting to get three user inputs from the screen. If i use 2 char variables and an int variable my programe goes through the three screen prompts asking for the input data. But if I change the first input to a char variable[20] and use a getline() function it displays the first prompt but does not stop for user input but continues to the second prompt waiting for user input.
How can I retrieve text from a user input like "Car" and the a second prompt for number plate "WWW111" for example?
Thanks
|
|
|
|
|
cin should do this for you ? Have you tried using a std::string instead of a char array ?
#include <string>
#include <iostream>
using std::cin;
using std::string;
using std:cout;
int main()
{
cout << "type it in";
string s;
cin >> s;
cout << "You entered : " << s;
}
That's from memory by a guy whose C++ is VERY rusty. But I think it should work.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
This worked for me, unless I misunderstood your problem:
void main( void )
{
char m[20];
int a, b;
cout << "Char ";
cin >> m;
cout << "Int a ";
cin >> a;
cout << "Int b ";
cin >> b;
cout << "Char " << m << endl;
cout << "Int a " << a << endl;
cout << "Int b " << b << endl;
}
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi!
I'm going nuts here! Spent a whole week building three huge classes and now got a bright idea...What if I was to organise my classes, def in headers, say cls1.h cls2.h cls3.h (by the by got implementation files .cpp's ),
into a neat monster class clsMonster.h!
If you didn't understand what happened just now dont worry I still cant figure out why I even had the thought in the first place!
The thing is I got these 3 classes that logicaly are a part of a thing that can be a big class on its own. I started developing them separately since they are big but now feel that they would be neater if there was one class containing them sub classes (just jaming every member in clsMonster would be overkill and give me 2000+ lines to debug in one pile! ).
I made a new header, defined the big class but now need to access the members of sub classes from main() thru the big class.
Problem: Cant figure out the damn syntax of accessing the members of sub classes.
eg.
....
#include "cls1_H.h"
#include "cls2_H.h"
#include "cls3_H.h"
class Player
{
blah blah
};
.....
#include "Player_H.h"
main()
{
Player myChar;
myChar.blah blah(); // this would access members of Player
}
BUT HOW DO I ACCESS THE HEADERS INCLUDED IN Player.h???
Is there an other way to do this! (main concern - neat groups!!!)
If anyone is on this particular line right now, THANKS FOR YOUR TIME!
--------------------------------------------------------
DEBUGING IS A BITCH :smiley whith brains blown out:
--------------------------------------------------------
|
|
|
|
|
Sorry but your question makes no-sense at all.
Can you give an example of what is in cls1_H.h that you are trying to access. The blah blah in Player is a little confusing. A real example would be more helpful to diagnose your issues.
Michael
CP Blog [^]
|
|
|
|
|
CreepingFeature wrote:
Spent a whole week building three huge classes
First problem. Try to design your structure so your classes are lightweight.
CreepingFeature wrote:
into a neat monster class clsMonster.h!
That's NOT neat, it's a 'monster', a maintenance nightmare.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Forget it! I think I was sleepwalking ystrday or somthn.
Figured the whole thing out. By the way classes are so big due to enums, got lots of them!!!
|
|
|
|
|
Generate files
How can we generate files.
for example if I want to make an exe file that generate another exe file.
and if i make a program and put an edit box, and when i write something in the edit box, and click generate. the value in the edit box will be edited to the generated exe files
or
if i have an exe file that have an (m_value) Cstring
and make another file to edit/change (m_value) Cstring
is it possible?
thanks alot
|
|
|
|
|
Dody_DK wrote:
for example if I want to make an exe file that generate another exe file.
You've got one. It's called a compiler
Dody_DK wrote:
and if i make a program and put an edit box, and when i write something in the edit box, and click generate. the value in the edit box will be edited to the generated exe files
Your compiler does this also. You can take a string and shove it into a file easy enough, it's 'generating' an exe that is the job.
Dody_DK wrote:
if i have an exe file that have an (m_value) Cstring
and make another file to edit/change (m_value) Cstring
You need to define a process to do this, your two processes need to communicate and cooperate to achieve this.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
you misunderstod me
I know that the compiler make the exe programs
but I mean to make a program let's call it "one.exe" and in this program are some edit box, when i write some values, i want it to be saved in other exe file with these values... i hope i explained it better this time : )
thanks alot
|
|
|
|
|
Your request sounds a lot like this one.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I know what you want, it just sounds wierd. Why do you want to do this ? Is it to patch another program, or is it to hack it ? Either way, it can be done, so long as you're willing to sit with a hex editor and work out exactly at what position you need to insert your new value.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
I am having problems running .exe files. I am trying to run a .exe when the user clicks on a button. Could anybody please tell me the exact code which i could write in the Message Handler Function.
Naveed
|
|
|
|
|
ShellExecute or CreateProcess(Ex)
Have a look at MSDN or Platform SDK.
Don't try it, just do it!
|
|
|
|
|
if you are using regular win32 api, i assume you already have a message handler for the parent window no?
if so, then you need to add a WM_COMMAND case
and test if the HIWORD() of the lParam is == BN_CLICKED and if (HWND) lParam == YourButtons_hWnd
if so then run the app
now if you are using MFC then do this
goto the dialog designer, double click on your button
and insert the code to run your app
|
|
|
|
|
Use either of the following API -
1> ShellExecute
2> CreateProcess
Check on msdn.microsoft.com for further details on these API
Hope this helps
-------------------------
Have a great day ahead!
Regards,
Sohail Kadiwala
modified 21-Apr-21 21:01pm.
|
|
|
|
|
how do you start to write an application or how do you just write one, the source code that is, and does any one have a copy that I can look at.
|
|
|
|